Skip to content

Commit 8b01e15

Browse files
committed
add pins to user manual
1 parent 163921d commit 8b01e15

File tree

1 file changed

+187
-0
lines changed
  • content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual

1 file changed

+187
-0
lines changed

content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/content.md

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,193 @@ To upload the sketch to the board, click the **Verify** button to compile the sk
194194

195195
You should see the built-in orange user LED of your Nano 33 BLE Sense Rev2 board turn on for one second, then turn off for one second, repeating this cycle continuously.
196196

197+
## LEDs
198+
199+
This user manual section covers the Nano 33 BLE Sense Rev2 built-in LEDs, showing their main hardware and software characteristics.
200+
201+
### RGB LED
202+
203+
The Nano 33 BLE Sense Rev2 features a built-in RGB LED that can be used as a visual feedback indicator for the user.
204+
205+
The built-in RGB LED can be accessed through the following macro definitions:
206+
207+
| **Built-in LED** | **Macro Definition** |
208+
| :--------------: | :------------------: |
209+
| Red LED | `LEDR` |
210+
| Green LED | `LEDG` |
211+
| Blue LED | `LEDB` |
212+
213+
The following example sketch each of the RGB LED colors at an interval of 500 ms:
214+
215+
```arduino
216+
/**
217+
RGB LED Example for the Arduino Nano 33 BLE Sense BLE Sense Rev2
218+
Name: nano_33_ble_sense_rev2_rgb_led.ino
219+
Purpose: This sketch demonstrates how to control the built-in
220+
RGB LED of the Arduino Nano 33 BLE Sense Rev2 board.
221+
222+
*/
223+
224+
void setup() {
225+
// Initialize serial communication and wait up to 2.5 seconds for a connection
226+
Serial.begin(115200);
227+
for (auto startNow = millis() + 2500; !Serial && millis() < startNow; delay(500));
228+
229+
// Initialize LEDR, LEDG and LEDB as outputs
230+
pinMode(LEDR, OUTPUT);
231+
pinMode(LEDG, OUTPUT);
232+
pinMode(LEDB, OUTPUT);
233+
234+
// Turn off all LEDs initially
235+
digitalWrite(LEDR, LOW);
236+
digitalWrite(LEDG, LOW);
237+
digitalWrite(LEDB, LOW);
238+
239+
Serial.println("- Arduino Nano 33 BLE Sense Rev2 - RGB LED Example started...");
240+
}
241+
242+
void loop() {
243+
// Turn on the built-in red LED and turn off the rest
244+
digitalWrite(LEDR, HIGH);
245+
digitalWrite(LEDG, LOW);
246+
digitalWrite(LEDB, LOW);
247+
Serial.println("- Red LED on!");
248+
delay(500);
249+
250+
// Turn on the built-in green LED and turn off the rest
251+
digitalWrite(LEDR, LOW);
252+
digitalWrite(LEDG, HIGH);
253+
digitalWrite(LEDB, LOW);
254+
Serial.println("- Green LED on!");
255+
delay(500);
256+
257+
// Turn on the built-in blue LED and turn off the rest
258+
digitalWrite(LEDR, LOW);
259+
digitalWrite(LEDG, LOW);
260+
digitalWrite(LEDB, HIGH);
261+
Serial.println("- Blue LED on!");
262+
delay(500);
263+
264+
// Turn off all LEDs
265+
digitalWrite(LEDR, LOW);
266+
digitalWrite(LEDG, LOW);
267+
digitalWrite(LEDB, LOW);
268+
Serial.println("- All LEDs off!");
269+
delay(500);
270+
}
271+
```
272+
273+
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.
274+
275+
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.
276+
277+
### Orange LED
278+
279+
The Nano 33 BLE Sense Rev2 also features a built-in orange user LED that can be used for basic status indications and debugging purposes.
280+
281+
The built-in user LED can be accessed through the following macro definition:
282+
283+
| **Built-in LED** | **Macro Definition** | **Microcontroller Pin** |
284+
| :--------------: | :------------------: | :---------------------: |
285+
| Orange User LED | `LED_BUILTIN` | `P0.13` |
286+
287+
## Pins
288+
289+
This user manual section provides comprehensive information about the Nano 33 BLE Sense Rev2's pin capabilities and functionality. Understanding the board's pins capabilities and configurations is important for making the most of your projects with the Nano 33 BLE Sense Rev2 board.
290+
291+
### Pins Overview
292+
293+
The Nano 33 BLE Sense Rev2 features a total of **20 accessible pins** arranged in the classic Nano form factor, maintaining compatibility with existing Nano shields and breadboard layouts. These pins provide various functionalities including digital I/O, analog input, PWM output and several communication protocols.
294+
295+
![Nano 33 BLE Sense Rev2 pinout overview](assets/simple-pinout.png)
296+
297+
### Pins Specifications and Characteristics
298+
299+
The Nano 33 BLE Sense Rev2's pins are organized into the following categories:
300+
301+
| **Pin Type** | **Count** | **Pin Numbers** | **Primary Functions** |
302+
| :--------------: | :-------: | :-----------------------: | :----------------------------------: |
303+
| **Digital Pins** | 14 | `D0` - `D13` | Digital I/O, PWM (5 pins), SPI, UART |
304+
| **Analog Pins** | 8 | `A0` - `A7` | Analog input, Digital I/O, I²C |
305+
| **Power Pins** | 4 | `VIN`, `5V`, `3V3`, `GND` | Power supply and ground |
306+
| **Special Pins** | 2 | `RESET` | System control |
307+
308+
The Nano 33 BLE Sense Rev2 offers several advanced pin capabilities including multi-function pins that can serve multiple purposes depending on your project needs.
309+
310+
The following table shows the electrical specifications and operating limits for all pins on the Nano 33 BLE Sense Rev2 board:
311+
312+
| **Specification** | **Value** | **Notes** |
313+
| :---------------------: | :----------: | :----------------------------------------------: |
314+
| **Operating Voltage** | +3.3 VDC | Logic level for all digital pins |
315+
| **Input Voltage Range** | 0 - +3.3 VDC | Assure that this limit of 3.3V is never exceeded |
316+
| **Max Current per Pin** | 10 mA | Source/sink current limit |
317+
| **Max Total Current** | 200 mA | Combined current for all pins |
318+
319+
***__Important safety considerations when working with the Nano R4 pins:__ The microcontroller on the Arduino Nano 33 BLE Sense Rev2 runs at 3.3V, which means that you must never apply more than 3.3V to its Digital and Analog pins. Care must be taken when connecting sensors and actuators to assure that this limit of 3.3V is never exceeded. Connecting higher voltage signals, like the 5V commonly used with the other Arduino boards, will damage the Arduino Nano 33 BLE Sense Rev2.***
320+
321+
**_To avoid such risk with existing projects, where you should be able to pull out a Nano and replace it with the new Nano 33 BLE Sense Rev2, we have the 5V pin on the header, positioned between RST and A7 that is not connected as default factory setting. This means that if you have a design that takes 5V from that pin, it won't work immediately, as a precaution we put in place to draw your attention to the 3.3V compliance on digital and analog inputs._**
322+
323+
**_5V on that pin is available only when two conditions are met: you make a solder bridge on the two pads marked as VUSB and you power the Nano 33 BLE Sense Rev2 through the USB port. If you power the board from the VIN pin, you won't get any regulated 5V and therefore even if you do the solder bridge, nothing will come out of that 5V pin. The 3.3V, on the other hand, is always available and supports enough current to drive your sensors. Please make your designs so that sensors and actuators are driven with 3.3V and work with 3.3V digital IO levels. 5V is now an option for many modules and 3.3V is becoming the standard voltage for electronic ICs._**
324+
325+
### Digital Pins
326+
327+
The Nano 33 BLE Sense Rev2 features 14 digital pins (`D0` to `D13`) that can be configured as either digital inputs or digital outputs. These pins operate at +3.3 VDC logic levels and can source or sink up to 10 mA of current per pin. Digital pins are the foundation of most Arduino projects, allowing you to control LEDs, read button states, interface with sensors and communicate with other devices.
328+
329+
The Nano 33 BLE Sense Rev2 digital pins provide the following functionality:
330+
331+
| **Arduino Pin** | **Microcontroller Pin** | **Additional Functions** | **Special Features** |
332+
| :-------------: | :---------------------: | :----------------------: | :------------------: |
333+
| `D0` | `P1.03` | UART TX | Serial communication |
334+
| `D1` | `P1.10` | UART RX | Serial communication |
335+
| `D2` | `P1.11` | PWM | External interrupt |
336+
| `D3` | `P1.12` | PWM | External interrupt |
337+
| `D4` | `P1.15` | PWM | External interrupt |
338+
| `D5` | `P1.13` | PWM | External interrupt |
339+
| `D6` | `P1.14` | PWM | External interrupt |
340+
| `D7` | `P1.23` | PWM | External interrupt |
341+
| `D8` | `P1.21` | PWM | External interrupt |
342+
| `D9` | `P1.27` | PWM | External interrupt |
343+
| `D10` | `P1.02` | SPI CS, PWM | SPI communication |
344+
| `D11` | `P1.01` | SPI MOSI, PWM | SPI communication |
345+
| `D12` | `P1.08` | SPI MISO, PWM | SPI communication |
346+
| `D13` | `P0.13` | SPI SCK, PWM | SPI communication |
347+
348+
***__Important note:__ Pins `D0` and `D1` are used for serial communication (UART) and should be avoided for general digital I/O when using Serial communication. Pins `D10`, `D11`, `D12` and `D13` are used for SPI communication.***
349+
350+
The Nano 33 BLE Sense Rev2's digital pins offer the following specifications:
351+
352+
| **Specification** | **Value** | **Notes** |
353+
| :------------------: | :------------: | :---------------------------: |
354+
| Logic Voltage | +3.3 VDC | `HIGH` and `LOW` logic levels |
355+
| Input Voltage | 0 to +3.3 VDC | +3.3 VDC tolerant inputs |
356+
| Max Current (Source) | 10 mA | Per pin source current |
357+
| Max Current (Sink) | 10 mA | Per pin sink current |
358+
| Total Max Current | 200 mA | Combined for all pins |
359+
| Input Resistance | 20-50 kΩ | Internal pull-up resistor |
360+
| Digital `HIGH` | +2 to +3.3 VDC | Minimum voltage for `HIGH` |
361+
| Digital `LOW` | 0 to +1.5 VDC | Maximum voltage for `LOW` |
362+
363+
Digital pins can be configured and controlled using the following basic Arduino functions.
364+
365+
You can configure a pin's mode using the `pinMode()` function:
366+
367+
```arduino
368+
pinMode(pin, mode);
369+
```
370+
371+
To write a digital value to an output pin, use the `digitalWrite()` function:
372+
373+
```arduino
374+
digitalWrite(pin, value);
375+
```
376+
377+
To read the state of a digital input pin, use the `digitalRead()` function:
378+
379+
```arduino
380+
digitalRead(pin);
381+
```
382+
383+
The available pin modes are `OUTPUT` for digital output, `INPUT` for digital input with high impedance, and `INPUT_PULLUP` for digital input with internal pull-up resistor enabled. Digital output values can be `HIGH` (+3.3 VDC) or `LOW` (0 VDC), and digital input readings will return `HIGH` or `LOW` based on the voltage level detected on the pin.
197384
## Support
198385

199386
If you encounter any issues or have questions while working with your Nano 33 BLE Sense Rev2 board, we provide various support resources to help you find answers and solutions.

0 commit comments

Comments
 (0)