@@ -1272,30 +1272,30 @@ void loop() {
1272
1272
1273
1273
The Nano Matter has ** 22 digital pins** , mapped as follows:
1274
1274
1275
- | ** Microcontroller Pin** | ** Arduino Pin Mapping** | ** Pin Functionality** |
1276
- | :-----------------------:| :-----------------------:| :---------------------:|
1277
- | PB00 | A0 / DAC0 | GPIO / ADC / DAC |
1278
- | PB02 | A1 / DAC2 | GPIO / ADC / DAC |
1279
- | PB05 | A2 | GPIO / ADC |
1280
- | PC00 | A3 | GPIO / ADC |
1281
- | PA06 | A4 / SDA | I2C / GPIO / ADC |
1282
- | PA07 | A5 / SCL | I2C / GPIO / ADC |
1283
- | PB01 | A6 / DAC1 | GPIO / ADC / DAC |
1284
- | PB03 | A7 / DAC3 | GPIO / ADC / DAC |
1285
- | PB04 | D13 / SCK | SPI / GPIO / ADC |
1286
- | PA08 | D12 / MISO | SPI / GPIO / ADC |
1287
- | PA09 | D11 / MOSI | SPI / GPIO / ADC |
1288
- | PD05 | D10 / SS | SPI / GPIO |
1289
- | PD04 | D9 | GPIO |
1290
- | PD03 | D8 | GPIO / ADC |
1291
- | PD02 | D7 | GPIO / ADC |
1292
- | PC09 | D6 | GPIO / ADC |
1293
- | PC08 | D5 / SCL1 | I2C / GPIO / ADC |
1294
- | PC07 | D4 / SDA1 | I2C / GPIO / ADC |
1295
- | PC06 | D3 | GPIO / ADC |
1296
- | PA03 | D2 / SCK1 | SPI / GPIO |
1297
- | PA05 | D1 / PIN_SERIAL_RX / MISO1 | UART / SPI / GPIO / ADC |
1298
- | PA04 | D0 / PIN_SERIAL_TX / MOSI1 | UART / SPI / GPIO / ADC |
1275
+ | ** Microcontroller Pin** | ** Arduino Pin Mapping** | ** Pin Functionality** |
1276
+ | :-----------------------:| :--------------------------- :| :-- ---------------------:|
1277
+ | PB00 | A0 / DAC0 | GPIO / ADC / DAC |
1278
+ | PB02 | A1 / DAC2 | GPIO / ADC / DAC |
1279
+ | PB05 | A2 | GPIO / ADC |
1280
+ | PC00 | A3 | GPIO / ADC |
1281
+ | PA06 | A4 / SDA | I2C / GPIO / ADC |
1282
+ | PA07 | A5 / SCL | I2C / GPIO / ADC |
1283
+ | PB01 | A6 / DAC1 | GPIO / ADC / DAC |
1284
+ | PB03 | A7 / DAC3 | GPIO / ADC / DAC |
1285
+ | PB04 | D13 / SCK | SPI / GPIO / ADC |
1286
+ | PA08 | D12 / MISO | SPI / GPIO / ADC |
1287
+ | PA09 | D11 / MOSI | SPI / GPIO / ADC |
1288
+ | PD05 | D10 / SS | SPI / GPIO |
1289
+ | PD04 | D9 | GPIO |
1290
+ | PD03 | D8 | GPIO / ADC |
1291
+ | PD02 | D7 | GPIO / ADC |
1292
+ | PC09 | D6 | GPIO / ADC |
1293
+ | PC08 | D5 / SCL1 | I2C / GPIO / ADC |
1294
+ | PC07 | D4 / SDA1 | I2C / GPIO / ADC |
1295
+ | PC06 | D3 / SS1 | GPIO / SPI / ADC |
1296
+ | PA03 | D2 / SCK1 | SPI / GPIO |
1297
+ | PA05 | D1 / PIN_SERIAL_RX1 / MISO1 | UART / SPI / GPIO / ADC |
1298
+ | PA04 | D0 / PIN_SERIAL_TX1 / MOSI1 | UART / SPI / GPIO / ADC |
1299
1299
1300
1300
The digital pins of the Nano Matter can be used as inputs or outputs through the built-in functions of the Arduino programming language.
1301
1301
@@ -1329,14 +1329,14 @@ digitalWrite(pin, HIGH);
1329
1329
digitalWrite(pin, LOW);
1330
1330
```
1331
1331
1332
- The example code shown below uses digital pin ` 5 ` to control an LED and reads the state of a button connected to digital pin ` 4 ` :
1332
+ The example code shown below uses digital pin ` D5 ` to control an LED and reads the state of a button connected to digital pin ` D4 ` :
1333
1333
1334
1334
![ Digital I/O example wiring] ( assets/gpio-wiring.png )
1335
1335
1336
1336
``` arduino
1337
1337
// Define button and LED pin
1338
- int buttonPin = 4 ;
1339
- int ledPin = 5 ;
1338
+ int buttonPin = D4 ;
1339
+ int ledPin = D5 ;
1340
1340
1341
1341
// Variable to store the button state
1342
1342
int buttonState = 0;
@@ -1373,7 +1373,7 @@ void loop() {
1373
1373
1374
1374
All the digital and analog pins of the Nano Matter can be used as PWM (Pulse Width Modulation) pins.
1375
1375
1376
- *** You can only use 5 PWMs outputs simultaneously.***
1376
+ *** You can only use 5 PWM outputs simultaneously.***
1377
1377
1378
1378
This functionality can be used with the built-in function ` analogWrite() ` as shown below:
1379
1379
@@ -1392,7 +1392,7 @@ Here is an example of how to create a **1 kHz** variable duty-cycle PWM signal:
1392
1392
1393
1393
``` arduino
1394
1394
const int analogInPin = A0; // Analog input pin that the potentiometer is attached to
1395
- const int pwmOutPin = 13 ; // PWM output pin
1395
+ const int pwmOutPin = D13 ; // PWM output pin
1396
1396
1397
1397
int sensorValue = 0; // value read from the pot
1398
1398
int outputValue = 0; // value output to the PWM (analog out)
@@ -1433,7 +1433,7 @@ PWM.frequency_mode(output_pin, frequency);
1433
1433
Here is an example of how to create a ** 10 kHz** fixed duty-cycle PWM signal:
1434
1434
1435
1435
``` arduino
1436
- const int analogOutPin = 13 ; // PWM output pin to use
1436
+ const int analogOutPin = D13 ; // PWM output pin to use
1437
1437
1438
1438
void setup() {
1439
1439
analogWriteResolution(12);
@@ -1448,35 +1448,36 @@ void loop() {
1448
1448
1449
1449
### Analog Input Pins (ADC)
1450
1450
1451
- The Nano Matter has ** 19 analog input pins** , mapped as follows:
1452
-
1453
- | ** Microcontroller Pin** | ** Arduino Pin Mapping** | ** Pin Functionality** |
1454
- | :-----------------------:| :-----------------------:| :---------------------:|
1455
- | PB00 | A0 | GPIO / ADC / DAC |
1456
- | PB02 | A1 | GPIO / ADC |
1457
- | PB05 | A2 | GPIO / ADC |
1458
- | PC00 | A3 | GPIO / ADC |
1459
- | PA06 | A4 / SDA | I2C / GPIO / ADC |
1460
- | PA07 | A5 / SCL | I2C / GPIO / ADC |
1461
- | PB01 | A6 | GPIO / ADC / DAC |
1462
- | PB03 | A7 | GPIO / ADC |
1463
- | PB04 | D13 / SCK | SPI / GPIO / ADC |
1464
- | PA08 | D12 / MISO | SPI / GPIO / ADC |
1465
- | PA09 | D11 / MOSI | SPI / GPIO / ADC |
1466
- | PD03 | D8 | GPIO / ADC |
1467
- | PD02 | D7 | GPIO / ADC |
1468
- | PC09 | D6 | GPIO / ADC |
1469
- | PC08 | D5 / SCL1 | I2C / GPIO / ADC |
1470
- | PC07 | D4 / SDA1 | I2C / GPIO / ADC |
1471
- | PC06 | D3 | GPIO / ADC |
1472
- | PA05 | D1 / PIN_SERIAL_RX / MISO1 | UART / GPIO / ADC / SPI |
1473
- | PA04 | D0 / PIN_SERIAL_TX / MOSI1 | UART / GPIO / ADC / SPI |
1474
-
1475
- *** Digital I/O's can also be used as analog inputs except for ` D10 ` ,` D9 ` and ` D2 ` .***
1451
+ The Nano Matter has ** 20 analog input pins** , mapped as follows:
1452
+
1453
+ | ** Microcontroller Pin** | ** Arduino Pin Mapping** | ** Pin Functionality** |
1454
+ | :-----------------------:| :---------------------------:| :-----------------------:|
1455
+ | PB00 | A0 / DAC0 | GPIO / ADC / DAC |
1456
+ | PB02 | A1 / DAC2 | GPIO / ADC / DAC |
1457
+ | PB05 | A2 | GPIO / ADC |
1458
+ | PC00 | A3 | GPIO / ADC |
1459
+ | PA06 | A4 / SDA | I2C / GPIO / ADC |
1460
+ | PA07 | A5 / SCL | I2C / GPIO / ADC |
1461
+ | PB01 | A6 / DAC1 | GPIO / ADC / DAC |
1462
+ | PB03 | A7 / DAC3 | GPIO / ADC / DAC |
1463
+ | PB04 | D13 / SCK | SPI / GPIO / ADC |
1464
+ | PA08 | D12 / MISO | SPI / GPIO / ADC |
1465
+ | PA09 | D11 / MOSI | SPI / GPIO / ADC |
1466
+ | PD03 | D8 | GPIO / ADC |
1467
+ | PD02 | D7 | GPIO / ADC |
1468
+ | PC09 | D6 | GPIO / ADC |
1469
+ | PC08 | D5 / SCL1 | I2C / GPIO / ADC |
1470
+ | PC07 | D4 / SDA1 | I2C / GPIO / ADC |
1471
+ | PC06 | D3 / SS1 | GPIO / SPI / ADC |
1472
+ | PA03 | D2 / SCK1 | SPI / GPIO |
1473
+ | PA05 | D1 / PIN_SERIAL_RX1 / MISO1 | UART / SPI / GPIO / ADC |
1474
+ | PA04 | D0 / PIN_SERIAL_TX1 / MOSI1 | UART / SPI / GPIO / ADC |
1475
+
1476
+ *** Digital I/O's can also be used as analog inputs except for ` D9 ` and ` D10 ` .***
1476
1477
1477
1478
Analog input pins can be used through the built-in functions of the Arduino programming language.
1478
1479
1479
- Nano Matter ADC resolution is fixed to 12 bits and cannot be changed by the user.
1480
+ Nano Matter ADC resolution is fixed to ** 12 bits** and cannot be changed by the user.
1480
1481
1481
1482
The Nano Matter ADC reference voltage is 3.3 V by default, it can be configured using the function ` analogReference() ` with the following arguments:
1482
1483
@@ -1519,7 +1520,7 @@ void loop() {
1519
1520
1520
1521
### Analog Output Pins (DAC)
1521
1522
1522
- The Nano Matter has ** one DAC ** with two channels, mapped as follows:
1523
+ The Nano Matter has ** two DACs ** with two channels each , mapped as follows:
1523
1524
1524
1525
| ** Microcontroller Pin** | ** Arduino Name** | ** Board Pin Output** | ** Peripheral** |
1525
1526
| :-----------------------:| :----------------:| :--------------------:| :--------------:|
@@ -1530,7 +1531,7 @@ The Nano Matter has **one DAC** with two channels, mapped as follows:
1530
1531
1531
1532
The digital-to-analog converters of the Nano Matter can be used as outputs through the built-in functions of the Arduino programming language.
1532
1533
1533
- The DAC output resolution can be configured using the ` analogWriteResolution() ` function as follows:
1534
+ The DAC output resolution can be configured from 8 to 12 bits using the ` analogWriteResolution() ` function as follows:
1534
1535
1535
1536
``` arduino
1536
1537
analogWriteResolution(12); // enter the desired resolution in bits (8,10,12)
@@ -1631,6 +1632,7 @@ The Nano Matter supports SPI communication, which enables data transmission betw
1631
1632
| PA04 | MOSI1 or D0 |
1632
1633
| PA05 | MISO1 or D1 |
1633
1634
| PA03 | SCK1 or D2 |
1635
+ | PC06 | SS1 or D3 |
1634
1636
1635
1637
Please, refer to the [ board pinout section] ( #pinout ) of the user manual to localize them on the board.
1636
1638
@@ -1764,17 +1766,21 @@ while (Wire.available()) {
1764
1766
1765
1767
### UART
1766
1768
1767
- The pins used in the Nano Matter for the UART communication protocol are the following:
1769
+ The Nano Matter features two UARTs. The pins used in the Nano Matter for the UART communication protocol are the following:
1768
1770
1769
1771
| ** Microcontroller Pin** | ** Arduino Pin Mapping** |
1770
1772
| :-----------------------:| :-----------------------:|
1771
- | PA05 | PIN_SERIAL_RX or D1 |
1772
- | PA04 | PIN_SERIAL_TX or D0 |
1773
+ | PA05 | PIN_SERIAL_RX1 or D1 |
1774
+ | PA04 | PIN_SERIAL_TX1 or D0 |
1775
+ | PC05 | PIN_SERIAL_RX (internal) |
1776
+ | PC04 | PIN_SERIAL_TX (internal) |
1773
1777
1774
1778
Please, refer to the [ board pinout section] ( #pinout ) of the user manual to localize them on the board.
1775
1779
1776
1780
*** You can not use __ UART__ and __ SPI1__ interfaces at the same time because they share pins.***
1777
1781
1782
+ *** Use Serial.begin() for UART0 (internal) and Serial1.begin() for UART1 (exposed).***
1783
+
1778
1784
To begin with UART communication, you will need to configure it first. In the ` setup() ` function, set the baud rate (bits per second) for UART communication:
1779
1785
1780
1786
``` arduino
0 commit comments