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
@@ -51,6 +51,20 @@ To install the core, go the **board manager** and search for **Nano ESP32**. If
51
51
52
52
You can also program your board via the [Arduino Web Editor](arduino-cloud/getting-started/getting-started-web-editor), an online IDE.
53
53
54
+
## MicroPython
55
+
56
+
The Nano ESP32 has support for MicroPython, a micro-implementation of Python that can easily be installed on your board.
57
+
58
+
To get started with MicroPython, please visit [MicroPython 101](/micropython-course), a course dedicated towards learning MicroPython on the Nano ESP32.
59
+
60
+
In this course, you will fundamental knowledge to get started, as well as a large selection of examples for popular third-party components.
61
+
62
+
## Arduino IoT Cloud
63
+
64
+
Nano ESP32 is supported in the [Arduino IoT Cloud](https://create.arduino.cc/iot/) platform. You can connect to the cloud either through "classic" Arduino, using the C++ library, or via MicroPython:
65
+
-[Getting Started with Arduino IoT Cloud (classic)](https://docs.arduino.cc/arduino-cloud/getting-started/iot-cloud-getting-started)
66
+
-[MicroPython with Arduino IoT Cloud](https://docs.arduino.cc/arduino-cloud/getting-started/iot-cloud-micropython)
67
+
54
68
## API
55
69
56
70
The Nano ESP32 can be programmed using the same API as for other Arduino boards (see [language reference](https://www.arduino.cc/reference/en/)).
@@ -69,22 +83,10 @@ The Nano ESP32 can be programmed to draw a minimal amount of power, making it su
69
83
70
84
The [Sleep Modes](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/system/sleep_modes.html) section in the ESP32 docs explains how to configure your board to draw minimal power, introducing the **light sleep** and **deep sleep**
71
85
72
-
## MicroPython
73
-
74
-
The Nano ESP32 has support for MicroPython, a micro-implementation of Python that can easily be installed on your board.
75
-
76
-
To get started with MicroPython, please visit [MicroPython 101](/micropython-course), a course dedicated towards learning MicroPython on the Nano ESP32.
77
-
78
-
In this course, you will fundamental knowledge to get started, as well as a large selection of examples for popular third-party components.
79
-
80
-
## Arduino IoT Cloud
81
-
82
-
Nano ESP32 is supported in the [Arduino IoT Cloud](https://create.arduino.cc/iot/) platform. You can connect to the cloud either through "classic" Arduino, using the C++ library, or via MicroPython:
83
-
-[Getting Started with Arduino IoT Cloud (classic)](https://docs.arduino.cc/arduino-cloud/getting-started/iot-cloud-getting-started)
84
-
-[MicroPython with Arduino IoT Cloud](https://docs.arduino.cc/arduino-cloud/getting-started/iot-cloud-micropython)
85
-
86
86
## Power Considerations
87
87
88
+

89
+
88
90
To power the Nano ESP32 you may either use a USB-C cable, or the VIN pin. Never exceed 5-18V as the **MP2322GQH** converter on the board is not designed for any higher voltages.
89
91
90
92
### Input Voltage (VIN)
@@ -94,7 +96,7 @@ To power the Nano ESP32 you may either use a USB-C cable, or the VIN pin. Never
94
96
95
97
### Operating Voltage
96
98
97
-
The internal operating voltage of the microcontroller is 3.3V, and you should not apply voltages higher than that to the GPIO pins.
99
+
The internal operating voltage of the ESP32-S3 SoC is 3.3V, and you should not apply voltages higher than that to the GPIO pins.
98
100
99
101
### 5V Pin / VUSB
100
102
@@ -108,7 +110,7 @@ This measure is taken to prevent the board's microcontroller from accidentially
108
110
109
111
The Nano ESP32 has two headers: the **analog** and **digital**. Listed here are the **default** pins that comply with previous Nano form factor designs.
| A4 | Analog | Analog input 4 / **I2C** Serial Datal (SDA) |
167
-
| A5 | Analog | Analog input 5 / **I2C** Serial Clock (SCL) |
168
-
| A6 | Analog | Analog input 6 |
169
-
| A7 | Analog | Analog input 7 |
167
+
There are 8 analog input pins on the Nano ESP32, with 2 reserved for I2C communication (A4/A5). The ESP32-S3 embeds two SAR ADCs, `ADC1` and `ADC2`, where each ADC uses 4 channels each.
| A4 | Analog | Analog input 4 / **I2C** Serial Datal (SDA) |`ADC2_CH1`|
176
+
| A5 | Analog | Analog input 5 / **I2C** Serial Clock (SCL) |`ADC2_CH2`|
177
+
| A6 | Analog | Analog input 6 |`ADC2_CH3`|
178
+
| A7 | Analog | Analog input 7 |`ADC2_CH4`|
179
+
180
+
***Please note that `ADC2` is also used for Wi-Fi® communication and can fail if used simultanenously.***
181
+
182
+
For more details, see [Analog to Digital Converter (link to Espressif docs)](https://docs.espressif.com/projects/esp-idf/en/v4.4/esp32s3/api-reference/peripherals/adc.html).
170
183
171
184
### PWM
172
185
173
-
Pulse width modulation (PWM) is supported on all digital pins (D0-D13).
186
+
Pulse width modulation (PWM) is supported on **all digital pins (D0-D13)** as well **as all analog pins (A0-A7)**, where the output is controlled via the `analogWrite()` method.
187
+
188
+
```arduino
189
+
analogWrite(pin,value);
190
+
```
191
+
192
+
***Due to timer restrictions, only 4 PWM signals can be generated simultaneously.***
174
193
175
194
### Boot Pins
176
195
177
-
To enter bootloader mode (chip boot mode), you can use either the BOOT0 or BOOT1 pins, which are connected to the ESP32-S3's `GPIO0` and `GPIO46`.
196
+
To enter bootloader mode (chip boot mode), you can use either the BOOT0 (B0) or BOOT1 (B1) pins, which are connected to the ESP32-S3's `GPIO0` and `GPIO46`.
197
+
198
+

178
199
179
-
Shorting these to GND + pressing the reset button will enter a bootloader mode. Note that while shorting these pins, a corresponding LED will
200
+
Shorting these to GND + pressing the reset button will enter a bootloader mode. Note that while shorting these pins, a corresponding LED will light up (blue for )
180
201
181
202
You can read more about different this in the [Strapping Pins section](https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf#page=23) in the ESP32-S3's datasheet.
182
203
183
204
## I2C
184
205
206
+

207
+
185
208
The default pins used for I2C on the Nano ESP32 are the following:
186
-
- SDA - A4
187
-
- SCL - A5
188
209
189
-
![I2C Pins]()
210
+
| Pin | Function | Description |
211
+
| --- | -------- | -------------------- |
212
+
| A4 | SDA |**I2C** Serial Data |
213
+
| A5 | SCL |**I2C** Serial Clock |
190
214
191
215
To connect I2C devices you will need to include the [Wire](https://www.arduino.cc/reference/en/language/functions/communication/wire/) library at the top of your sketch.
The pins used for UART on the Nano ESP32 are the following:
255
278
256
-
| Pin | Function |
257
-
| --- | -------- |
258
-
| D0 |RX0|
259
-
| D1 |TX0|
279
+
| Pin | Function | Description |
280
+
| --- | -------- | -------------------- |
281
+
| D0 |RX| Receive Serial Data|
282
+
| D1 |TX| Transmit Serial Data|
260
283
261
284
To send and receive data through UART, we will first need to set the baud rate inside `void setup()`. Note that when using the UART (RX/TX pins), we use the `Serial1` object.
262
285
@@ -286,7 +309,7 @@ The ESP32-S3 SoC features an IO mux (input/output multiplexer) and a GPIO matrix
286
309
287
310
The ESP32-S3 chip has 45 physical GPIOs, but many more digital peripherals. The IO mux provides the flexibility of routing the signals to different GPIOs, thus changing the function of a specific pin.
288
311
289
-

312
+

290
313
291
314
This technique is well known and applied within ESP32 boards, but on the Nano ESP32 we use a set of default pins for the I2C, SPI & UART peripherals to remain consistent with previous designs.
Nano ESP32 can be used to emulate an HID device by using e.g. `Mouse.move(x,y)` or `Keyboard.press('w')`. The API documentation can be found in Arduino's language reference:
@@ -329,99 +354,6 @@ Nano ESP32 can be used to emulate an HID device by using e.g. `Mouse.move(x,y)`
329
354
330
355
Several ready to use examples are also available in the core at **Examples > USB**.
331
356
332
-
## SPI
333
-
334
-

335
-
336
-
The **Nano ESP32** SPI peripheral is attached to the following pins:
337
-
338
-
`SPI` uses the following pins:
339
-
340
-
- (SCK) - D13
341
-
- (CIPO) - D12
342
-
- (COPI) - D11
343
-
- (CS) - D10\*
344
-
345
-
\*CS (Chip Select) can be changed to any free GPIO
346
-
347
-
348
-
## I2C
349
-
350
-

351
-
352
-
I2C lets you connect multiple I2C compatible devices in series using only two pins. The controller will send out information through the I2C bus to a 7-bit address, meaning that the technical limit of I2C devices on a single line is 128.
353
-
354
-
The pins used for I2C on the **Nano ESP32** are the following:
355
-
- SDA - A4
356
-
- SCL - A5
357
-
358
-
To connect I2C devices you will need to include the [Wire](https://www.arduino.cc/reference/en/language/functions/communication/wire/) library at the top of your sketch.
359
-
360
-
```arduino
361
-
#include <Wire.h>
362
-
```
363
-
364
-
Inside `void setup()` you need to initialize the library, and initialize the I2C port you want to use.
365
-
366
-
```arduino
367
-
Wire.begin(); //initialize library
368
-
```
369
-
370
-
And to write something to a device connected via I2C, we can use the following commands:
371
-
372
-
```arduino
373
-
Wire.beginTransmission(1); //begin transmit to device 1
374
-
Wire.write(byte(0x00)); //send instruction byte
375
-
Wire.write(val); //send a value
376
-
Wire.endTransmission(); //stop transmit
377
-
```
378
-
379
-
## Serial/UART Pins
380
-
381
-
The **Nano ESP32** supports hardware serial communication with UART (Universal Asynchronous, Receiver-Transmitter).
382
-
383
-
The default UART pins are the following:
384
-
385
-
- RX0 - D0
386
-
- TX0 - D1
387
-
388
-
Serial communication is handled via the `Serial` API, where `Serial` handles communication over USB, and `Serial1` over D0/D1.
389
-
390
-
```arduino
391
-
Serial //serial over USB
392
-
Serial1 //serial over D0/D1
393
-
```
394
-
395
-
To send and receive data through UART, we will first need to set the baud rate inside `void setup()`.
396
-
397
-
```arduino
398
-
Serial.begin(9600); //serial over USB
399
-
Serial1.begin(9600); //serial using D0/D1
400
-
```
401
-
402
-
To print something to the computer over USB, we use the `print()` / `println()` function.
403
-
404
-
```arduino
405
-
Serial.print(); //prints content
406
-
Serial.println(); //prints content + new line
407
-
```
408
-
409
-
And to write something using D0/D1 (UART), we can use the following command:
410
-
411
-
```arduino
412
-
Serial1.write("Hello world!");
413
-
```
414
-
415
-
To read incoming data, we can use a while loop() to read each individual character and add it to a string.
416
-
417
-
```arduino
418
-
while(Serial1.available()){
419
-
delay(2);
420
-
char c = Serial1.read();
421
-
incoming += c;
422
-
}
423
-
```
424
-
425
357
## Test Pads
426
358
427
359
There are several test pads on the bottom side of the Nano ESP32. See the image below:
0 commit comments