You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/micropython/03.micropython/04.board-examples/giga-r1-wifi/giga-r1-wifi.md
+6-10Lines changed: 6 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: GIGA R1 WiFi
3
3
description: Learn how to use specific features on the GIGA R1 WiFi using MicroPython
4
4
---
5
-

5
+

6
6
7
7
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.
8
8
@@ -13,7 +13,7 @@ For installation instructions, please visit the link below:
13
13
14
14
The pinout for the GIGA R1 WiFi can be found in the image below.
***For more details on this product, visit the [hardware product page](/hardware/giga-r1-wifi/).***
19
19
@@ -36,7 +36,7 @@ The GIGA R1 WiFi features a Murata 1DX module that provides both **Wi-Fi®** and
36
36
37
37
38
38
39
-
###Dual-Core Programming
39
+
## Dual-Core Programming
40
40
41
41
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:
42
42
@@ -64,7 +64,7 @@ main_task()
64
64
65
65
66
66
67
-
###RGB LED
67
+
## RGB LED
68
68
69
69
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.
70
70
@@ -101,7 +101,7 @@ while True:
101
101
```
102
102
103
103
104
-
###PWM on the GIGA R1 WiFi
104
+
## PWM on the GIGA R1 WiFi
105
105
106
106
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.
`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.
137
137
138
138
139
-
### Using the RPC Library with MicroPython
139
+
##RPC
140
140
141
141
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.
142
142
@@ -153,7 +153,6 @@ While powerful, the **msgpackrpc** library has some limitations:
153
153
3.**Flash-based firmware** must use a 1.5MB M7 + 0.5MB M4 flash partitioning scheme.
154
154
155
155
156
-
157
156
#### Example
158
157
159
158
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!
191
190
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).
192
191
193
192
194
-
195
-
!Needs testing for CANBUS!
196
-
197
193
## Additional Features
198
194
199
195
The GIGA R1 WiFi includes other features that can be explored:
Copy file name to clipboardExpand all lines: content/micropython/03.micropython/04.board-examples/nano-ble-sense/nano-ble-sense.md
+21-8Lines changed: 21 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Nano BLE Sense
3
3
description: Learn how to use specific features on the Nano BLE Sense using MicroPython
4
4
---
5
5
6
-
![Nano BLE Sense]()
6
+

7
7
8
8
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.
9
9
@@ -287,7 +287,13 @@ The Nano BLE Sense supports **I2C**, **UART** and **SPI**. Below you will find e
287
287
The I2C bus on the Nano BLE Sense is available through the **A4/A5** pins. Below is an example for how to use it:
288
288
289
289
```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()
290
295
296
+
print("I2C devices found:", devices)
291
297
```
292
298
293
299
***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
297
303
The Nano BLE Sense supports **UART** through the **D0/D1** pins. Below is an example for how to use it:
298
304
299
305
```python
306
+
from machine importUART
307
+
308
+
# Initialize UART on pins 16 (TX) and 17 (RX)
309
+
uart = UART(1, baudrate=9600, tx=16, rx=17)
300
310
311
+
# Send and receive data
312
+
uart.write("Hello from Nano BLE Sense!")
313
+
data = uart.read()
314
+
print("Received:", data)
301
315
```
302
316
303
317
***Read more about SPI in [this article]().***
@@ -313,13 +327,12 @@ The Nano BLE Sense supports **SPI** through the following pins:
313
327
Below is an example for how to use it:
314
328
315
329
```python
330
+
from machine import Pin, SPI
316
331
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
Copy file name to clipboardExpand all lines: content/micropython/03.micropython/04.board-examples/nano-esp32/nano-esp32.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Nano ESP32
3
3
description: Learn how to use specific features on the Nano ESP32 using MicroPython
4
4
---
5
5
6
-

6
+

7
7
8
8
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.
9
9
@@ -14,7 +14,7 @@ For installation instructions, please visit the link below:
14
14
15
15
The pinout for the Nano ESP32 can be found in the image below.
0 commit comments