Skip to content

Commit 5289beb

Browse files
committed
Content update (RGB section)
1 parent 190a7db commit 5289beb

File tree

6 files changed

+119
-16
lines changed

6 files changed

+119
-16
lines changed
259 KB
Loading
394 KB
Loading
988 KB
Loading
586 KB
Loading

content/hardware/03.nano/boards/nano-r4/tutorials/01.user-manual/content.md

Lines changed: 119 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ This user manual provides a comprehensive overview of the Nano R4 board, highlig
4040

4141
The Nano R4 board represents the natural evolution of the Nano family, combining the powerful RA4M1 microcontroller from Renesas with the compact and familiar Nano form factor. This board is designed to facilitate seamless transition from prototyping to production, using the same powerful core already used in the UNO R4 family.
4242

43-
![ ](assets/front_page.png)
43+
![ ](assets/front-page.png)
4444

4545
The Nano R4 includes a high-performance 32-bit microcontroller (R7FA4M1AB3CFM), expanded connectivity through an onboard Qwicc connector and advanced features such as DAC, CAN and operational amplifiers. Its compact dimensions (18 mm x 45 mm) and robust construction make the Nano R4 board an excellent choice for projects that demand sensor fusion capabilities and the computational power of modern microcontrollers.
4646

@@ -88,6 +88,8 @@ The Arduino UNO R4 Boards core provides support for the following:
8888

8989
### Pinout
9090

91+
![Nano R4 pinout](assets/simple-pinout.png)
92+
9193
The full pinout is available and downloadable as PDF from the link below:
9294

9395
- Nano R4 pinout
@@ -129,26 +131,38 @@ The Nano R4 can be connected to your computer very simply using its onboard USB-
129131

130132
***<strong>Important note:</strong> The Nano R4 operates at +5 VDC natively. When connecting sensors or modules that operate at +3.3 VDC, make sure to verify voltage compatibility to avoid component damage.***
131133

132-
### Powering the Board
134+
### Powering the Board
135+
136+
The Nano R4 can be powered in several ways:
137+
138+
- **Via USB-C connector**: The most common method during development and programming
139+
- **Via `VIN` pin**: Using an external +6-21 VDC power supply that will be internally regulated to +5 VDC
140+
- **Via `5V` pin**: Directly connecting a regulated +5 VDC source (with caution)
141+
142+
![Different ways to power the Nano R4 board](assets/user-manual-4.png)
143+
144+
***<strong>Important note:</strong> The Nano R4's `VIN` pin accepts a voltage range of +6-21 VDC. Do not connect voltages outside this range as you could permanently damage the board. Always verify all the connections before applying power.***
133145

134-
The Nano R4 can be powered in several ways:
146+
#### Internal +3.3 VDC Power Supply
135147

136-
- **Via USB-C connector**: The most common method during development and programming
137-
- **Via `VIN` pin**: Using an external +6-21 VDC power supply that will be internally regulated to +5 VDC
138-
- **Via `5V` pin**: Directly connecting a regulated +5 VDC source (with caution)
148+
The Nano R4 also includes an onboard +3.3 VDC regulator ([AP2112K](https://www.diodes.com/assets/Datasheets/AP2112.pdf)) that provides power for the following:
139149

140-
![Different ways to power the Nano R4 board](assets/user-manual-4.png)
150+
- **Qwicc connector**: Supplies +3.3 VDC power to connected I²C devices
151+
- **I²C level translation**: Enables communication between the +5 VDC microcontroller and +3.3 VDC Qwicc devices
152+
- **Internal +3.3 VDC peripherals**: Powers certain internal circuits that require +3.3 VDC operation
141153

142-
***<strong>Important note:</strong> The Nano R4's `VIN` pin accepts a voltage range of +6-21 VDC. Do not connect voltages outside this range as you could permanently damage the board. Always verify all the connections before applying power.***
154+
This internal +3.3 VDC supply allows the board to interface with both +5 VDC and +3.3 VDC devices through the Qwicc ecosystem while maintaining the +5 VDC operation of the board's main microcontroller.
143155

144-
The Nano R4 also includes an onboard +3.3 VDC regulator ([AP2112K](https://www.diodes.com/assets/Datasheets/AP2112.pdf)) that provides power for the following:
156+
#### VBATT Pin
145157

146-
- **Qwicc connector**: Supplies +3.3 VDC power to connected I²C devices
147-
- **I²C level translation**: Enables communication between the +5 VDC microcontroller and +3.3 VDC Qwicc devices
148-
- **Internal +3.3 VDC peripherals**: Powers certain internal circuits that require +3.3 VDC operation
158+
The `VBATT` pin allows the connection of a backup battery (within the +1.6-3.6 VDC range) to maintain the microcontroller's real-time clock (RTC) and certain low-power functions when the main power source is disconnected from the board. This is particularly useful for applications that need to keep track of time or maintain certain settings of the microcontroller during power outages.
149159

150-
This internal +3.3 VDC supply allows the board to interface seamlessly with both +5 VDC and +3.3 VDC devices through the Qwicc ecosystem while maintaining the +5 VDC operation of the board's main microcontroller.
160+
Common battery options for this purpose include the following:
151161

162+
- Coin cell batteries (CR2032: +3 VDC)
163+
- Rechargeable LiPo batteries (+3.7 VDC nominal)
164+
- AA/AAA batteries (+1.5-3 VDC depending on the chemistry of the battery)
165+
152166
### Hello World Example
153167

154168
Let's program the Nano R4 to reproduce the classic `Hello World` example used in the Arduino ecosystem: the `Blink` sketch. We will use this example to verify that the Nano R4's connection to the computer works correctly, that the Arduino IDE is properly configured, and that both the board and development environment function as expected.
@@ -197,11 +211,11 @@ To upload the sketch to the board, click the **Verify** button to compile the sk
197211

198212
![Uploading a sketch to the Nano R4 in the Arduino IDE](assets/user-manual-5.png)
199213

200-
As shown in the image above, you should see the built-in orange user LED of your Nano R4 board turn on for one second, then turn off for one second, repeating this cycle continuously.
214+
As shown in the animation below, you should see the built-in orange user LED of your Nano R4 board turn on for one second, then turn off for one second, repeating this cycle continuously.
201215

202216
![Onboard orange user LED blinking](assets/user-manual-6.gif)
203217

204-
Additionally, you can open the Arduino IDE's Serial Monitor (Tools > Serial Monitor) to see the status messages that the sketch sends each time the LED state changes.
218+
Additionally, you can open the Arduino IDE's Serial Monitor (Tools > Serial Monitor) to see the status messages that the example sketch sends each time the LED state changes.
205219

206220
![Arduino IDE Serial Monitor output for the Blink sketch](assets/user-manual-7.png)
207221

@@ -213,4 +227,93 @@ This example confirms the following:
213227
- USB communication is working
214228
- Digital pins respond to commands
215229

216-
Congratulations! You have successfully completed your first program on the Nano R4 board. You are now ready to explore the more advanced features of this tiny but powerful board.
230+
Congratulations! You have successfully completed your first program on the Nano R4 board. You are now ready to explore the more advanced features of this tiny but powerful board.
231+
232+
## LEDs
233+
234+
This user manual section covers the Nano R4 built-in LEDs, showing their main hardware and software characteristics.
235+
236+
### RGB LED
237+
238+
The Nano R4 features a built-in RGB LED that can be used as a visual feedback indicator for the user.
239+
240+
![Built-in RGB LED of the Nano R4 board](assets/user-manual-8.png)
241+
242+
The built-in RGB LED can be accessed through the following macro definitions:
243+
244+
| **Built-in LED** | **Macro Definition** | **Microcontroller Pin** |
245+
|:----------------:|:--------------------:|:-----------------------:|
246+
| Red LED | `LEDR` | `P409` |
247+
| Green LED | `LEDG` | `P411` |
248+
| Blue LED | `LEDB` | `P410` |
249+
250+
***The built-in RGB LED on the Nano R4 must be pulled to ground (GND) to make it light up. This means that a voltage level of `LOW` on each of their pins will turn the specific color of the LED on, and a voltage level of `HIGH` will turn them off.***
251+
252+
The following example sketch each of the RGB LED colors at an interval of 500 ms:
253+
254+
```arduino
255+
/**
256+
RGB LED Example for the Arduino Nano R4 Board
257+
Name: nano_r4_rgb_led.ino
258+
Purpose: This sketch demonstrates how to control the built-in
259+
RGB LED of the Arduino Nano R4 board.
260+
261+
@author Arduino Product Experience Team
262+
@version 1.0 01/06/25
263+
*/
264+
265+
void setup() {
266+
// Initialize serial communication at 115200 baud
267+
Serial.begin(115200);
268+
269+
// Initialize LEDR, LEDG and LEDB as outputs
270+
pinMode(LEDR, OUTPUT);
271+
pinMode(LEDG, OUTPUT);
272+
pinMode(LEDB, OUTPUT);
273+
274+
// Turn off all LEDs initially
275+
digitalWrite(LEDR, HIGH);
276+
digitalWrite(LEDG, HIGH);
277+
digitalWrite(LEDB, HIGH);
278+
279+
Serial.println("- Arduino Nano R4 - RGB LED Example started...");
280+
}
281+
282+
void loop() {
283+
// Turn on the built-in red LED and turn off the rest
284+
digitalWrite(LEDR, LOW);
285+
digitalWrite(LEDG, HIGH);
286+
digitalWrite(LEDB, HIGH);
287+
Serial.println("- Red LED on!");
288+
delay(500);
289+
290+
// Turn on the built-in green LED and turn off the rest
291+
digitalWrite(LEDR, HIGH);
292+
digitalWrite(LEDG, LOW);
293+
digitalWrite(LEDB, HIGH);
294+
Serial.println("- Green LED on!");
295+
delay(500);
296+
297+
// Turn on the built-in blue LED and turn off the rest
298+
digitalWrite(LEDR, HIGH);
299+
digitalWrite(LEDG, HIGH);
300+
digitalWrite(LEDB, LOW);
301+
Serial.println("- Blue LED on!");
302+
delay(500);
303+
304+
// Turn off all LEDs
305+
digitalWrite(LEDR, HIGH);
306+
digitalWrite(LEDG, HIGH);
307+
digitalWrite(LEDB, HIGH);
308+
Serial.println("- All LEDs off!");
309+
delay(500);
310+
}
311+
```
312+
313+
You should now see the built-in RGB LED cycling through red, green, and blue colors, followed by a brief moment with all LEDs off, repeating this pattern continuously.
314+
315+
![Onboard RGB user LED blinking](assets/user-manual-9.gif)
316+
317+
Additionally, you can open the Arduino IDE's Serial Monitor (Tools > Serial Monitor) to see the status messages that the example sketch sends each time the RGB LEDs state changes.
318+
319+
![Arduino IDE Serial Monitor output for the RGB LED example sketch](assets/user-manual-10.png)

0 commit comments

Comments
 (0)