Skip to content

Commit 9b85f45

Browse files
authored
Merge pull request #405 from arduino/jacobhylen/uno_r4_wifi-cheat_sheet-revision
[UNO-R4-WiFi] Cheat Sheet Revision
2 parents f3bae81 + 3978f32 commit 9b85f45

File tree

4 files changed

+29
-33
lines changed

4 files changed

+29
-33
lines changed
Loading
Loading

content/hardware/02.hero/boards/uno-r4-wifi/tutorials/cheat-sheet/cheat-sheet.md

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ software:
1717
- web-editor
1818
---
1919

20+
2021
The **Arduino UNO** is our most popular and globally recognized development board, and has become a staple in the maker community and education since its release. The **Arduino UNO R4 WiFi** board is part of the 4th revision of UNO boards, and the first to feature a 32-bit MCU (RA4M1 series from Renesas).
2122

2223
The **UNO R4 WiFi** features a large 12x8 LED Matrix that you can create animations and simple graphics with, as well as an onboard ESP32-S3 module giving the board Wi-Fi and Bluetooth® functionality. It also features a DAC and an Op-Amp.
@@ -71,12 +72,14 @@ The ESP32 also exposes the ESP32's data lines, so that you can program the ESP32
7172

7273
![UNO R4 & UNO R3](./assets/UNO-serial.png)
7374

74-
The way this is implemented on the UNO R3 also means that the board is not able to emulate an HID device, such as a keyboard or a mouse. This is, however, not true for the UNO R4.
75-
7675
### USB Bridge
77-
As mentioned, by default the ESP32 is acting as a serial bridge, however if you wish you can change this and get direct access to the serial bus on the RA4M1 MCU either with software or hardware.
76+
By default the ESP32 acts as a serial bridge between a computer and the RA4M1 MCU. The USB data lines are routed through switches, and by default, these switches are set for communication to go via the ESP32 module.
77+
78+
![Switches for Serial Communication.](./assets/RA4M1-usb-switches.png)
7879

79-
1. Software - By pulling D40 to HIGH you will close the circuit that controls which MCU is connected to USB. While D40 is HIGH, the RA4M1 is connected to the USB Serial port.
80+
If you wish you can change this and get direct access to the serial bus on the RA4M1 MCU either with software or hardware. See the instructions below:
81+
82+
1. Software - By pulling D40 to HIGH you will close the circuit that controls which MCU is connected to USB. While D40 is HIGH, the RA4M1 is connected to the USB Serial port, and while D40 is LOW the ESP32 is connected, like the default configuration.
8083
You can do this by including the following code in `void setup()`
8184
```arduino
8285
pinMode(40, OUTPUT);
@@ -86,30 +89,36 @@ As mentioned, by default the ESP32 is acting as a serial bridge, however if you
8689

8790
![RA4M1 USB solder pads](./assets/RA4M1-usb.png)
8891

89-
### WiFi
92+
### Wi-Fi®
93+
94+
The ESP32 onboard the UNO R4 WiFi is used to give the board Wi-Fi® capabilities. The Wi-Fi module has a bitrate of up to 150 Mbps. The ESP32 module has a built in trace-antenna, meaning that you do not need an external one to use the connectivity features of the board. However, this trace antenna is shared with the Bluetooth® module, which means that you cannot use Bluetooth® and Wi-Fi® at the same time.
9095

91-
### Bluetooth
96+
### Bluetooth®
97+
98+
Thanks to the ESP32 module, the UNO R4 WiFi has Bluetooth® LE and Bluetooth® 5 capabilities, at a speed of up to 2 Mbps. The ESP32 module has a built in trace-antenna, meaning that you do not need an external one to use the connectivity features of the board. However, this trace antenna is shared with the Bluetooth® module, which means that you cannot use Bluetooth® and Wi-Fi® at the same time.
9299

93100
### Programming the ESP32 (Advanced)
94-
The ESP32 can be programmed individually from the RA4M1, with access to the data lines in the ESP header. By default, the ESP32's is used mainly as a radio module using Wi-Fi and Bluetooth®.
101+
102+
The ESP32 module and the Renesas RA4M1-chip are part of a sophisticated USB-Serial system that is highly flexible and adaptive to allow for HID features while still keeping the ability to program both the main MCU, and the ESP32, if you so wish. By default, the ESP32's is used mainly as a radio module using Wi-Fi and Bluetooth®.
95103

96104
Overwriting the ESP32's firmware disrupts the communication between the two MCUs, but enables them to act independently.
97105

98-
To reprogram the ESP32 board you can find UART-pads next to the ESP32 Module, that are laid out as shown in the image below:
106+
To reprogram the ESP32 board you can either find UART-pads next to the ESP32 Module, that are laid out as shown in the image below:
99107

100108
![Exposed ESP32 pads](./assets/ESP32-pads.png)
101109

110+
or you can use the pins exposed directly on the ESP32 header, shown here:
111+
112+
![ESP-header](./assets/ESP32-header.png)
113+
102114
## LED Matrix
103115
The LED Matrix on the UNO R4 WiFi is available to use in your program, to display still graphics, animations, or even play games on. Bundled in the core for the UNO R4 is a library for displaying frames on the matrix.
104116

105-
### LED_Matrix
106-
Initialise a LED_matrix by for example adding this code to the start of your sketch:
107-
```arduino
108-
LED_matrix matrix;
109-
```
117+
To learn about the LED matrix in depth, check out the [LED Matrix Guide](/tutorials/uno-r4-wifi/led-matrix/).
110118

111-
### LED_Matrix.load()
112-
If you've written your sketch to hold your frames as child-arrays inside of a parent-array, `load()` can be used to load the parent-array, as such:
119+
- `Arduino_LED_Matrix matrix` - Initialises a LED matrix.
120+
- `Arduino_LED_Matrix.load()` - Loads a frame into the frame buffer.
121+
Here's a basic example:
113122

114123
```arduino
115124
// creates an array of two frames
@@ -133,21 +142,8 @@ const uint32_t frames[][4] = {
133142
134143
```
135144

136-
### LED_Matrix.begin()
137-
The `begin()` method starts displaying the frames you have loaded into the matrix buffer one after the other.
138-
139-
### LED_Matrix.autoscroll()
140-
`autoscroll()` lets you set an automatic time interval for the matrix to move to the next frame, and is used as such:
141-
142-
```arduino
143-
matrix.autoscroll(300);
144-
```
145-
146-
### LED_Matrix.next()
147-
`next()` will manually let you move to the next frame, if the autoscroll is not suitable for your program.
148-
149-
### LED_Matrix.on()
150-
`on()` will manually turn a single pixel on.
151-
152-
### LED_Matrix.off()
153-
`off()` will manually turn a single pixel off.
145+
- `Arduino_LED_Matrix.begin()` - Initialises the LED matrix itself, making it ready to display frames.
146+
- `Arduino_LED_Matrix.autoscroll()` - Sets an automatic time interval in ms for the matrix to scroll through the frames.
147+
- `Arduino_LED_Matrix.next()` - Manually moves to the next frame.
148+
- `Arduino_LED_Matrix.on()` - Manually turn a single pixel on.
149+
- `Arduino_LED_Matrix.off()` - Manually turn a single pixel off.

0 commit comments

Comments
 (0)