Skip to content

Commit 8e78dac

Browse files
committed
board examples update
1 parent 85e5a9d commit 8e78dac

File tree

11 files changed

+50
-28
lines changed

11 files changed

+50
-28
lines changed
379 KB
Loading
1.9 MB
Loading

content/micropython/03.micropython/04.board-examples/giga-r1-wifi/giga-r1-wifi.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: GIGA R1 WiFi
33
description: Learn how to use specific features on the GIGA R1 WiFi using MicroPython
44
---
5-
![GIGA R1 WiFi](./assets/giga-r1-wifi.png)
5+
![GIGA R1 WiFi](./assets/giga-r1.png)
66

77
In this guide, you will find information specific to the [GIGA R1 WiFi board](https://store.arduino.cc/products/giga-r1-wifi), such as supported serial protocols, built-in peripherals, and how to access the wireless features.
88

@@ -13,7 +13,7 @@ For installation instructions, please visit the link below:
1313

1414
The pinout for the GIGA R1 WiFi can be found in the image below.
1515

16-
![GIGA R1 WiFi Pinout](./assets/giga-r1-wifi-pinout.png)
16+
![GIGA R1 WiFi Pinout](./assets/ABX00063-pinout.png)
1717

1818
***For more details on this product, visit the [hardware product page](/hardware/giga-r1-wifi/).***
1919

@@ -36,7 +36,7 @@ The GIGA R1 WiFi features a Murata 1DX module that provides both **Wi-Fi®** and
3636

3737

3838

39-
### Dual-Core Programming
39+
## Dual-Core Programming
4040

4141
The GIGA R1 WiFi supports dual-core programming, where the Cortex-M7 and Cortex-M4 cores can execute separate tasks simultaneously. Below is an example of how to run MicroPython on one core while offloading specific tasks to the other:
4242

@@ -64,7 +64,7 @@ main_task()
6464
6565

6666

67-
### RGB LED
67+
## RGB LED
6868

6969
The GIGA R1 WiFi has a built-in RGB LED that can be easily controlled to turn on each color individually. The following example shows how to cycle through red, green, and blue, waiting a second between each, and then turning off all colors before looping back.
7070

@@ -101,7 +101,7 @@ while True:
101101
```
102102

103103

104-
### PWM on the GIGA R1 WiFi
104+
## PWM on the GIGA R1 WiFi
105105

106106
On STM32 boards like the Arduino GIGA R1 WiFi, PWM is handled differently than on typical MicroPython boards. Instead of directly using the `PWM` class, you need to use the `Timer` class in combination with the `Pin` class from the `pyb` module.
107107

@@ -136,7 +136,7 @@ ch.pulse_width_percent(25) # 25% duty cycle
136136
`ch.pulse_width_percent(25)` sets the duty cycle of the PWM signal to 25%. You can adjust this value between `0` and `100` to control the signal's ON time.
137137

138138

139-
### Using the RPC Library with MicroPython
139+
## RPC
140140

141141
The **msgpackrpc** library provides the same functionality as the Arduino RPC library for MicroPython, allowing seamless communication between the two cores (M7 and M4) on the GIGA R1 WiFi. This library enables binding of local functions or objects, starting the M4 core, and invoking remote calls from Python scripts.
142142

@@ -153,7 +153,6 @@ While powerful, the **msgpackrpc** library has some limitations:
153153
3. **Flash-based firmware** must use a 1.5MB M7 + 0.5MB M4 flash partitioning scheme.
154154

155155

156-
157156
#### Example
158157

159158
Here’s how to bind a function on the M7 core and call it from the M4 core:
@@ -191,9 +190,6 @@ print(result) # Outputs: Hello from M7!
191190
For a detailed explanation of the RPC library, including advanced use cases and configuration, visit the [RPC Library with MicroPython guide](https://docs.arduino.cc/tutorials/giga-r1-wifi/giga-dual-core/#using-the-rpc-library-with-micropython).
192191

193192

194-
195-
!Needs testing for CANBUS!
196-
197193
## Additional Features
198194

199195
The GIGA R1 WiFi includes other features that can be explored:
1.06 MB
Loading

content/micropython/03.micropython/04.board-examples/nano-ble-sense/nano-ble-sense.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Nano BLE Sense
33
description: Learn how to use specific features on the Nano BLE Sense using MicroPython
44
---
55

6-
![Nano BLE Sense]()
6+
![Nano BLE Sense](assets/ble-sense.png)
77

88
In this guide, you will find information specific to the [Nano BLE Sense board](), such as supported serial protocols and built-in sensors that can be accessed.
99

@@ -287,7 +287,13 @@ The Nano BLE Sense supports **I2C**, **UART** and **SPI**. Below you will find e
287287
The I2C bus on the Nano BLE Sense is available through the **A4/A5** pins. Below is an example for how to use it:
288288

289289
```python
290+
from machine import Pin, I2C
291+
292+
# Initialize I2C with SCL on A5 and SDA on A4
293+
i2c = I2C(0, scl=Pin(5), sda=Pin(4))
294+
devices = i2c.scan()
290295

296+
print("I2C devices found:", devices)
291297
```
292298

293299
***Read more about I2C in [this article]().***
@@ -297,7 +303,15 @@ The I2C bus on the Nano BLE Sense is available through the **A4/A5** pins. Below
297303
The Nano BLE Sense supports **UART** through the **D0/D1** pins. Below is an example for how to use it:
298304

299305
```python
306+
from machine import UART
307+
308+
# Initialize UART on pins 16 (TX) and 17 (RX)
309+
uart = UART(1, baudrate=9600, tx=16, rx=17)
300310

311+
# Send and receive data
312+
uart.write("Hello from Nano BLE Sense!")
313+
data = uart.read()
314+
print("Received:", data)
301315
```
302316

303317
***Read more about SPI in [this article]().***
@@ -313,13 +327,12 @@ The Nano BLE Sense supports **SPI** through the following pins:
313327
Below is an example for how to use it:
314328

315329
```python
330+
from machine import Pin, SPI
316331

317-
```
318-
319-
***Read more about UART in [this article]().***
332+
# Initialize SPI with SCK on pin 18, MOSI on pin 23, and MISO on pin 19
333+
spi = SPI(1, baudrate=1000000, polarity=0, phase=0, sck=Pin(18), mosi=Pin(23), miso=Pin(19))
320334

321-
## Wireless
335+
print("SPI initialized")
336+
```
322337

323-
The Nano BLE Sense has a radio module that supports Wi-Fi® and Bluetooth®. To find examples, please visit the links below:
324-
- [MicroPython - Bluetooth® documentation]()
325-
- [MicroPython - Wi-Fi® documentation]()
338+
***Read more about UART in [this article]().***
291 KB
Loading
1.05 MB
Loading

content/micropython/03.micropython/04.board-examples/nano-esp32/nano-esp32.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Nano ESP32
33
description: Learn how to use specific features on the Nano ESP32 using MicroPython
44
---
55

6-
![Nano ESP32](./assets/nano-esp32.png)
6+
![Nano ESP32](./assets/esp32.png)
77

88
In this guide, you will find information specific to the [Nano ESP32 board](https://store.arduino.cc/products/nano-esp32), such as supported serial protocols, built-in sensors, and how to access the wireless features.
99

@@ -14,7 +14,7 @@ For installation instructions, please visit the link below:
1414

1515
The pinout for the Nano ESP32 can be found in the image below.
1616

17-
![Nano ESP32 Pinout](./assets/nano-esp32-pinout.png)
17+
![Nano ESP32 Pinout](./assets/ABX00083-pinout.png)
1818

1919
***For more details on this product, visit the [hardware product page](/hardware/nano-esp32/).***
2020

324 KB
Loading
1.01 MB
Loading

0 commit comments

Comments
 (0)