diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/compatibility.yml b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/compatibility.yml index e2b8ab9d94..23f72f9a26 100644 --- a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/compatibility.yml +++ b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/compatibility.yml @@ -5,4 +5,6 @@ software: hardware: boards: ~ carriers: ~ - shields: ~ + shields: + - nano-connector-carrier + - nano-screw-terminal-adapter diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/Nano_33_BLE_Sense_Rev2_Block_Diagram.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/Nano_33_BLE_Sense_Rev2_Block_Diagram.png new file mode 100644 index 0000000000..749e18e53b Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/Nano_33_BLE_Sense_Rev2_Block_Diagram.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/Nano_33_BLE_Sense_Rev2_Board_Components_Peripherals.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/Nano_33_BLE_Sense_Rev2_Board_Components_Peripherals.png new file mode 100644 index 0000000000..4d98ec7979 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/Nano_33_BLE_Sense_Rev2_Board_Components_Peripherals.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/Nano_33_BLE_Sense_Rev2_Board_Connectors.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/Nano_33_BLE_Sense_Rev2_Board_Connectors.png new file mode 100644 index 0000000000..40e5679164 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/Nano_33_BLE_Sense_Rev2_Board_Connectors.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/Nano_33_BLE_Sense_Rev2_Outline.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/Nano_33_BLE_Sense_Rev2_Outline.png new file mode 100644 index 0000000000..8070867a92 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/Nano_33_BLE_Sense_Rev2_Outline.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/Nano_33_BLE_Sense_Rev2_Pinout.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/Nano_33_BLE_Sense_Rev2_Pinout.png new file mode 100644 index 0000000000..ee03f9ca11 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/Nano_33_BLE_Sense_Rev2_Pinout.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/Nano_33_BLE_Sense_Rev2_Power_Tree.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/Nano_33_BLE_Sense_Rev2_Power_Tree.png new file mode 100644 index 0000000000..28ee909724 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/Nano_33_BLE_Sense_Rev2_Power_Tree.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/blesenseRev2_topo.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/blesenseRev2_topo.png deleted file mode 100644 index 1e5092a2b7..0000000000 Binary files a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/blesenseRev2_topo.png and /dev/null differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/outline.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/outline.png deleted file mode 100644 index 9ebede92b5..0000000000 Binary files a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/outline.png and /dev/null differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/pinout.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/pinout.png deleted file mode 100644 index 47d013e5f0..0000000000 Binary files a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/pinout.png and /dev/null differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/powerTree.svg b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/powerTree.svg deleted file mode 100644 index 1ac49e4a7e..0000000000 --- a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/powerTree.svg +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/topologyBot.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/topologyBot.png deleted file mode 100644 index d652b8745c..0000000000 Binary files a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/assets/topologyBot.png and /dev/null differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/datasheet.md b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/datasheet.md index 9d5ce01052..5c9f8143a2 100644 --- a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/datasheet.md +++ b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/datasheet/datasheet.md @@ -2,291 +2,228 @@ identifier: ABX00069 title: Arduino® Nano 33 BLE Sense Rev2 type: maker +variant: 'Datasheet' +author: José Bagur --- ![](assets/featured.jpg) # Description -The **Arduino® Nano 33 BLE Sense Rev2**\* is a miniature sized module containing a NINA B306 module, based on Nordic nRF52480 and containing an Arm® Cortex®-M4F. The BMI270 and BMM150 jointly provide a 9 axis IMU. The module can either be mounted as a DIP component (when mounting pin headers), or as a SMT component, directly soldering it via the castellated pads. +

Experience the power of edge computing with the Arduino® Nano 33 BLE Sense Rev2. This miniature-sized module combines the NINA-B306 module, based on Nordic nRF52840 with an Arm® Cortex®-M4F processor, with an extensive array of onboard sensors. The board integrates a 9-axis IMU (BMI270 and BMM150), environmental sensors, and wireless connectivity, making it ideal for machine learning applications, environmental monitoring, and IoT prototyping within the familiar Arduino ecosystem.

-\*The Nano 33 BLE Sense Rev2 product has two SKUs: -* Without headers (ABX00069) -* With headers (ABX00070) +

The Nano 33 BLE Sense Rev2 is available in two variants: without headers (SKU: ABX00069) and with headers (SKU: ABX00070).

# Target Areas -Maker, enhancements, IoT application - -# Features - -- **NINA B306 Module** - - **Processor** - - 64 MHz Arm® Cortex®-M4F (with FPU) - - 1 MB Flash + 256 kB RAM - - **Bluetooth® 5 multiprotocol radio** - - 2 Mbps - - CSA #2 - - Advertising Extensions - - Long Range - - +8 dBm TX power - - -95 dBm sensitivity - - 4.8 mA in TX (0 dBm) - - 4.6 mA in RX (1 Mbps) - - Integrated balun with 50 Ω single-ended output - - IEEE 802.15.4 radio support - - Thread - - Zigbee - - **Peripherals** - - Full-speed 12 Mbps USB - - NFC-A tag - - Arm CryptoCell CC310 security subsystem - - QSPI/SPI/TWI/I2S/PDM/QDEC - - High speed 32 MHz SPI - - Quad SPI interface 32 MHz - - EasyDMA for all digital interfaces - - 12-bit 200 ksps ADC - - 128 bit AES/ECB/CCM/AAR co-processor -- **BMI270** 6-axis IMU (Accelerometer and Gyroscope) - - 16-bit - - 3-axis accelerometer with ±2g/±4g/±8g/±16g range - - 3-axis gyroscope with ±125dps/±250dps/±500dps/±1000dps/±2000dps range -- **BMM150** 3-axis IMU (Magnetometer) - - 3-axis digital geomagnetic sensor - - 0.3μT resolution - - ±1300μT (x,y-axis), ±2500μT (z-axis) -- **LPS22HB** (Barometer and temperature sensor) - - 260 to 1260 hPa absolute pressure range with 24 bit precision - - High overpressure capability: 20x full-scale - - Embedded temperature compensation - - 16-bit temperature data output - - 1 Hz to 75 Hz output data rateInterrupt functions: Data Ready, FIFO flags, pressure thresholds -- **HS3003** Temperature & humidity sensor - - 0-100% relative humidity range - - Humidity accuracy: ±1.5%RH, typical (HS3001, 10 to 90%RH,25°C) - - Temperature sensor accuracy: ±0.1°C, typical - - Up to 14-bit humidity and temperature output data -- **APDS-9960** (Digital proximity, Ambient light, RGB and Gesture Sensor) - - Ambient Light and RGB Color Sensing with UV and IR blocking filters - - Very high sensitivity – Ideally suited for operation behind dark glass - - Proximity Sensing with Ambient light rejection - - Complex Gesture Sensing -- **MP34DT06JTR** (Digital Microphone) - - AOP = 122.5 dbSPL - - 64 dB signal-to-noise ratio - - Omnidirectional sensitivity - - –26 dBFS ± 3 dB sensitivity -- **MP2322** DC-DC - - Regulates input voltage from up to 21V with a minimum of 65% efficiency @minimum load - - More than 85% efficiency @12V +Environmental sensing, edge AI, IoT applications # Contents +## Application Examples -## The Board +

The Arduino Nano 33 BLE Sense Rev2, with its extensive sensor suite and wireless capabilities, provides versatile solutions for various sectors. Below are some application examples that demonstrate its potential:

-As all Nano form factor boards, Nano 33 BLE Sense Rev2 does not have a battery charger but can be powered through USB or headers. +- **Industrial automation**: The Nano 33 BLE Sense Rev2 enhances industrial processes through intelligent sensing and wireless connectivity, enabling predictive maintenance and environmental monitoring. + -

Predictive maintenance systems: Deploy the board's IMU and environmental sensors to monitor equipment vibrations, temperature anomalies, and humidity levels, enabling early detection of potential failures in industrial machinery.

+ -

Workplace safety monitoring: Use the onboard gas, temperature, and humidity sensors to continuously monitor environmental conditions in industrial facilities, ensuring compliance with safety regulations and worker protection standards.

+ -

Asset tracking and monitoring: Leverage the BLE connectivity and motion sensors to track valuable assets and equipment in warehouses and manufacturing facilities, providing real-time location and condition data.

-**NOTE:** Nano 33 BLE Sense Rev2 only supports 3.3V I/Os and is **NOT** 5V tolerant so please make sure you are not directly connecting 5V signals to this board or it will be damaged. Also, as opposed to Arduino Nano boards that support 5V operation, the 5V pin does NOT supply voltage but is rather connected, through a jumper, to the USB power input. +- **Building automation**: In smart building applications, the Nano 33 BLE Sense Rev2 facilitates the creation of intelligent systems that improve comfort, safety, and energy efficiency. + -

Indoor air quality management: Integrate the board's environmental sensors to monitor CO2 levels, humidity, and temperature, automatically adjusting HVAC systems to maintain optimal indoor conditions.

+ -

Gesture-controlled interfaces: Implement touchless control systems using the APDS-9960 gesture sensor for lighting, doors, and other building systems, enhancing hygiene and user experience.

+ -

Presence detection and space optimization: Use the proximity sensor and BLE beacons to track occupancy patterns, optimizing energy usage and space allocation in office buildings.

-### Ratings +- **Prototyping**: The Nano 33 BLE Sense Rev2 offers a comprehensive platform for rapid development and testing of IoT and machine learning applications. + -

Edge AI development platform: With its powerful Arm® Cortex®-M4F processor and sensor array, the board provides an ideal platform for developing and deploying edge AI models for voice recognition, anomaly detection, and gesture classification.

+ -

Environmental monitoring stations: Create complete weather and environmental monitoring systems using the integrated temperature, humidity, pressure, and light sensors without additional hardware.

+ -

Wearable device prototyping: The compact form factor and BLE connectivity make it perfect for developing fitness trackers, health monitors, and other wearable applications.

-#### Recommended Operating Conditions +## Features +### General Specifications Overview -| Symbol | Description | Min | Max | -|--------|--------------------------------------------------|-----------------|----------------| -| | Conservative thermal limits for the whole board: | -40 °C ( 40 °F) | 85°C ( 185 °F) | +

The Nano 33 BLE Sense Rev2 represents an evolution of the classic Arduino Nano form factor, integrating advanced wireless connectivity and a extensive sensor suite. It features the powerful nRF52840 microcontroller with native USB support and Bluetooth® Low Energy 5.0 capabilities, making it ideal for IoT and machine learning applications at the edge.

-### Power Consumption +The main features are highlighted in the table shown below. -| Symbol | Description | Min | Typ | Max | Unit | -|--------|-------------------------------------|-----|-----|-----|------| -| PBL | Power consumption with busy loop | | TBC | | mW | -| PLP | Power consumption in low power mode | | TBC | | mW | -| PMAX | Maximum Power Consumption | | TBC | | mW | + +| **Feature** | **Description** | +|--------------------------------------|-----------------------------------------------------------------------------------------------------------| +| Microcontroller | 64 MHz Arm® Cortex®-M4F (nRF52840) | +| Internal Memory | 1 MB Flash and 256 kB SRAM | +| Power Supply | Various options for easily powering the board: USB connector (5V), VIN pin (5-18V), or direct 3.3V supply | +| USB Connectivity | Full-speed USB 2.0 (up to 12 Mbps) via micro USB connector | +| Wireless Connectivity | Bluetooth® Low Energy 5.0 via NINA-B306 module | +| Digital Peripherals | GPIO (21x), PWM (5x), UART (1x), I2C (1x), SPI (1x) | +| Analog Peripherals | 12-bit ADC (8x), 12-bit DAC (1x on A0) | +| Onboard 9-axis IMU | BMI270 (6-axis accelerometer and gyroscope) + BMM150 (3-axis magnetometer) | +| Onboard Environmental Sensors | HS3003 (humidity and temperature), LPS22HB (pressure and temperature) | +| Onboard Gesture and Proximity Sensor | APDS-9960 (gesture, proximity, ambient light, and RGB color detection) | +| Onboard Digital Microphone | MP34DT06JTR MEMS microphone | +| Onboard LEDs | RGB LED and orange LED for user feedback | +| Operating Temperature | -40°C to +85°C | +| Dimensions | 18 mm x 45 mm | +| Weight | 5 g | +| Pinout Features | Castellated pads allow the board to be surface-mount soldered on a custom carrier | - + -## Functional Overview +### Accessories -### Board Topology +- Arduino Screw Terminal Adapter (SKU: ASX00037) +- Arduino Connector Carrier (SKU: ASX00061) -Top: -![Board topology top](assets/blesenseRev2_topo.png) +### Related Products -| **Ref.** | **Description** | **Ref.** | **Description** | -|----------|---------------------------------------------------|----------|----------------------------------| -| U1 | NINA-B306 Module Bluetooth® Low Energy 5.0 Module | U6 | MP2322GQH Step Down Converter | -| U2 | BMI270 Sensor IMU | PB1 | IT-1185AP1C-160G-GTR Push button | -| U3 | MP34DT06JTR MEMS Microphone | U8 | HS3003 Humidity Sensor | -| U7 | BMM150 Magnetometer IC | DL1 | Led L | -| U5 | APDS-9660 Ambient Module | DL2 | Led Power | -|U9|LPS22HBTR Pressure Sensor IC||| +- Arduino Portenta H7 (SKU: ABX00042) +- Arduino Portenta C33 (SKU: ABX00074) +- Arduino MKR WiFi 1010 (SKU: ABX00023) +- Arduino Nano 33 IoT (SKU: ABX00027) +- Arduino Nano ESP32 (SKU: ABX00092) +- Arduino Nano RP2040 Connect (SKU: ABX00052) +- Arduino UNO R4 WiFi (SKU: ABX00087) -Bottom: -![Board topology bot](assets/topologyBot.png) + -| **Ref.** | **Description** | **Ref.** | **Description** | -|----------|-----------------|----------|-----------------| -| SJ1 | VUSB Jumper | SJ2 | D7 Jumper | -| SJ3 | 3v3 Jumper | SJ4 | D8 Jumper | +## Ratings -### Processor +### Recommended Operating Conditions -The Main Processor is an Arm® Cortex®-M4F running at up to 64MHz. Most of its pins are connected to the external headers, however some are reserved for internal communication with the wireless module and the on-board internal I2C peripherals (IMU and Crypto). +

The table below provides a guideline for the optimal use of the Nano 33 BLE Sense Rev2, outlining typical operating conditions and design limits. The operating conditions of the Nano 33 BLE Sense Rev2 are largely based on the specifications of its components

-**NOTE**: As opposed to other Arduino Nano boards, pins A4 and A5 have an internal pull up and default to be used as an I2C Bus so usage as analog inputs is not recommended. +
-### IMU +| **Symbol** | **Description** | **Min** | **Typ** | **Max** | **Unit** | +|:---------------:|:-----------------------------:|:-------:|:-------:|:-------:|:--------:| +| VIN | Input voltage (VIN pin) | 5.0 | 7.0 | 18.0 | VDC | +| VUSB | Input voltage (USB connector) | 4.8 | 5.0 | 5.5 | VDC | +| TOP | Operating temperature | -40 | 25 | 85 | °C | -The Nano 33 BLE Sense Rev2 provides IMU capabilities with 9-axis, by combination of the BMI270 and BMM150 ICs. The BMI270 includes both a three axis gyroscope as well as an three axis accelerometer, while the BMM150 is capable of sensing magnetic field variations in all three dimensions. The information obtained can be used for measuring raw movement parameters as well as for machine learning. +
-### LPS22HB (U9) Barometer and Temperature Sensor +

Safety Note: The Nano 33 BLE Sense Rev2 operates at +3.3 VDC and is NOT +5 VDC tolerant. Connecting +5 VDC signals directly to any I/O pin will permanently damage the board. Always use level shifters when interfacing with +5 VDC systems.

-The LPS22HB pressure sensor IC (U9) includes both a piezoresistive absolute pressure sensor together with a temperature sensor integrated into a small chip. The pressure sensor (U9) interfaces with the main microcontroller (U1) via an I2C interface. The sensing element is composed of a micromachined suspended membrane for measuring absolute pressure, and includes a Wheatstone bridge internally for measuring the the piezoresistive elements. The temperature perturbations are compensated via an included temperature sensor on-chip. The absolute pressure can range from 260 to 1260 hPa. Pressure data can be polled via I2C at up to 24-bits, while temperature data can be polled at up to 16-bits. +

Power Tip: When powering external peripherals from the +3.3 VDC pin, limit current draw to 150 mA to prevent overheating of the onboard voltage regulator. For higher current requirements, use an external power supply.

-The Arduino_LPS22HB library provides a ready to use implementation of the I2C protocol with this chip. + -### HS3003 (U8) Relative Humidity and Temperature Sensor +## Functional Overview -The HS3003 (U8) is a MEMS sensors, designed to provide accurate readings of relative humidity and temperature in a small package. Temperature-compensation and calibration is performed on-chip, without requiring external circuitry. The HS3003 can measure the relative humidity from 0% to 100%RH with fast response times (under 4 seconds). The included on-chip temperature sensor (used for compensation) is has a temperature accuracy of ±0.1 °C. +

The core of the Nano 33 BLE Sense Rev2 is the nRF52840 microcontroller from Nordic Semiconductor, featuring an Arm® Cortex®-M4F processor running at 64 MHz. The board integrates multiple sensors connected via I2C, including environmental sensors, a 9-axis IMU, and a gesture/proximity sensor. Additionally, it features a digital MEMS microphone and wireless connectivity through the NINA-B306 Bluetooth® Low Energy module.

-U8 communicates via the main microcontroller via an I2C bus. +### Pinout -#### Gesture Detection +The Nano 33 BLE Sense Rev2 connectors pinout is shown in the figure below. -Gesture detection utilizes four directional photodiodes to sense reflected IR energy (sourced by the integrated LED) to convert physical motion information (i.e. velocity, direction and distance) to a digital information. The architecture of the gesture engine features automatic activation (based on Proximity engine results), ambient light subtraction, cross-talk cancellation, dual 8-bit data converters, power saving inter-conversion delay, 32-dataset FIFO, and interrupt driven I2C communication. The gesture engine accommodates a wide range of mobile device gesturing requirements: simple UP-DOWN-RIGHT-LEFT gestures or more complex gestures can be accurately sensed. Power consumption and noise are minimized with adjustable IR LED timing. +![Pinout of thhe Nano 33 BLE Sense Rev2 board](assets/Nano_33_BLE_Sense_Rev2_Pinout.png) -#### Proximity Detection + -The Proximity detection feature provides distance measurement (E.g. mobile device screen to user’s ear) by photodiode detection of reflected IR energy (sourced by the integrated LED). Detect/release events are interrupt driven, and occur whenever proximity result crosses upper and/ or lower threshold settings. The proximity engine features offset adjustment registers to compensate for system offset caused by unwanted IR energy reflections appearing at the sensor. The IR LED intensity is factory trimmed to eliminate the need for end-equipment calibration due to component variations. Proximity results are further improved by automatic ambient light subtraction. +### Block Diagram -#### Color and ALS Detection +An overview of the high-level architecture of the Nano 33 BLE Sense Rev2 is illustrated in the figure below. -The Color and ALS detection feature provides red, green, blue and clear light intensity data. Each of the R, G, B, C channels have a UV and IR blocking filter and a dedicated data converter producing16-bit data simultaneously. This architecture allows applications to accurately measure ambient light and sense color which enables devices to calculate color temperature and control display backlight. +![Block diagram of the Nano 33 BLE Sense Rev2 board](assets/Nano_33_BLE_Sense_Rev2_Block_Diagram.png) -### Digital Microphone + -The MP34DT06JTR is an ultra-compact, low-power, omnidirectional, digital MEMS microphone built with a capacitive sensing element and an IC interface. +### Power Supply -The sensing element, capable of detecting acoustic waves, is manufactured using a specialized silicon micromachining process dedicated to produce audio sensors +

The Nano 33 BLE Sense Rev2 can be powered through one of the following interfaces:

-### Power Tree +- **USB connector**: The board can be powered via the micro USB connector with +5 VDC input. +- **VIN pin**: External power supply from +5 VDC to +18 VDC connected to the VIN pin, regulated down to +3.3 VDC by the MP2322GQH buck converter. +- **3.3V pin**: Direct +3.3 VDC supply (use with caution, bypasses onboard regulation). +- **VUSB pin**: +5 VDC from USB can be accessed via the VUSB pin when the jumper SJ1 is closed. -The board can be powered via USB connector, VIN or VUSB pins on headers. +A detailed figure below illustrates the power options available on the Nano 33 BLE Sense Rev2 and the main system power architecture. -![Power tree](assets/powerTree.svg) +![Power tree of the Nano 33 BLE Sense Rev2 board](assets/Nano_33_BLE_Sense_Rev2_Power_Tree.png) -**NOTE:** Since VUSB feeds VIN via a Schottky diode and a DC-DC regulator specified minimum input voltage is 4.5V the minimum supply voltage from USB has to be increased to a voltage in the range between 4.8V to 4.96V depending on the current being drawn. +

Low-Power Operation Tip: The nRF52840 supports various low-power modes. Use the ArduinoBLE library's built-in power management features to optimize battery life in portable applications.

-## Board Operation +

Safety Note: Since VUSB feeds VIN via a Schottky diode and the DC-DC regulator requires a minimum input of +4.5 VDC, ensure USB supply voltage is between +4.8 VDC and +5.5 VDC for proper operation.

-### Getting Started - IDE + -If you want to program your Nano 33 BLE Sense Rev2 while offline you need to install the Arduino Desktop IDE [1] To connect the Nano 33 BLE Sense Rev2 to your computer, you’ll need a Micro-B USB cable. This also provides power to the board, as indicated by the LED. +## Device Operation -### Getting Started - Arduino Cloud Editor +### Getting Started - IDE -All Arduino boards, including this one, work out-of-the-box on the Arduino Cloud Editor [2], by just installing a simple plugin. +

If you want to program your Nano 33 BLE Sense Rev2 offline, install the Arduino Desktop IDE [1]. To connect the board to your computer, you will need a micro USB cable. This connection also provides power to the board, as indicated by the power LED.

-The Arduino Cloud Editor is hosted online, therefore it will always be up-to-date with the latest features and support for all boards. Follow [3] to start coding on the browser and upload your sketches onto your board. +### Getting Started - Arduino Web Editor + +

All Arduino devices work out of the box on the Arduino Web Editor [2] by simply installing a plugin. The Arduino Web Editor is hosted online, ensuring it is always up-to-date with the latest features and board support. Follow [3] to start coding in the browser and upload sketches to your board.

### Getting Started - Arduino Cloud -All Arduino IoT enabled products are supported on Arduino Cloud which allows you to Log, graph and analyze sensor data, trigger events, and automate your home or business. +

All Arduino IoT-enabled products are supported on Arduino Cloud, which allows you to log, graph, and analyze sensor data, trigger events, and automate your home or business. Refer to the Getting Started guide [4] for detailed instructions.

+ +### Arduino Nano 33 BLE Sense Rev2 Libraries + +

The board is supported by several dedicated libraries that provide easy access to its onboard sensors and features:

+ +- Arduino_BMI270_BMM150: 9-axis IMU control [5] +- Arduino_HS300x: Humidity and temperature sensor [6] +- Arduino_LPS22HB: Pressure sensor [7] +- Arduino_APDS9960: Gesture, proximity, light, and color sensor [8] +- PDM: Digital microphone interface [9] +- ArduinoBLE: Bluetooth® Low Energy communication [10] ### Sample Sketches -Sample sketches for the Nano 33 BLE Sense Rev2 can be found either in the "Examples" menu in the Arduino IDE or in the "Documentation" section of the Arduino Docs website. +

Sample sketches for the Nano 33 BLE Sense Rev2 can be found in the "Examples" menu in the Arduino IDE after installing the required libraries, or in the "Nano 33 BLE Sense Rev2 Documentation" section of the Arduino documentation [11].

### Online Resources -Now that you have gone through the basics of what you can do with the board you can explore the endless possibilities it provides by checking exciting projects on Arduino Project Hub [4], the Arduino Library Reference [5] and the on line store where you will be able to complement your board with sensors, actuators and more. +

Explore the endless possibilities of your board by checking exciting projects on Arduino Project Hub [12], the Arduino Library Reference [13], and the online store [14] where you can complement your Nano 33 BLE Sense Rev2 with additional extensions, sensors, and actuators.

### Board Recovery -All Arduino boards have a built-in bootloader which allows flashing the board via USB. In case a sketch locks up the processor and the board is not reachable anymore via USB it is possible to enter bootloader mode by double-tapping the reset button right after power up. - -## Connector Pinouts - -![Pinout](assets/pinout.png) - -### USB - -| Pin | **Function** | **Type** | **Description** | -|-----|--------------|--------------|----------------------------------------------------------------------------------------| -| 1 | VUSB | Power | Power Supply Input. If board is powered via VUSB from header this is an Output **(1)** | -| 2 | D- | Differential | USB differential data - | -| 3 | D+ | Differential | USB differential data + | -| 4 | ID | Analog | Selects Host/Device functionality | -| 5 | GND | Power | Power Ground | - -### Headers - -The board exposes two 15 pin connectors which can either be assembled with pin headers or soldered through castellated vias. - -| Pin | **Function** | **Type** | **Description** | -|-----|--------------|--------------|-------------------------------------------------------------------------------------| -| 1 | D13 | Digital | GPIO | -| 2 | +3V3 | Power Out | Internally generated power output to external devices | -| 3 | AREF | Analog | Analog Reference; can be used as GPIO | -| 4 | A0/DAC0 | Analog | ADC in/DAC out; can be used as GPIO | -| 5 | A1 | Analog | ADC in; can be used as GPIO | -| 6 | A2 | Analog | ADC in; can be used as GPIO | -| 7 | A3 | Analog | ADC in; can be used as GPIO | -| 8 | A4/SDA | Analog | ADC in; I2C SDA; Can be used as GPIO **(1)** | -| 9 | A5/SCL | Analog | ADC in; I2C SCL; Can be used as GPIO **(1)** | -| 10 | A6 | Analog | ADC in; can be used as GPIO | -| 11 | A7 | Analog | ADC in; can be used as GPIO | -| 12 | VUSB | Power In/Out | Normally NC; can be connected to VUSB pin of the USB connector by shorting a jumper | -| 13 | RST | Digital In | Active low reset input (duplicate of pin 18) | -| 14 | GND | Power | Power Ground | -| 15 | VIN | Power In | Vin Power input | -| 16 | TX | Digital | USART TX; can be used as GPIO | -| 17 | RX | Digital | USART RX; can be used as GPIO | -| 18 | RST | Digital | Active low reset input (duplicate of pin 13) | -| 19 | GND | Power | Power Ground | -| 20 | D2 | Digital | GPIO | -| 21 | D3/PWM | Digital | GPIO; can be used as PWM | -| 22 | D4 | Digital | GPIO | -| 23 | D5/PWM | Digital | GPIO; can be used as PWM | -| 24 | D6/PWM | Digital | GPIO, can be used as PWM | -| 25 | D7 | Digital | GPIO | -| 26 | D8 | Digital | GPIO | -| 27 | D9/PWM | Digital | GPIO; can be used as PWM | -| 28 | D10/PWM | Digital | GPIO; can be used as PWM | -| 29 | D11/MOSI | Digital | SPI MOSI; can be used as GPIO | -| 30 | D12/MISO | Digital | SPI MISO; can be used as GPIO | - -### Debug - -On the bottom side of the board, under the communication module, debug signals are arranged as 3x2 test pads with 100 mil pitch with pin 4 removed. Pin 1 is depicted in Figure 3 – Connector Positions - -| Pin | **Function** | **Type** | **Description** | -|-----|--------------|------------|-------------------------------------------------------------------| -| 1 | +3V3 | Power Out | Internally generated power output to be used as voltage reference | -| 2 | SWD | Digital | nRF52480 Single Wire Debug Data | -| 3 | SWCLK | Digital In | nRF52480 Single Wire Debug Clock | -| 5 | GND | Power | Power Ground | -| 6 | RST | Digital In | Active low reset input | +

All Arduino boards have a built-in bootloader that allows flashing the board via USB. If a sketch locks up the processor and the board becomes unreachable via USB, you can enter bootloader mode by double-tapping the reset button immediately after power-up.

+ + ## Mechanical Information -### Board Outline and Mounting Holes +

The Nano 33 BLE Sense Rev2 is a double-sided 18 mm x 45 mm board with castellated pads along its edges, allowing it to be used either as a through-hole component (with headers) or as a surface-mount module.

+ +### Board Dimensions + +

The Nano 33 BLE Sense Rev2 board outline and mounting hole dimensions is shown in the figure below; all dimensions are in mm.

+ +![Nano 33 BLE Sense Rev2 board layout](assets/Nano_33_BLE_Sense_Rev2_Outline.png) + +

The Nano 33 BLE Sense Rev2 has four 1.65 mm drilled mounting holes for mechanical fixing.

+ + -The board measures are mixed between metric and imperial. Imperial measures are used to maintain 100 mil pitch grid between pin rows to allow them to fit a breadboard whereas board length is Metric +### Board Connectors -![Board layout](assets/outline.png) +

The Nano 33 BLE Sense Rev2 has two 15-pin headers that can be assembled with pin headers (SKU: ABX00070) or soldered directly via castellated pads (SKU: ABX00069). The headers follow the classic Arduino Nano family pinout for compatibility with existing shields and accessories of the Nano Family. All the dimensions are in mm.

+ +![Nano 33 BLE Sense Rev2 board connectors](assets/Nano_33_BLE_Sense_Rev2_Board_Connectors.png) + +

The Nano 33 BLE Sense Rev2 was designed to be usable as a surface-mount module and presents a dual inline package (DIP) format with the Nano-styled header connectors on a 2.54 mm pitch grid with 1 mm holes.

+ +### Board Components and Peripherals + +

The Nano 33 BLE Sense Rev2 features various components on both sides of the board. The top side houses the main processor, wireless module, sensors, and user interfaces (reset button, LEDs), while the bottom side contains debug pads and configuration jumpers.

+ +![Nano 33 BLE Sense Rev2 board components and peripherals](assets/Nano_33_BLE_Sense_Rev2_Board_Components_Peripherals.png) + + ## Certifications ### Declaration of Conformity CE DoC (EU) -We declare under our sole responsibility that the products above are in conformity with the essential requirements of the following EU Directives and therefore qualify for free movement within markets comprising the European Union (EU) and European Economic Area (EEA). +

We declare under our sole responsibility that the products above are in conformity with the essential requirements of the following EU Directives and therefore qualify for free movement within markets comprising the European Union (EU) and European Economic Area (EEA).

### Declaration of Conformity to EU RoHS & REACH 211 01/19/2021 -Arduino boards are in compliance with RoHS 2 Directive 2011/65/EU of the European Parliament and RoHS 3 Directive 2015/863/EU of the Council of 4 June 2015 on the restriction of the use of certain hazardous substances in electrical and electronic equipment. +

Arduino boards are in compliance with RoHS 2 Directive 2011/65/EU of the European Parliament and RoHS 3 Directive 2015/863/EU of the Council of 4 June 2015 on the restriction of the use of certain hazardous substances in electrical and electronic equipment.

| Substance | **Maximum limit (ppm)** | |----------------------------------------|-------------------------| @@ -296,66 +233,73 @@ Arduino boards are in compliance with RoHS 2 Directive 2011/65/EU of the Europea | Hexavalent Chromium (Cr6+) | 1000 | | Poly Brominated Biphenyls (PBB) | 1000 | | Poly Brominated Diphenyl ethers (PBDE) | 1000 | -| Bis(2-Ethylhexyl} phthalate (DEHP) | 1000 | +| Bis(2-Ethylhexyl) phthalate (DEHP) | 1000 | | Benzyl butyl phthalate (BBP) | 1000 | | Dibutyl phthalate (DBP) | 1000 | | Diisobutyl phthalate (DIBP) | 1000 | Exemptions : No exemptions are claimed. -Arduino Boards are fully compliant with the related requirements of European Union Regulation (EC) 1907 /2006 concerning the Registration, Evaluation, Authorization and Restriction of Chemicals (REACH). We declare none of the SVHCs ([https://echa.europa.eu/web/guest/candidate-list-table](https://echa.europa.eu/web/guest/candidate-list-table)), the Candidate List of Substances of Very High Concern for authorization currently released by ECHA, is present in all products (and also package) in quantities totaling in a concentration equal or above 0.1%. To the best of our knowledge, we also declare that our products do not contain any of the substances listed on the "Authorization List" (Annex XIV of the REACH regulations) and Substances of Very High Concern (SVHC) in any significant amounts as specified by the Annex XVII of Candidate list published by ECHA (European Chemical Agency) 1907 /2006/EC. +

+ +Arduino Boards are fully compliant with the related requirements of European Union Regulation (EC) 1907/2006 concerning the Registration, Evaluation, Authorization and Restriction of Chemicals (REACH). We declare none of the SVHCs (https://echa.europa.eu/web/guest/candidate-list-table), the Candidate List of Substances of Very High Concern for authorization currently released by ECHA, is present in all products (and also package) in quantities totaling in a concentration equal or above 0.1%. To the best of our knowledge, we also declare that our products do not contain any of the substances listed on the "Authorization List" (Annex XIV of the REACH regulations) and Substances of Very High Concern (SVHC) in any significant amounts as specified by the Annex XVII of Candidate list published by ECHA (European Chemical Agency) 1907/2006/EC.

### Conflict Minerals Declaration -As a global supplier of electronic and electrical components, Arduino is aware of our obligations with regards to laws and regulations regarding Conflict Minerals, specifically the Dodd-Frank Wall Street Reform and Consumer Protection Act, Section 1502. Arduino does not directly source or process conflict minerals such as Tin, Tantalum, Tungsten, or Gold. Conflict minerals are contained in our products in the form of solder, or as a component in metal alloys. As part of our reasonable due diligence Arduino has contacted component suppliers within our supply chain to verify their continued compliance with the regulations. Based on the information received thus far we declare that our products contain Conflict Minerals sourced from conflict-free areas. +

As a global supplier of electronic and electrical components, Arduino is aware of our obligations concerning laws and regulations regarding Conflict Minerals, specifically the Dodd-Frank Wall Street Reform and Consumer Protection Act, Section 1502. Arduino does not directly source or process conflict minerals such as Tin, Tantalum, Tungsten, or Gold. Conflict minerals are contained in our products in the form of solder or as a component in metal alloys. As part of our reasonable due diligence, Arduino has contacted component suppliers within our supply chain to verify their continued compliance with the regulations. Based on the information received thus far, we declare that our products contain Conflict Minerals sourced from conflict-free areas.

## FCC Caution -Any Changes or modifications not expressly approved by the party responsible for compliance could void the user’s authority to operate the equipment. +

Any changes or modifications not expressly approved by the party responsible for compliance could void the user’s authority to operate the equipment.

-This device complies with part 15 of the FCC Rules. Operation is subject to the following two conditions: +

This device complies with part 15 of the FCC Rules. Operation is subject to the following two conditions:

-(1) This device may not cause harmful interference +1. This device may not cause harmful interference - (2) this device must accept any interference received, including interference that may cause undesired operation. +2. This device must accept any interference received, including interference that may cause undesired operation. **FCC RF Radiation Exposure Statement:** -1. This Transmitter must not be co-located or operating in conjunction with any other antenna or transmitter. +1. This transmitter must not be co-located or operating in conjunction with any other antenna or transmitter. 2. This equipment complies with RF radiation exposure limits set forth for an uncontrolled environment. -3. This equipment should be installed and operated with minimum distance 20cm between the radiator & your body. +3. This equipment should be installed and operated with minimum distance 20cm between the radiator and your body. English: -User manuals for license-exempt radio apparatus shall contain the following or equivalent notice in a conspicuous location in the user manual or alternatively on the device or both. This device complies with Industry Canada license-exempt RSS standard(s). Operation is subject to the following two conditions: -(1) this device may not cause interference +

User manuals for license-exempt radio apparatus shall contain the following or equivalent notice in a conspicuous location in the user manual or alternatively on the device or both. This device complies with Industry Canada license-exempt RSS standard(s). Operation is subject to the following two conditions:

-(2) this device must accept any interference, including interference that may cause undesired operation of the device. +1. This device may not cause interference + +2. This device must accept any interference, including interference that may cause undesired operation of the device. French: -Le présent appareil est conforme aux CNR d’Industrie Canada applicables aux appareils radio exempts de licence. L’exploitation est autorisée aux deux conditions suivantes : -(1) l’ appareil nedoit pas produire de brouillage +

Le présent appareil est conforme aux CNR d’Industrie Canada applicables aux appareils radio exempts de licence. L’exploitation est autorisée aux deux conditions suivantes:

+ +1. L’ appareil nedoit pas produire de brouillage. -(2) l’utilisateur de l’appareil doit accepter tout brouillage radioélectrique subi, même si le brouillage est susceptible d’en compromettre le fonctionnement. +2. L’utilisateur de l’appareil doit accepter tout brouillage radioélectrique subi, même si le brouillage est susceptible d’en compromettre le fonctionnement. **IC SAR Warning:** -English -This equipment should be installed and operated with minimum distance 20 cm between the radiator and your body. +English: + +

This equipment should be installed and operated with minimum distance 20 cm between the radiator and your body.

French: -Lors de l’ installation et de l’ exploitation de ce dispositif, la distance entre le radiateur et le corps est d ’au moins 20 cm. +

Lors de l’ installation et de l’ exploitation de ce dispositif, la distance entre le radiateur et le corps est d ’au moins 20 cm.

-**Important:** The operating temperature of the EUT can’t exceed 85°C and shouldn’t be lower than -40°C. +

Important: The operating temperature of the EUT can’t exceed 85°C and shouldn’t be lower than -40°C.

-Hereby, Arduino S.r.l. declares that this product is in compliance with essential requirements and other relevant provisions of Directive 2014/53/EU. This product is allowed to be used in all EU member states. +

Hereby, Arduino S.r.l. declares that this product is in compliance with essential requirements and other relevant provisions of Directive 2014/53/EU. This product is allowed to be used in all EU member states.

| Frequency bands | Maximum output power (ERP) | |-----------------|----------------------------| -| 863-870Mhz | TBD | +| 863 - 870 MHz | TBD | + + ## Company Information @@ -365,25 +309,32 @@ Hereby, Arduino S.r.l. declares that this product is in compliance with essentia ## Reference Documentation -| Reference | **Link** | -|---------------------------------------|------------------------------------------------------------------------------------- | -| Arduino IDE (Desktop) | https://www.arduino.cc/en/software | -| Arduino Cloud Editor | https://create.arduino.cc/editor | -| Arduino Cloud Editor - Getting Started | https://docs.arduino.cc/arduino-cloud/guides/editor/ | -| Arduino Project Hub | https://create.arduino.cc/projecthub?by=part&part_id=11332&sort=trending | -| Library Reference | https://www.arduino.cc/reference/en/ | -| Forum | https://create.arduino.cc/projecthub/Arduino_Genuino/getting-started-with-arduino-web-editor-4b3e4a | -| Nina B306 | https://content.u-blox.com/sites/default/files/NINA-B3_DataSheet_UBX-17052099.pdf | -| Arduino_LPS22HB Library | https://github.com/arduino-libraries/Arduino_LPS22HB | -| Arduino_APDS9960 Library | https://github.com/arduino-libraries/Arduino_APDS9960 | +| **No.** | **Reference** | **Link** | +|:-------:|--------------------------------------|-----------------------------------------------------------------------------------| +| 1 | Arduino IDE (Desktop) | https://www.arduino.cc/en/software | +| 2 | Arduino Web Editor | https://create.arduino.cc/editor | +| 3 | Arduino Web Editor - Getting Started | https://docs.arduino.cc/arduino-cloud/guides/editor/ | +| 4 | Arduino Cloud - Getting Started | https://docs.arduino.cc/arduino-cloud/guides/overview/ | +| 5 | Arduino_BMI270_BMM150 Library | https://github.com/arduino-libraries/Arduino_BMI270_BMM150 | +| 6 | Arduino_HS300x Library | https://github.com/arduino-libraries/Arduino_HS300x | +| 7 | Arduino_LPS22HB Library | https://github.com/arduino-libraries/Arduino_LPS22HB | +| 8 | Arduino_APDS9960 Library | https://github.com/arduino-libraries/Arduino_APDS9960 | +| 9 | PDM Library | https://www.arduino.cc/reference/en/libraries/pdm/ | +| 10 | ArduinoBLE Library | https://www.arduino.cc/reference/en/libraries/arduinoble/ | +| 11 | Nano 33 BLE Sense Rev2 Documentation | https://docs.arduino.cc/hardware/nano-33-ble-sense-rev2/ | +| 12 | Arduino Project Hub | https://create.arduino.cc/projecthub?by=part&part_id=11332&sort=trending | +| 13 | Arduino Library Reference | https://www.arduino.cc/reference/en/ | +| 14 | Arduino Online Store | https://store.arduino.cc/ | +| 15 | NINA-B306 Datasheet | https://content.u-blox.com/sites/default/files/NINA-B3_DataSheet_UBX-17052099.pdf | +| 16 | nRF52840 Documentation | https://www.nordicsemi.com/Products/nRF52840 | ## Revision History -| Date | **Revision** | **Changes** | -|------------|--------------|---------------------------------------| -| 25/04/2024 | 5 | Updated link to new Cloud Editor | -| 03/05/2023 | 4 | Add SKU for version with headers | -| 10/11/2022 | 3 | Updated to account for Rev2 changes: LSM9DS1 -> BMI270+Bmm150, HTS221 -> HS3003, MPM3610 -> MP2322, PCB modification | -| 03/08/2022 | 2 | Reference documentation links updates | -| 27/04/2021 | 1 | General datasheet updates | - +| **Date** | **Revision** | **Changes** | +|:----------:|:------------:|-------------------------------------------------------------------------------------------------------------| +| 25/09/2025 | 6 | Complete datasheet restructuring following Arduino standards | +| 25/04/2024 | 5 | Updated Cloud Editor link | +| 03/05/2023 | 4 | Added SKU for headers version (ABX00070) | +| 10/11/2022 | 3 | Hardware revision updates: LSM9DS1 to BMI270+BMM150, HTS221 to HS3003, MPM3610 to MP2322, PCB modifications | +| 03/08/2022 | 2 | Reference documentation link updates | +| 27/04/2021 | 1 | First release | \ No newline at end of file diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/downloads/ABX00069-datasheet-2.pdf b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/downloads/ABX00069-datasheet-2.pdf deleted file mode 100644 index e94127dbb1..0000000000 Binary files a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/downloads/ABX00069-datasheet-2.pdf and /dev/null differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/downloads/ABX00142-step.zip b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/downloads/ABX00142-step.zip new file mode 100644 index 0000000000..1be1179680 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/downloads/ABX00142-step.zip differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/essentials.md b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/essentials.md index e6c7e5c562..df27c024e1 100644 --- a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/essentials.md +++ b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/essentials.md @@ -4,43 +4,48 @@ productsLibrariesMap: - arduino_bmi270_bmm150 - arduino_hs300x - arduino_apds9960 + - arduino_lps22hb + - pdm --- - Set up your Arduino board in the Arduino IDE. + Install the Mbed OS Nano board package and configure the Arduino IDE for the Nano 33 BLE Sense Rev2. - - Learn about the Nano 33 BLE Sense Rev2's onboard sensors, supported serial & wireless protocols, pins and much more. + + Complete technical reference covering pinout, sensor specifications, communication protocols, and programming examples. - Learn how to create your own custom hardware that is compatible with the Arduino Nano Family. + Design guidelines for creating custom PCBs compatible with the Nano form factor and castellated pad layout. - Discover interesting projects from the community based on the Nano 33 BLE Sense Rev2 board. + Example projects demonstrating sensor integration, BLE connectivity, and TinyML applications. - - -The PDM library allows you to use PDM (Pulse-density modulation) microphones, like the MP34DT06JTR onboard the Arduino Nano 33 BLE Sense Rev2. + Interface with the MP34DT06JTR digital MEMS microphone using Pulse Density Modulation for audio capture and processing. + + Read barometric pressure and temperature data from the LPS22HB sensor for altitude and weather monitoring. + - Built-in Examples are sketches included in the Arduino IDE and demonstrate all basic Arduino commands. + Pre-loaded sketches demonstrating fundamental Arduino functions and peripheral control. + - Discover interesting articles, principles and techniques related to the Arduino ecosystem. + Technical documentation covering electronics principles, programming concepts, and hardware interfacing. - - Arduino programming language can be divided in three main parts: functions, values (variables and constants), and structure. + + + Complete API documentation for Arduino functions, data types, and program structure. \ No newline at end of file diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/features.md b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/features.md index abcf8b0287..3e1da88358 100644 --- a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/features.md +++ b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/features.md @@ -1,75 +1,71 @@ - -The Arduino Nano 33 BLE Sense Rev2 is a great choice for any beginner, maker or professional to get started with embedded machine learning. It is build upon the [nRF52840 microcontroller](https://content.arduino.cc/assets/Nano_BLE_MCU-nRF52840_PS_v1.1.pdf) and runs on **Arm® MbedTM OS**. The Nano 33 BLE Sense Rev2 not only features the possibility to connect via **Bluetooth® Low Energy** but also comes equipped with **sensors** to detect color, proximity, motion, temperature, humidity, audio and more. - +The Arduino Nano 33 BLE Sense Rev2 is an excellent choice for beginners, makers, and professionals getting started with embedded machine learning and IoT applications. Built on the powerful nRF52840 microcontroller with a 64 MHz Arm® Cortex®-M4F processor, this board combines Bluetooth® Low Energy 5.0 connectivity with a comprehensive sensor suite. With 1 MB Flash memory and 256 KB SRAM, it provides ample space for complex applications while maintaining the compact Nano form factor. - - - - A powerful 2.4 GHz Bluetooth® 5 Low Energy module from u-blox, with an internal antenna. Can be used to transmit data between different devices - using the ArduinoBLE library. + + Features the NINA-B306 module with Bluetooth® Low Energy 5.0 and internal antenna. Enables wireless communication with smartphones, tablets, and other BLE devices for IoT applications and data transmission using the ArduinoBLE library. - - - The board provides a 9-axis inertial measurement unit featuring a 3D accelerometer, gyroscope and magnetometer and allows you to detect orientation, motion or vibrations. + + Combines the BMI270 (6-axis accelerometer and gyroscope) with the BMM150 (3-axis magnetometer) to provide complete motion sensing. Detect orientation, movement, vibrations, and magnetic fields for navigation and gesture recognition applications. - - - This board can be programmed using MicroPython which is an implementation of the Python® programming language that comes with a subset of the Python® standard library. - - - - - - - - - Use the built-in omnidirectional digital microphone (MP34DT06JTR) to capture and analyze sound in real time to create a voice interface for your project. Use the PDM library to implement its functionalities in your projects. + + The omnidirectional MP34DT06JTR MEMS microphone captures high-quality audio for real-time analysis. Create voice interfaces, sound-triggered applications, or perform audio pattern recognition using the PDM library. - - - Learn how to output raw sensor data using the built-in APDS9960 sensor and create a gesture control system. Together with the APDS9960 library you can control the built-in RGB LED through hand gestures. + + The APDS9960 sensor provides gesture recognition, proximity detection up to 100mm, ambient light sensing, and RGB color detection. Create touchless interfaces, adaptive lighting systems, or color-sensing applications. - - - The LPS22HB picks up on barometric pressure and allows for a 24-bit pressure data output between 260 to 1260 hPa. This data can also be processed to calculate the height above sea level of the current location. + + Dual environmental sensors provide comprehensive monitoring: the HS3003 measures humidity and temperature with ±0.1°C accuracy, while the LPS22HB barometric sensor measures pressure from 260 to 1260 hPa for altitude and weather applications. - - + + - + + With its Arm® Cortex®-M4F processor and sensor array, this board excels at edge AI applications. Run edge AI models directly on the device for pattern recognition, anomaly detection, and predictive maintenance without cloud connectivity. + + + + + + + Program the board using MicroPython, a lean implementation of Python® 3 optimized for microcontrollers. Access all sensors and features through Python libraries for rapid prototyping and education. + + + + + - The HS3003 capacitive digital sensor measures relative humidity and temperature. It has a temperature accuracy of ± 0.2 °C and is thereby perfectly suited to detect ambient temperature. + + Access 21 GPIO pins including 8 analog inputs (12-bit ADC), one analog output (12-bit DAC on A0), 5 PWM outputs, and dedicated I2C, SPI, and UART interfaces. Power options include USB (+5 VDC), VIN (+5-18 VDC), or direct +3.3 VDC supply. - - + + - + \ No newline at end of file diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/product.md b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/product.md index 8fde0b4d7a..ccce946d40 100644 --- a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/product.md +++ b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/product.md @@ -2,7 +2,7 @@ title: Nano 33 BLE Sense Rev2 url_shop: https://store.arduino.cc/nano-33-ble-sense-rev2 url_guide: /software/ide-v2/tutorials/ide-v2-board-manager#mbed-os-nano -primary_button_url: /software/ide-v2/tutorials/ide-v2-board-manager#mbed-os-nano +primary_button_url: /tutorials/nano-33-ble-sense-rev2/user-manual/#first-use primary_button_title: Get Started core: arduino:mbed_nano forumCategorySlug: '/hardware/nano-family/nano-33-ble-sense-rev2/160' @@ -10,4 +10,4 @@ productCode: '032' sku: [ABX00069, ABX00070] --- -The Arduino Nano 33 BLE Sense Rev2 combines a tiny form factor, different environment sensors and the possibility to run AI using TinyML and TensorFlowTM Lite. Whether you are looking at creating your first embedded ML application or you want to use Bluetooth® Low Energy to connect your project to your phone, the Nano 33 BLE Sense Rev2 will make that journey easy. +The Arduino Nano 33 BLE Sense Rev2 integrates powerful edge computing capabilities with extensive environmental sensing in a compact 18 mm x 45 mm form factor. Built on the nRF52840 microcontroller with a 64 MHz Arm® Cortex®-M4F processor, this board combines Bluetooth® Low Energy 5.0 connectivity with a complete sensor suite including a 9-axis IMU, environmental sensors, gesture detection, and a digital microphone. Deploy edge AI models directly on-device for real-time pattern recognition, predictive maintenance, or voice processing without cloud dependency. Available with or without headers for flexible integration into your projects. \ No newline at end of file diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/suggestions.md b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/suggestions.md index c27a857782..e124b7d2f8 100644 --- a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/suggestions.md +++ b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/suggestions.md @@ -1,21 +1,23 @@ - - Learn how to create a soundmeter using the built-in microphone on the Nano 33 BLE Sense. + + Create a sound level meter using the MP34DT06JTR MEMS microphone to capture and analyze audio in real-time. - - Learn how to measure and print out the humidity and temperature values of your surroundings using the Nano 33 BLE Sense + + Read temperature and humidity data from the HS3003 sensor with ±0.1°C accuracy for environmental monitoring applications. - Built-in Examples are sketches included in the Arduino IDE and demonstrate all basic Arduino commands. + Pre-loaded sketches in the Arduino IDE demonstrating fundamental programming concepts and hardware control. + - Discover interesting articles, principles and techniques related to the Arduino ecosystem. + Technical articles and guides covering Arduino programming, electronics principles, and project development. - - Arduino programming language can be divided in three main parts: functions, values (variables and constants), and structure. + + + Complete documentation of Arduino functions, variables, constants, and program structure. \ No newline at end of file diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tech-specs.md b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tech-specs.md index 90f93d0b84..8360ae83be 100644 --- a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tech-specs.md +++ b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tech-specs.md @@ -1,7 +1,3 @@ -**Please read: operating voltage** +**Important Note: Operating Voltage** -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. - -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. - -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. \ No newline at end of file +This board operates at +3.3 VDC, and applying voltages higher than +3.3 VDC to any I/O pin will permanently damage it. The 5V pin (between RST and A7) is disconnected by default as a safety precaution and requires a solder bridge on the VUSB pads to enable it when powered via USB. For detailed information about voltage compatibility and pin configuration, please refer to the board's user manual. \ No newline at end of file diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tech-specs.yml b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tech-specs.yml index ce861742bc..2881caf8c8 100644 --- a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tech-specs.yml +++ b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tech-specs.yml @@ -1,35 +1,39 @@ Board: Name: Arduino® Nano 33 BLE Sense Rev2 - SKU: ABX00069 -Microcontroller: nRF52840 + SKU: ABX00069 (without headers), ABX00070 (with headers) +Microcontroller: nRF52840 (Nordic Semiconductor) USB connector: Micro USB Pins: - Built-in LED Pin: 13 - Digital I/O Pins: 14 - Analog input pins: 8 + Built-in LED Pins: 13 (orange), RGB LED + Digital I/O Pins: 21 + Analog input pins: 8 (12-bit ADC) + Analog output pins: 1 (12-bit DAC on A0) PWM pins: 5 External interrupts: All digital pins Connectivity: - Bluetooth®: NINA-B306 + Bluetooth®: Bluetooth® Low Energy 5.0 via NINA-B306 module Sensors: - IMU: BMI270 (3-axis accelerometer + 3-axis gyroscope) + BMM150 (3-axis Magnetometer) - Microphone: MP34DT06JTR + IMU: BMI270 (6-axis: accelerometer + gyroscope) + BMM150 (3-axis magnetometer) + Microphone: MP34DT06JTR MEMS Gesture, light, proximity: APDS9960 Barometric pressure: LPS22HB Temperature, humidity: HS3003 Communication: - UART: RX/TX - I2C: A4 (SDA), A5 (SCL) - SPI: D11 (COPI), D12 (CIPO), D13 (SCK). Use any GPIO for Chip Select (CS). + UART: 1x (D0/RX, D1/TX) + I2C: 1x (A4/SDA, A5/SCL) + SPI: 1x (D11/MOSI, D12/MISO, D13/SCK, any GPIO for CS) Power: - I/O Voltage: 3.3V - Input voltage (nominal): 5-18V - DC Current per I/O Pin: 10 mA + Operating Voltage: 3.3V + Input voltage (VIN): 5-18V + USB Input voltage: 4.8-5.5V + DC Current per I/O Pin: 8 mA (max) + Total DC Current: 150 mA (3.3V pin) Clock speed: - Processor: nRF52840 64MHz + Processor: 64 MHz (Arm® Cortex®-M4F) Memory: - nRF52840: 256 KB SRAM, 1MB flash + Flash: 1 MB + SRAM: 256 KB Dimensions: - Weight: 5gr + Weight: 5 g Width: 18 mm - Length: 45 mm + Length: 45 mm \ No newline at end of file diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/5v-pin.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/5v-pin.png new file mode 100644 index 0000000000..de3296fa9c Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/5v-pin.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/Nano33_ble_sense_ble.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/Nano33_ble_sense_ble.png new file mode 100644 index 0000000000..b020599288 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/Nano33_ble_sense_ble.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/Nano33_ble_sense_gesture.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/Nano33_ble_sense_gesture.png new file mode 100644 index 0000000000..a4cbb7c7d9 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/Nano33_ble_sense_gesture.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/Nano33_ble_sense_imu.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/Nano33_ble_sense_imu.png new file mode 100644 index 0000000000..65f7491746 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/Nano33_ble_sense_imu.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/Nano33_ble_sense_microphone.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/Nano33_ble_sense_microphone.png new file mode 100644 index 0000000000..d944996b75 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/Nano33_ble_sense_microphone.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/Nano33_ble_sense_pressure.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/Nano33_ble_sense_pressure.png new file mode 100644 index 0000000000..56463f50cc Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/Nano33_ble_sense_pressure.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/Nano33_ble_sense_temperature.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/Nano33_ble_sense_temperature.png new file mode 100644 index 0000000000..e0be7d16aa Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/Nano33_ble_sense_temperature.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/blink.gif b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/blink.gif new file mode 100644 index 0000000000..38fb352bc8 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/blink.gif differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/boards-core-libraries.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/boards-core-libraries.png new file mode 100644 index 0000000000..8683f7d264 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/boards-core-libraries.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/bottom-view.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/bottom-view.png new file mode 100644 index 0000000000..4ecea66894 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/bottom-view.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/front-page.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/front-page.png new file mode 100644 index 0000000000..a0915f46b9 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/front-page.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/hero-banner.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/hero-banner.png new file mode 100644 index 0000000000..a4827c1ec2 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/hero-banner.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/nano33BS_02_illustration.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/nano33BS_02_illustration.png new file mode 100644 index 0000000000..03ed739570 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/nano33BS_02_illustration.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/nano33BS_03_gyroscope.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/nano33BS_03_gyroscope.png new file mode 100644 index 0000000000..f90f95d5e4 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/nano33BS_03_gyroscope.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/nano33BS_04_magnetometer.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/nano33BS_04_magnetometer.png new file mode 100644 index 0000000000..68d69e7e01 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/nano33BS_04_magnetometer.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/orange-led.gif b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/orange-led.gif new file mode 100644 index 0000000000..175e149fcc Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/orange-led.gif differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/orange.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/orange.png new file mode 100644 index 0000000000..dd621e4256 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/orange.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/power-supplies.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/power-supplies.png new file mode 100644 index 0000000000..eb3a4e0b0d Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/power-supplies.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/rgb.gif b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/rgb.gif new file mode 100644 index 0000000000..4482bd961e Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/rgb.gif differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/rgb.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/rgb.png new file mode 100644 index 0000000000..c6907ba900 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/rgb.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/serial-monitor-blink.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/serial-monitor-blink.png new file mode 100644 index 0000000000..9a7400239e Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/serial-monitor-blink.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/serial-monitor-digital-pins.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/serial-monitor-digital-pins.png new file mode 100644 index 0000000000..e5687c2648 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/serial-monitor-digital-pins.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/serial-monitor-orange-blink.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/serial-monitor-orange-blink.png new file mode 100644 index 0000000000..f33d76c7c4 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/serial-monitor-orange-blink.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/serial-monitor-rgb-blink.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/serial-monitor-rgb-blink.png new file mode 100644 index 0000000000..6f8e258958 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/serial-monitor-rgb-blink.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/simple-pinout.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/simple-pinout.png new file mode 100644 index 0000000000..7012fe3d46 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/simple-pinout.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/top-view.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/top-view.png new file mode 100644 index 0000000000..451f25d6d1 Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/top-view.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/unboxing.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/unboxing.png new file mode 100644 index 0000000000..68a2885b5b Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/unboxing.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/verify-and-upload.png b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/verify-and-upload.png new file mode 100644 index 0000000000..d7c31b8feb Binary files /dev/null and b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/assets/verify-and-upload.png differ diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/content.md b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/content.md new file mode 100644 index 0000000000..ce9b4bbe06 --- /dev/null +++ b/content/hardware/03.nano/boards/nano-33-ble-sense-rev2/tutorials/01.user-manual/content.md @@ -0,0 +1,2104 @@ +--- +title: 'Nano 33 BLE Sense Rev2 User Manual' +difficulty: beginner +compatible-products: [nano-33-ble-sense-rev2] +description: 'Learn about the hardware and software features of the Arduino® Nano 33 BLE Sense Rev2 board.' +tags: + - Cheat sheet + - User manual +author: 'Carlos Alatorre and José Bagur' +hardware: + - hardware/04.nano/boards/nano-33-ble-sense-rev2 +software: + - ide-v1 + - ide-v2 + - iot-cloud + - openmv +--- + +This user manual provides a comprehensive overview of the Nano 33 BLE Sense Rev2 board, highlighting its hardware and software elements. With it, you will learn how to set up, configure and use all the main features of the Nano 33 BLE Sense Rev2 board. + +![ ](assets/hero-banner.png) + +### Hardware Requirements + +- [Nano 33 BLE Sense Rev2](https://store.arduino.cc/products/nano-33-ble-sense-rev2-with-headers) (x1) +- [Micro-USB cable](https://store.arduino.cc/products/usb-2-0-cable-type-a-micro) (x1) +- [Breadboard](https://store.arduino.cc/products/breadboard-400-contacts) (x1) (recommended) +- [Male/male jumper wires](https://store.arduino.cc/products/jumper-wires) (recommended) + +### Software Requirements + +- [Arduino IDE 2.0+](https://www.arduino.cc/en/software) or [Arduino Web Editor](https://create.arduino.cc/editor) +- [Arduino Mbed OS Nano Boards core](https://github.com/arduino/ArduinoCore-mbed) + +***The Nano 33 BLE Sense Rev2 is compatible with the complete Arduino ecosystem and can be programmed directly as a standalone device.*** + +## Nano 33 BLE Sense Rev2 Overview + +The Nano 33 BLE Sense Rev2 board represents an evolution in the Nano family, combining the powerful nRF52840 microcontroller from Nordic Semiconductor with an extensive array of onboard sensors in the compact and familiar Nano form factor. This board is designed to facilitate rapid prototyping of IoT applications, machine learning projects, and sensor-based systems that require Bluetooth® Low Energy connectivity. + +![ ](assets/front-page.png) + +The Nano 33 BLE Sense Rev2 includes a high-performance 32-bit microcontroller (nRF52840), expanded connectivity through Bluetooth® 5 Low Energy, and an extensive sensor suite including a 9-axis IMU, environmental sensors, and a digital microphone. Its compact dimensions (18 mm x 45 mm) and robust construction make this board an excellent choice for wearable devices, environmental monitoring stations, and edge AI applications. + +### Nano 33 BLE Sense Rev2 Architecture Overview + +The Nano 33 BLE Sense Rev2 board features a secure, certified and feature-rich design that suits various applications, from environmental monitoring and motion detection to machine learning inference and wireless sensor networks. + +The top view of the Nano 33 BLE Sense Rev2 board is shown in the image below: + +![The Nano 33 BLE Sense Rev2 main components (top view)](assets/top-view.png) + +The bottom view of the Nano 33 BLE Sense Rev2 board is shown in the image below: + +![The Nano 33 BLE Sense Rev2 main components (bottom view)](assets/bottom-view.png) + +***The bottom side of the Nano 33 BLE Sense Rev2 board features the VUSB jumper pads for enabling the `5V` pin, along with the board's certification markings and identification information (board model and SKU).*** + +Here is an overview of the board's main components shown in the images above: + +- **Microcontroller**: At the heart of the Nano 33 BLE Sense Rev2 board there is a Nordic Semiconductor nRF52840 ([nRF52840 datasheet](https://docs.nordicsemi.com/bundle/ps_nrf52840/page/keyfeatures_html5.html)). This single-chip microcontroller is based on a 64 MHz Arm® Cortex®-M4 core with FPU, featuring 1 MB of flash memory and 256 KB of SRAM memory. +- **Wireless Connectivity**: The board features integrated Bluetooth® 5 Low Energy connectivity through the [u-blox NINA-B306](https://content.u-blox.com/sites/default/files/NINA-B3_DataSheet_UBX-17052099.pdf?utm_content=UBX-17052099) module, enabling wireless communication with smartphones, tablets, and other Bluetooth-enabled devices with an effective range of up to 100 meters in open space. +- **9-axis IMU System**: The board integrates a sophisticated Inertial Measurement Unit consisting of the [BMI270](https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmi270-ds000.pdf) 6-axis accelerometer/gyroscope and the [BMM150](https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmm150-ds001.pdf) 3-axis magnetometer, providing precise motion tracking and orientation sensing capabilities. +- **Environmental Sensors**: The Nano 33 BLE Sense Rev2 includes multiple environmental sensors. The [HS3003](https://www.renesas.com/en/document/dst/hs3xxx-datasheet) provides temperature and humidity sensing with ±0.5°C and ±3.5% RH accuracy. The [LPS22HB](https://www.st.com/content/ccc/resource/technical/document/datasheet/bf/c1/4f/23/61/17/44/8a/DM00140895.pdf/files/DM00140895.pdf/jcr:content/translations/en.DM00140895.pdf) barometric pressure sensor enables altitude estimation and weather monitoring. The [APDS-9960](https://docs.broadcom.com/doc/AV02-4191EN) offers proximity, ambient light, RGB color, and gesture detection capabilities in a single package. +- **Digital Microphone**: The [MP34DT06JTR](https://www.st.com/resource/en/datasheet/mp34dt06j.pdf) omnidirectional MEMS microphone enables audio sensing applications with a 64 dB signal-to-noise ratio and -26 dBFS sensitivity. +- **Micro-USB Connector**: The Nano 33 BLE Sense Rev2 features a Micro-USB connector for programming, power supply, and serial communication with external devices. +- **Programmable RGB LED**: The board has an onboard user-programmable RGB LED to provide visual feedback about different operating states and sensor readings. +- **User LED**: In addition to the onboard user-programmable RGB LED, the board also includes an additional onboard user-programmable orange LED for basic status indications. +- **Castellated Pins**: The board's castellated pins allow surface mounting as a module, facilitating integration into custom PCB designs for production-ready applications. + +### Board Core and Libraries + +The **Arduino Mbed OS Nano Boards** core contains the libraries and examples to work with the Arduino Nano 33 BLE Sense Rev2's peripherals and onboard components. This comprehensive package includes support for the nRF52840 microcontroller, all onboard sensors, Bluetooth® Low Energy communication, and the programmable LEDs. + +To install the core for the Nano 33 BLE Sense Rev2 board, navigate to **Tools> Board> Boards Manager** or click the **Boards Manager** icon in the left tab of the IDE. In the Boards Manager tab, search for `Arduino Mbed OS Nano` and install the latest version. + +![Installing the Arduino Mbed OS Nano Boards core in the Arduino IDE](assets/boards-core-libraries.png) + +The Arduino Mbed OS Nano Boards core provides support for the following: + +- **Board Control and Configuration**: Reset functionality, pin configuration, and power management through Mbed OS +- **Communication Interfaces**: UART, I2C, SPI, and PDM (Pulse Density Modulation) for microphone +- **Onboard LED Control**: RGB LED and orange LED control with PWM support +- **USB HID Capabilities**: Keyboard and mouse emulation through PluggableUSBHID library +- **Bluetooth® Low Energy**: Through the ArduinoBLE library (installed separately) +- **Real-Time Operating System**: Mbed OS RTOS features including threads and semaphores +- **Standard Arduino Libraries**: Full compatibility with Arduino API and functions + +***__Important note:__ Sensor libraries for the onboard sensors (`BMI270_BMM150`, `Arduino_HS300x`, `Arduino_APDS9960`, `Arduino_LPS22HB`) must be installed separately through the Arduino IDE Library Manager. __They are not included in the core itself__.*** + +### Pinout + +![Nano 33 BLE Sense Rev2 pinout](assets/simple-pinout.png) + +The full pinout is available and downloadable as PDF from the link below: + +- [Nano 33 BLE Sense Rev2 pinout](https://docs.arduino.cc/resources/pinouts/ABX00069-full-pinout.pdf) + +### Datasheet + +The complete datasheet is available and downloadable as PDF from the link below: + +- [Nano 33 BLE Sense Rev2 datasheet](https://docs.arduino.cc/resources/datasheets/ABX00069-datasheet.pdf) + +### Schematics + +The complete schematics are available and downloadable as PDF from the link below: + +- [Nano 33 BLE Sense Rev2 schematics](https://docs.arduino.cc/resources/schematics/ABX00069-schematics.pdf) + +### STEP Files + +The complete STEP files are available and downloadable from the link below: + +- [Nano 33 BLE Sense Rev2 STEP files](https://docs.arduino.cc/static/505dd72b2343c79c2d0442e0b7469f3c/ABX00069-step-files.zip) + +## First Use + +### Unboxing the Product + +When opening the Nano 33 BLE Sense Rev2 box, you will find the board and its corresponding documentation. **The Nano 33 BLE Sense Rev2 does not include additional cables**, so you will need a USB Micro cable ([available separately here](https://store.arduino.cc/products/usb-2-0-cable-type-a-micro)) to connect the board to your computer. + +![Nano 33 BLE Sense Rev2 unboxing](assets/unboxing.png) + +The Nano 33 BLE Sense Rev2 is a standalone device that can be programmed directly without requiring additional boards. However, for more complex projects, you can easily combine it with Arduino shields compatible with the Nano family or connect it wirelessly to other devices through its onboard Bluetooth® Low Energy capability. + +### Connecting the Board + +The Nano 33 BLE Sense Rev2 can be connected to your computer using its onboard USB Micro connector. It can also be integrated into larger projects using the following: + +- **Direct USB Micro connection**: For programming, power supply and serial communication with a computer +- **Pin connection**: For integration into breadboards or custom PCBs +- **Bluetooth® Low Energy connection**: For wireless communication with smartphones, tablets, and other BLE-enabled devices +- **Module mounting**: Using the board's castellated pins for direct soldering to PCBs + +***__Important note:__ The Nano 33 BLE Sense Rev2 operates at +3.3 VDC natively. __When connecting sensors or modules that operate at +5 VDC, you must use level shifters to avoid permanent damage to the board__. All digital and analog pins are NOT +5 VDC tolerant.*** + +### Powering the Board + +The Nano 33 BLE Sense Rev2 board can be powered in several ways: + +- **Via USB Micro connector**: The most common method during development and programming +- **Via `VIN` pin**: Using an external +5 - 21 VDC power supply that will be internally regulated to +3.3 VDC +- **Via `3V3` pin**: Directly connecting a regulated +3.3 VDC source (with caution) +- **Via `VUSB` pin**: Only when the `VUSB` jumper is soldered (see 5V Pin section) + +![Different ways to power the Nano 33 BLE Sense Rev2 board](assets/power-supplies.png) + +***__Important note:__ The Nano 33 BLE Sense Rev2's `VIN` pin accepts a voltage range of +5-21 VDC. Do not connect voltages outside this range as you could permanently damage the board. Always verify all connections before applying power.*** + +#### 5V Pin Configuration + +**The Nano 33 BLE Sense Rev2 board operates at +3.3 VDC**, which means y**ou must never apply more than +3.3 VDC to its digital and analog pins**. To maintain compatibility with existing Nano projects while protecting the board, the `5V` pin (positioned between the `RST` and `A7` pins) is not connected by default. + +To enable the `5V` pin, two conditions must be met: + +1. **Solder the `VUSB` jumper pads**: Connect either the top or bottom pair of `VUSB` pads on the board +2. **Power via USB**: The board must be powered through the USB connector + +![Soldering the VUSB jumper pads](assets/5v-pin.png) + +***__Important safety note:__ Even with the `5V` pin enabled, remember that all I/O pins still operate at +3.3 VDC and are NOT +5 VDC tolerant. The `5V` pin is only for powering external +5 VDC devices, not for input signals to the board.*** + +### Hello World Example + +Let's program the Nano 33 BLE Sense Rev2 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 33 BLE Sense Rev2'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. + +First, connect your Nano 33 BLE Sense Rev2 board to your computer using a USB Micro cable, open the Arduino IDE, and make sure that the board is connected correctly. If you are new to the Arduino IDE, please refer to the official Arduino documentation for more detailed information about initial setup. Copy and paste the following example sketch into a new Arduino IDE file: + +```arduino +/** +Blink Example for the Arduino Nano 33 BLE Sense Rev2 Board +Name: nano_33_ble_sense_rev2_blink.ino +Purpose: This sketch demonstrates how to blink the built-in +user LED of the Arduino Nano 33 BLE Sense Rev2 board. + +@author Arduino Product Experience Team +@version 1.0 01/06/25 +*/ + +// Built-in LED pin +#define LED_PIN LED_BUILTIN + +void setup() { + // Initialize serial communication and wait up to 2.5 seconds for connection + Serial.begin(115200); + unsigned long startTime = millis(); + while (!Serial && millis() - startTime < 2500) { + delay(100); + } + + // Configure LED pin as output + pinMode(LED_PIN, OUTPUT); + + // Startup message + Serial.println("- Arduino Nano 33 BLE Sense Rev2 - Blink Example started..."); +} + +void loop() { + // Turn on the LED, wait 1 second + digitalWrite(LED_PIN, HIGH); + Serial.println("- LED on!"); + delay(1000); + + // Turn off the LED, wait 1 second + digitalWrite(LED_PIN, LOW); + Serial.println("- LED off!"); + delay(1000); +} +``` + +To upload the sketch to the board, click the **Verify** button to compile the sketch and check for errors, then click the **Upload** button to program the device with the sketch. + +![Uploading a sketch to the Nano 33 BLE Sense Rev2 in the Arduino IDE](assets/verify-and-upload.png) + +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. + +![Blink sketch in the Nano 33 BLE Sense Rev2 in the Arduino IDE](assets/blink.gif) + +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. + +![Arduino IDE Serial Monitor output for the orange LED example sketch](assets/serial-monitor-blink.png) + +This example confirms the following: + +- The Nano 33 BLE Sennse board is correctly connected +- The Arduino IDE is properly configured +- The board is functioning correctly +- USB communication is working +- Digital pins respond to commands + +Congratulations! You have successfully completed your first program on the Nano 33 BLE Sense board. You are now ready to explore the more advanced features of this tiny but powerful board. + +## LEDs + +This user manual section covers the Nano 33 BLE Sense Rev2 board built-in LEDs, showing their main hardware and software characteristics. + +### RGB LED + +The Nano 33 BLE Sense Rev2 board features a built-in RGB LED that can be used as a visual feedback indicator for the user. + +![Built-in RGB LED of the Nano 33 BLE Sense Rev2 board](assets/rgb.png) + +The built-in RGB LED can be accessed through the following macro definitions: + +| **Built-in LED** | **Macro Definition** | **Microcontroller Pin** | +| :--------------: | :------------------: | :---------------------: | +| Red LED | `LEDR` | `P0.24` | +| Green LED | `LEDG` | `P0.16` | +| Blue LED | `LEDB` | `P0.06` | + +***The built-in RGB LED on the Nano 33 BLE Sense Rev2 uses __inverted logic__. 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.*** + +The following example sketch controls each of the RGB LED colors at an interval of 500 ms: + +```arduino +/** +RGB LED Example for the Arduino Nano 33 BLE Sense Rev2 Board +Name: nano_33_ble_sense_rev2_rgb_led.ino +Purpose: This sketch demonstrates how to control the built-in +RGB LED of the Arduino Nano 33 BLE Sense Rev2 board. + +@author Arduino Product Experience Team +@version 1.0 01/06/25 +*/ + +void setup() { + // Initialize serial communication and wait up to 2.5 seconds for connection + Serial.begin(115200); + unsigned long startTime = millis(); + while (!Serial && millis() - startTime < 2500) { + delay(100); + } + + // Initialize LEDR, LEDG and LEDB as outputs + pinMode(LEDR, OUTPUT); + pinMode(LEDG, OUTPUT); + pinMode(LEDB, OUTPUT); + + // Turn off all LEDs initially (HIGH = OFF for inverted logic) + digitalWrite(LEDR, HIGH); + digitalWrite(LEDG, HIGH); + digitalWrite(LEDB, HIGH); + + Serial.println("- Arduino Nano 33 BLE Sense Rev2 - RGB LED Example started..."); +} + +void loop() { + // Turn on the built-in red LED and turn off the rest + digitalWrite(LEDR, LOW); // ON + digitalWrite(LEDG, HIGH); // OFF + digitalWrite(LEDB, HIGH); // OFF + Serial.println("- Red LED on!"); + delay(500); + + // Turn on the built-in green LED and turn off the rest + digitalWrite(LEDR, HIGH); // OFF + digitalWrite(LEDG, LOW); // ON + digitalWrite(LEDB, HIGH); // OFF + Serial.println("- Green LED on!"); + delay(500); + + // Turn on the built-in blue LED and turn off the rest + digitalWrite(LEDR, HIGH); // OFF + digitalWrite(LEDG, HIGH); // OFF + digitalWrite(LEDB, LOW); // ON + Serial.println("- Blue LED on!"); + delay(500); + + // Turn off all LEDs + digitalWrite(LEDR, HIGH); // OFF + digitalWrite(LEDG, HIGH); // OFF + digitalWrite(LEDB, HIGH); // OFF + Serial.println("- All LEDs off!"); + delay(500); +} +``` + +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. + +![RGB LED blink sketch in the Nano 33 BLE Sense Rev2](assets/rgb.gif) + +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. + +![Arduino IDE Serial Monitor output for the RGB LED example sketch](assets/serial-monitor-rgb-blink.png) + +### Orange LED + +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. + +![Built-in orange LED of the Nano 33 BLE Sense Rev2 board](assets/orange.png) + +The built-in user LED can be accessed through the following macro definition: + +| **Built-in LED** | **Macro Definition** | **Microcontroller Pin** | +| :--------------: | :------------------: | :---------------------: | +| Orange User LED | `LED_BUILTIN` | `P0.13` | + +***Unlike the RGB LED, the built-in orange user LED on the Nano 33 BLE Sense Rev2 operates with standard logic levels. This means that a voltage level of `HIGH` will turn the LED on, and a voltage level of `LOW` will turn it off.*** + +The following example sketch demonstrates how to control the built-in user LED: + +```arduino +/** +User LED Example for the Arduino Nano 33 BLE Sense Rev2 Board +Name: nano_33_ble_sense_rev2_user_led.ino +Purpose: This sketch demonstrates how to control the built-in +orange user LED of the Arduino Nano 33 BLE Sense Rev2 board. + +@author Arduino Product Experience Team +@version 1.0 01/06/25 +*/ + +void setup() { + // Initialize serial communication and wait up to 2.5 seconds for connection + Serial.begin(115200); + unsigned long startTime = millis(); + while (!Serial && millis() - startTime < 2500) { + delay(100); + } + + // Configure LED_BUILTIN pin as output + pinMode(LED_BUILTIN, OUTPUT); + + // Turn off LED initially + digitalWrite(LED_BUILTIN, LOW); + + Serial.println("- Arduino Nano 33 BLE Sense Rev2 - User LED Example started..."); +} + +void loop() { + // Turn on the built-in user LED + digitalWrite(LED_BUILTIN, HIGH); + Serial.println("- User LED on!"); + delay(1000); + + // Turn off the built-in user LED + digitalWrite(LED_BUILTIN, LOW); + Serial.println("- User LED off!"); + delay(1000); +} +``` + +You should now see the built-in orange user LED blinking on and off at 1-second intervals, repeating this pattern continuously. + +![Orange LED blink sketch in the Nano 33 BLE Sense Rev2](assets/orange-led.gif) + +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 user LED state changes + +![Arduino IDE Serial Monitor output for the orange LED example sketch](assets/serial-monitor-orange-blink.png) + +## Pins + +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. + +### Pins Overview + +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. + +![Nano 33 BLE Sense Rev2 pinout overview](assets/simple-pinout.png) + +### Pins Specifications and Characteristics + +The Nano 33 BLE Sense Rev2's pins are organized into the following categories: + +| **Pin Type** | **Count** | **Pin Numbers** | **Primary Functions** | +| :--------------: | :-------: | :-----------------------: | :----------------------------------------: | +| **Digital Pins** | 14 | `D0` - `D13` | Digital I/O, PWM (12 pins), SPI, UART | +| **Analog Pins** | 8 | `A0` - `A7` | Analog input, Digital I/O, I2C | +| **Power Pins** | 5 | `VIN`, `5V`, `3V3`, `GND`, `VUSB` | Power supply and ground | +| **Special Pins** | 2 | `RESET`, `AREF` | System control and reference | + +The Nano 33 BLE Sense Rev2 board offers several advanced pin capabilities including multi-function pins that can serve multiple purposes depending on your project needs, native +3.3 VDC operation throughout all pins, internal pull-up resistors on all digital pins, and interrupt capability on all digital pins for event-driven programming. + +The following table shows the electrical specifications and operating limits for all pins on the Nano 33 BLE Sense Rev2 board: + +| **Specification** | **Value** | **Notes** | +| :---------------------: | :----------: | :------------------------------: | +| **Operating Voltage** | +3.3 VDC | Logic level for all digital pins | +| **Input Voltage Range** | 0 - +3.3 VDC | **NOT** +5 VDC tolerant | +| **Max Current per Pin** | 15 mA | Source/sink current limit | +| **Max Total Current** | 200 mA | Combined current for all pins | +| **Analog Reference** | +3.3 VDC | Default `AREF` voltage | + +***__Critical safety warning:__ The Nano 33 BLE Sense Rev2 operates at +3.3 VDC and its pins are NOT +5 VDC tolerant. Applying voltages above +3.3 VDC to any I/O pin will permanently damage the board. Always use level shifters when interfacing with +5 VDC devices. This is a fundamental difference from the classic Arduino Nano which operates at +5 VDC.*** + +### Digital Pins + +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 15 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. + +The Nano 33 BLE Sense Rev2 digital pins provide the following functionality: + +| **Arduino Pin** | **Microcontroller Pin** | **Additional Functions** | **Special Features** | +| :-------------: | :---------------------: | :----------------------: | :------------------: | +| `D0` | `P1.03` | UART TX | Serial communication | +| `D1` | `P1.10` | UART RX | Serial communication | +| `D2` | `P1.11` | PWM | Interrupt capable | +| `D3` | `P1.12` | PWM | Interrupt capable | +| `D4` | `P1.15` | PWM | Interrupt capable | +| `D5` | `P1.13` | PWM | Interrupt capable | +| `D6` | `P1.14` | PWM | Interrupt capable | +| `D7` | `P0.23` | PWM | Interrupt capable | +| `D8` | `P0.21` | PWM | Interrupt capable | +| `D9` | `P0.27` | PWM | Interrupt capable | +| `D10` | `P1.02` | SPI CS, PWM | SPI communication | +| `D11` | `P1.01` | SPI MOSI, PWM | SPI communication | +| `D12` | `P1.08` | SPI MISO, PWM | SPI communication | +| `D13` | `P0.13` | SPI SCK, PWM, LED | SPI + Built-in LED | + +***__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. Pin `D13` is also connected to the built-in orange LED.*** + +The Nano 33 BLE Sense Rev2's digital pins offer the following specifications: + +| **Specification** | **Value** | **Notes** | +| :------------------: | :------------: | :---------------------------: | +| Logic Voltage | +3.3 VDC | `HIGH` and `LOW` logic levels | +| Input Voltage | 0 to +3.3 VDC | **NOT** +5V tolerant | +| Max Current (Source) | 15 mA | Per pin source current | +| Max Current (Sink) | 15 mA | Per pin sink current | +| Total Max Current | 200 mA | Combined for all pins | +| Input Resistance | 11-13 kΩ | Internal pull-up resistor | +| Digital `HIGH` | +2.0 to +3.3 VDC | Minimum voltage for `HIGH` | +| Digital `LOW` | 0 to +0.8 VDC | Maximum voltage for `LOW` | + +Digital pins can be configured and controlled using the following basic Arduino functions. + +You can configure a pin's mode using the `pinMode()` function: + +```arduino +pinMode(pin, mode); +``` + +To write a digital value to an output pin, use the `digitalWrite()` function: + +```arduino +digitalWrite(pin, value); +``` + +To read the state of a digital input pin, use the `digitalRead()` function: + +```arduino +digitalRead(pin); +``` + +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. + +The following example demonstrates basic digital pin functionality using simple connections that you can easily test with the Nano 33 BLE Sense Rev2 board. + +```arduino +/** +Combined Digital I/O Example for the Arduino Nano 33 BLE Sense Rev2 Board +Name: nano_33_ble_sense_rev2_digital_io_combined.ino +Purpose: This sketch demonstrates reading a button input and toggling +the built-in LED state each time the button is pressed. + +@author Arduino Product Experience Team +@version 1.0 01/06/25 +*/ + +// Pin definitions +const int buttonPin = 2; // Button input on D2 +const int ledPin = LED_BUILTIN; // Built-in LED on D13 + +// Variables to store button and LED state +int buttonState = 0; +int lastButtonState = HIGH; +bool ledState = false; + +void setup() { + // Initialize serial communication and wait up to 2.5 seconds for connection + Serial.begin(115200); + unsigned long startTime = millis(); + while (!Serial && millis() - startTime < 2500) { + delay(100); + } + + // Configure pins + pinMode(buttonPin, INPUT_PULLUP); + pinMode(ledPin, OUTPUT); + + // Turn off LED initially + digitalWrite(ledPin, LOW); + + Serial.println("- Arduino Nano 33 BLE Sense Rev2 - Combined Digital I/O Example started..."); + Serial.println("- Press button connected to D2 to toggle the built-in LED"); +} + +void loop() { + // Read current button state + buttonState = digitalRead(buttonPin); + + // Check if button was just pressed (state change from HIGH to LOW) + if (buttonState == LOW && lastButtonState == HIGH) { + // Button press detected - toggle LED state + ledState = !ledState; + digitalWrite(ledPin, ledState); + + Serial.print("- Button pressed! LED is now "); + if (ledState) { + Serial.println("ON"); + } else { + Serial.println("OFF"); + } + + // Simple debounce delay + delay(50); + } + + // Save current button state for next iteration + lastButtonState = buttonState; + + // Small delay for stability + delay(10); +} +``` + +To test this example, connect a push button to the Nano 33 BLE Sense Rev2 board as follows: + +- Connect one leg of a push button to pin `D2` +- Connect the other leg of the push button to `GND` +- No external pull-up resistor needed (using internal pull-up) + +![Digital pins test circuit on the Nano 33 BLE Sense Rev2 board](assets/serial-monitor-digital-pins.png) + +***__Important reminder__: When connecting external components, ensure all signals are +3.3 VDC logic level. If using +5 VDC components, you must use a level shifter to prevent damage to the board.*** + +You should now see the built-in LED toggle on and off each time you press the button. The LED will stay in its current state until you press the button again. Additionally, you can open the Arduino IDE's Serial Monitor (Tools> Serial Monitor) to see messages indicating when the button is pressed and the current LED state. + +### Analog Pins + +The Nano 33 BLE Sense Rev2 features **8 analog input pins** (`A0` to `A7`) that can be read using the `analogRead()` function. These pins allow you to measure continuously varying voltages, making them perfect for reading sensors like potentiometers, light sensors, temperature sensors and other analog components and devices. The analog-to-digital converter (ADC) built into the nRF52840 microcontroller of the Nano 33 BLE Sense Rev2 board converts the analog voltage into a digital value that your sketch can process. + +The Nano 33 BLE Sense Rev2 analog pins provide the following functionality: + +| **Arduino Pin** | **Microcontroller Pin** | **Additional Functions** | **Special Features** | +| :-------------: | :---------------------: | :----------------------: | :------------------: | +| `A0` | `P0.04` | Analog In | Analog input only | +| `A1` | `P0.05` | Analog In | Analog input only | +| `A2` | `P0.30` | Analog In | Analog input only | +| `A3` | `P0.29` | Analog In | Analog input only | +| `A4` | `P0.31` | SDA (I2C) | I2C communication | +| `A5` | `P0.02` | SCL (I2C) | I2C communication | +| `A6` | `P0.28` | Analog In | Analog input only | +| `A7` | `P0.03` | Analog In | Analog input only | + +***__Important note:__ Pins `A4` and `A5` are primarily used for I2C communication (SDA and SCL respectively). The Nano 33 BLE Sense Rev2 does not have a true DAC (Digital-to-Analog Converter). For analog output, use PWM on the digital pins.*** + +The Nano 33 BLE Sense Rev2's analog pins offer the following specifications: + +| **Specification** | **Value** | **Notes** | +| :----------------: | :-----------: | :--------------------------: | +| Input Voltage | 0 to +3.3 VDC | Maximum safe input voltage | +| Default Resolution | 10-bit | Values 0-1023 | +| Maximum Resolution | 12-bit | Values 0-4095 | +| Default Reference | +3.3 VDC | VDD reference | +| Internal Reference | +0.6 VDC | Built-in precision reference | +| Sample Rate | Up to 200 kSPS| Maximum sampling speed | +| Accuracy | ±2 LSB | Typical conversion accuracy | + +You can read analog values using the `analogRead()` function: +```arduino +value = analogRead(pin); +``` + +The default reference voltage of these pins is +3.3 VDC, but this can be changed using the `analogReference()` function. You can use `analogReference(AR_VDD)` for the default reference of +3.3 VDC, `analogReference(AR_INTERNAL)` for the built-in reference of +0.6 VDC, `analogReference(AR_INTERNAL1V2)` for +1.2 VDC reference (+0.6 VDC with 2x gain), or analogReference(AR_INTERNAL2V4)` for +2.4 VDC reference (+0.6 VDC with 4x gain). + +The default resolution is 10-bit (0 to 1023) for analog input. This can be changed using the `analogReadResolution()` function in the `setup()` of your sketch. Available options are: + +- `analogReadResolution(8)` for 8-bit resolution (0 to 255) +- `analogReadResolution(10)` for 10-bit resolution (0 to 1023, **default**) +- `analogReadResolution(12)` for 12-bit resolution (0 to 4095) +- `analogReadResolution(14)` for maximum 14-bit resolution (0 to 16383) + +The following example demonstrates how to read an analog value and display it on the IDE's Serial Monitor: + +```arduino +/** +Analog Input Example for the Arduino Nano 33 BLE Sense Rev2 Board +Name: nano_33_ble_sense_rev2_analog_input.ino +Purpose: This sketch demonstrates how to read an analog input +and display the value on the Serial Monitor. + +@author Arduino Product Experience Team +@version 1.0 01/06/25 +*/ + +// Analog input pin +const int analogPin = A0; + +void setup() { + // Initialize serial communication and wait up to 2.5 seconds for connection + Serial.begin(115200); + unsigned long startTime = millis(); + while (!Serial && millis() - startTime < 2500) { + delay(100); + } + + Serial.println("- Arduino Nano 33 BLE Sense Rev2 - Analog Input Example started..."); + Serial.println("- Reading analog values from pin A0"); +} + +void loop() { + // Read the analog value (0 - 1023 with 10-bit resolution) + int analogValue = analogRead(analogPin); + + // Convert to voltage (0 to +3.3 VDC) + float voltage = analogValue * (3.3 / 1023.0); + + // Display the results + Serial.print("- Analog Value: "); + Serial.print(analogValue); + Serial.print(" | Voltage: "); + Serial.print(voltage, 2); + Serial.println(" VDC"); + + // Wait half a second before next reading + delay(500); +} +``` + +To test this example, connect a potentiometer to the Nano 33 BLE Sense Rev2 board as follows: + +- Connect the middle pin of a potentiometer to `A0` +- Connect one outer pin of the potentiometer to +3.3 VDC +- Connect the other outer pin of the potentiometer to `GND` + +***__Important safety note__: Make sure to connect the potentiometer to +3.3 VDC, NOT to the `5V` pin (even if enabled). Connecting analog inputs to voltages above +3.3 VDC will damage the microcontroller.*** + +You can open the Arduino IDE's Serial Monitor (Tools> Serial Monitor) to see the real-time analog values and voltage measurements as you adjust the potentiometer. As you turn the potentiometer, the values will range from 0 to 1023, with corresponding voltage readings from 0 to +3.3 VDC. + +### PWM (Pulse Width Modulation) + +The Nano 33 BLE Sense Rev2 board features multiple pins with PWM capability that can be used to generate analog-like output signals. PWM works by rapidly switching a digital output between `HIGH` and `LOW` states, where the ratio of `HIGH` time to the total period determines the effective analog voltage output. + +The Nano 33 BLE Sense Rev2 board provides PWM functionality on the following pins: + +| **Arduino Pin** | **Microcontroller Pin** | **Primary Function** | +|:---------------:|:-----------------------:|:------------------------------:| +| `D2` | `P1.11` | Digital I/O, PWM | +| `D3` | `P1.12` | Digital I/O, PWM | +| `D4` | `P1.15` | Digital I/O, PWM | +| `D5` | `P1.13` | Digital I/O, PWM | +| `D6` | `P1.14` | Digital I/O, PWM | +| `D7` | `P0.23` | Digital I/O, PWM | +| `D8` | `P0.21` | Digital I/O, PWM | +| `D9` | `P0.27` | Digital I/O, PWM | +| `D10` | `P1.02` | Digital I/O, PWM, SPI CS | +| `D11` | `P1.01` | Digital I/O, PWM, SPI MOSI | +| `D12` | `P1.08` | Digital I/O, PWM, SPI MISO | +| `D13` | `P0.13` | Digital I/O, PWM, SPI SCK, LED | + +***__Important note:__ Pin `D13` is connected to both the built-in orange LED and supports PWM functionality. The onboard RGB LED pins (`LEDR`, `LEDG`, `LEDB`) also support PWM for brightness control.*** + +The Nano 33 BLE Sense Rev2's PWM pins offer the following specifications: + +| **Specification** | **Value** | **Notes** | +| :-------------------: | :---------------: | :------------------------: | +| PWM Frequency | Default 500 Hz | Can be customized | +| Default Resolution | 8-bit | Values 0-255 | +| Maximum Resolution | 16-bit | Values 0-65535 | +| Output Voltage | 0 to +3.3 VDC | Filtered PWM average value | +| Duty Cycle | 0 to 100% | Proportional to value | + +You can use PWM pins as analog output pins with the `analogWrite()` function: + +```arduino +analogWrite(pin, value); +``` + +By default, the PWM resolution is 8-bit (0 to 255). You can use `analogWriteResolution()` to change this, supporting up to 16-bit (0 to 65535) resolution: + +```arduino +analogWriteResolution(resolution); +``` + +***The following PWM examples use the built-in orange user LED (`LED_BUILTIN`) of the Nano 33 BLE Sense Rev2 board, which supports PWM for brightness control. This eliminates the need for external components and allows you to test PWM functionality immediately.*** + +The following example demonstrates how to control the brightness of the built-in orange user LED using PWM: + +```arduino +/** +PWM Example for the Arduino Nano 33 BLE Sense Rev2 Board +Name: nano_33_ble_sense_rev2_pwm_led.ino +Purpose: This sketch demonstrates how to use PWM to control +the brightness of the built-in user LED of the Nano 33 BLE Sense Rev2 board. + +@author Arduino Product Experience Team +@version 1.0 01/06/25 +*/ + +// Built-in LED pin (supports PWM) +const int ledPin = LED_BUILTIN; + +void setup() { + // Initialize serial communication and wait up to 2.5 seconds for a connection + Serial.begin(115200); + for (auto startNow = millis() + 2500; !Serial && millis() < startNow; delay(500)); + + // No need to set pinMode for PWM pins - analogWrite() handles this + + Serial.println("- Arduino Nano 33 BLE Sense Rev2 - PWM LED Example started..."); + Serial.println("- Built-in LED will fade in and out continuously"); +} + +void loop() { + // Fade in (0 to 255) + for (int brightness = 0; brightness <= 255; brightness++) { + analogWrite(ledPin, brightness); + delay(5); + } + + Serial.println("- LED at maximum brightness"); + delay(500); + + // Fade out (255 to 0) + for (int brightness = 255; brightness>= 0; brightness--) { + analogWrite(ledPin, brightness); + delay(5); + } + + Serial.println("- LED turned off"); + delay(500); +} +``` + +You should now see the built-in orange user LED of your Nano 33 BLE Sense Rev2 board gradually fade in and out, creating a smooth breathing effect that repeats continuously. + +Additionally, you can open the Arduino IDE's Serial Monitor (Tools> Serial Monitor) to see the status messages that the example sketch sends at key brightness levels. + +## UART Communication + +The Nano 33 BLE Sense Rev2 board features built-in UART (Universal Asynchronous Receiver-Transmitter) communication that allows your projects to communicate with other devices through serial data transmission. UART is implemented within the nRF52840 microcontroller and provides two separate hardware serial ports: one connected to the Micro-USB connector for computer communication, and another available on pins `D0` and `D1` for external device communication. This makes it perfect for projects that need to communicate with sensors, modules or other microcontrollers while maintaining USB connectivity for debugging. + +UART is particularly useful when your project needs to communicate with devices that require simple, reliable serial communication, rather than the more complex protocols like SPI or I2C. While SPI excels at high-speed communication and I2C is ideal for multiple device networks, UART provides straightforward point-to-point communication that works well with GPS modules, Bluetooth® modules, Wi-Fi® modules and other serial devices. **UART communication is asynchronous**, meaning it doesn't require a shared clock signal, making it robust over longer distances. + +The Nano 33 BLE Sense Rev2 board's UART interface offers the following technical specifications: + +| **Parameter** | **Value** | **Notes** | +|:-----------------:|:--------------:|:------------------------:| +| Baud Rates | 300 to 1000000 | Common: `9600`, `115200` | +| Data Bits | 8-bit | Standard data width | +| Communication | Full-duplex | Simultaneous TX/RX | +| Hardware Ports | 2 | USB Serial + `Serial1` | +| UART Pins | `D0`, `D1` | TX, RX respectively | +| Operating Voltage | +3.3 VDC | TTL logic levels | +| Flow Control | Software | XON/XOFF supported | + +The Nano 33 BLE Sense Rev2 board uses the following pins for UART communication: + +| **Arduino Pin** | **Microcontroller Pin** | **UART Function** | **Description** | +|:---------------:|:-----------------------:|:-----------------:|:---------------:| +| `D0` | `P1.03` | TX | Transmit Data | +| `D1` | `P1.10` | RX | Receive Data | + +***__Important voltage note:__ The Nano 33 BLE Sense Rev2's UART pins operate at +3.3 VDC logic levels. When connecting to +5 VDC UART devices, __you must use a level shifter__ to prevent damage to the board.*** + +You can communicate via UART using the built-in `Serial` and `Serial1` objects. The `Serial` object is connected to the Micro-USB port for computer communication, while `Serial1` is connected to pins `D0` and `D1` for external device communication. + +The following example demonstrates basic UART communication patterns: + +```arduino +/** +UART Basic Example for the Arduino Nano 33 BLE Sense Rev2 Board +Name: nano_33_ble_sense_rev2_uart_basic.ino +Purpose: This sketch demonstrates basic UART communication +using both USB Serial and hardware Serial1. + +@author Arduino Product Experience Team +@version 1.0 01/06/25 +*/ + +void setup() { + // Initialize USB serial communication at 115200 baud + Serial.begin(115200); + unsigned long startTime = millis(); + while (!Serial && millis() - startTime < 2500) { + delay(100); + } + + // Initialize hardware serial on pins D0/D1 at 9600 baud + Serial1.begin(9600); + + Serial.println("- Arduino Nano 33 BLE Sense Rev2 - UART Basic Example started..."); + Serial.println("- USB Serial (Serial): 115200 baud"); + Serial.println("- Hardware Serial (Serial1): 9600 baud on D0/D1"); + Serial.println("- Connect logic analyzer to D0 (TX) and D1 (RX)"); + Serial.println("- Type messages in Serial Monitor to send via Serial1"); + Serial.println(); +} + +void loop() { + // Check for data from USB Serial (computer) + if (Serial.available()) { + String message = Serial.readString(); + + // Remove newline characters + message.trim(); + + if (message.length()> 0) { + Serial.print("- USB received: \""); + Serial.print(message); + Serial.println("\""); + + // Send the message via Serial1 (D0/D1) + Serial1.print("- Message from USB: "); + Serial1.println(message); + + Serial.println("- Message sent via Serial1 (D0/D1)!"); + } + } + + // Check for data from Serial1 (external device on D0/D1) + if (Serial1.available()) { + String response = Serial1.readString(); + + // Remove newline characters + response.trim(); + + if (response.length()> 0) { + Serial.print("- Serial1 received: \""); + Serial.print(response); + Serial.println("\""); + } + } + + // Send periodic test data via Serial1 + static unsigned long lastSend = 0; + if (millis() - lastSend> 3000) { + lastSend = millis(); + + // Send test data with timestamp + Serial1.print("Test data: "); + Serial1.print(millis()); + Serial1.println(" ms"); + + Serial.println("- Periodic test data sent via Serial1!"); + } + + delay(10); +} +``` + +***To test this example, no external UART devices are required. The code will demonstrate UART communication patterns that can be observed with a logic analyzer. You can type messages in the Arduino IDE's Serial Monitor to see them transmitted via `Serial1` on pins `D0`/`D1`.*** + +You can open the Arduino IDE's Serial Monitor (Tools> Serial Monitor) to interact with the USB serial port and observe the communication patterns. Connect a logic analyzer to pins D0 (TX) and D1 (RX) to observe the actual UART protocol signals. + +The image below shows how the UART communication from our example appears in a logic analyzer, with the decoded protocol showing the transmitted data bytes and timing. + +When working with UART on the Nano 33 BLE Sense Rev2 board, there are several key points to keep in mind for successful implementation: + +- The dual UART design allows simultaneous USB debugging and external device communication, unlike boards that share one UART between USB and pins. +- Always ensure that both devices use the same baud rate, data bits (typically 8), and stop bits (typically 1) for successful communication. +- Keep in mind that UART communication uses TTL voltage levels (0 VDC for logic `LOW`, +3.3 VDC for logic `HIGH`). If you need to communicate with +5 VDC devices or over longer distances with RS-232 devices, you'll need a level converter. +- When connecting external devices, remember that TX connects to RX and RX connects to TX (crossover connection). +- The Nano 33 BLE Sense Rev2's UART ports are full-duplex, meaning they can send and receive data simultaneously, making them perfect for interactive communication with modules like GPS, Bluetooth®, Wi-Fi®, or other microcontrollers. + +***__Safety reminder__: Always verify the voltage levels of external UART devices before connecting. The Nano 33 BLE Sense Rev2 operates at +3.3 VDC and connecting +5 VDC signals directly will damage the board.*** + +## SPI Communication + +The Nano 33 BLE Sense Rev2 board features built-in SPI (Serial Peripheral Interface) communication that allows your projects to communicate with external devices like sensors, displays, memory cards and other microcontrollers. SPI is implemented within the nRF52840 microcontroller and uses four dedicated pins to provide high-speed synchronous serial communication. + +SPI is particularly useful when your project needs to communicate with external components at high speeds, rather than using slower protocols. While I2C is perfect for simple sensor communication and UART for basic serial data exchange, SPI excels at high-speed communication with devices like SD cards, TFT displays, wireless modules or external memory chips. SPI can achieve much faster data rates than I2C and can handle multiple devices on the same bus through individual chip select lines. + +The Nano 33 BLE Sense Rev2's SPI interface offers the following technical specifications: + +| **Parameter** | **Value** | **Notes** | +|:-----------------:|:------------:|:---------------------------:| +| Clock Speed | Up to 8 MHz | Maximum SPI frequency | +| Data Transfer | 8-bit | Standard data width | +| Communication | Full-duplex | Simultaneous send/receive | +| SPI Pins | `D10`-`D13` | `CS`, `MOSI`, `MISO`, `SCK` | +| Multiple Devices | Supported | Via different `CS` pins | +| Operating Voltage | +3.3 VDC | Same as board | +| Protocol Support | Mode 0,1,2,3 | All SPI modes available | + +The Nano 33 BLE Sense Rev2 board uses the following pins for SPI communication: + +| **Arduino Pin** | **Microcontroller Pin** | **SPI Function** | **Description** | +|:---------------:|:-----------------------:|:----------------:|:--------------------:| +| `D10` | `P1.02` | `CS` | Chip Select | +| `D11` | `P1.01` | `MOSI` | Master Out, Slave In | +| `D12` | `P1.08` | `MISO` | Master In, Slave Out | +| `D13` | `P0.13` | `SCK` | Serial Clock | + +***__Important voltage note:__ The Nano 33 BLE Sense Rev2's SPI pins operate at +3.3 VDC logic levels. When connecting to +5 VDC SPI devices, __you must use a level shifter__ to prevent damage to the board. Always check your device's datasheet for voltage specifications.*** + +You can communicate via SPI using the dedicated `SPI.h` library, which is included in the `Arduino Mbed OS Nano Boards` core. The library provides simple functions to initialize the bus, send and receive data and manage multiple devices. + +The following example demonstrates how to use SPI communication to send and receive data: + +```arduino +/** +SPI Basic Example for the Arduino Nano 33 BLE Sense Rev2 Board +Name: nano_33_ble_sense_rev2_spi_basic.ino +Purpose: This sketch demonstrates how to use SPI communication +to send and receive data. + +@author Arduino Product Experience Team +@version 1.0 01/06/25 +*/ + +#include + +// Chip Select pin for SPI device +const int CS_PIN = 10; + +void setup() { + // Initialize serial communication and wait up to 2.5 seconds for connection + Serial.begin(115200); + unsigned long startTime = millis(); + while (!Serial && millis() - startTime < 2500) { + delay(100); + } + + Serial.println("- Arduino Nano 33 BLE Sense Rev2 - SPI Basic Example started..."); + + // Set CS pin as output and set it HIGH (inactive) + pinMode(CS_PIN, OUTPUT); + digitalWrite(CS_PIN, HIGH); + + // Initialize SPI communication + SPI.begin(); + + // Configure SPI settings + // - Clock speed: 1 MHz (1000000 Hz) + // - Data order: Most Significant Bit first + // - Data mode: Mode 0 (Clock polarity = 0, Clock phase = 0) + SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE0)); + + Serial.println("- SPI initialized successfully"); + Serial.println("- Ready to communicate with SPI devices"); + Serial.println("- Remember: All devices must be +3.3 VDC compatible!"); + + // Example: Send some test data + sendSPIData(); +} + +void loop() { + // Send a counter value every 2 seconds + static int counter = 0; + + // Select the device (CS LOW) + digitalWrite(CS_PIN, LOW); + + // Send counter value + byte response = SPI.transfer(counter); + + // Deselect the device (CS HIGH) + digitalWrite(CS_PIN, HIGH); + + // Display results + Serial.print("- Sent: "); + Serial.print(counter); + Serial.print(" | Received: "); + Serial.println(response); + + // Increment counter and wrap around at 255 + counter++; + if (counter> 255) { + counter = 0; + } + + delay(2000); +} + +void sendSPIData() { + Serial.println("- Sending test data..."); + + // Select the device + digitalWrite(CS_PIN, LOW); + + // Send a sequence of test bytes + for (int i = 0; i < 5; i++) { + byte testData = 0x10 + i; // Send 0x10, 0x11, 0x12, 0x13, 0x14 + byte response = SPI.transfer(testData); + + Serial.print(" Sent: 0x"); + if (testData < 16) Serial.print("0"); + Serial.print(testData, HEX); + Serial.print(" | Received: 0x"); + if (response < 16) Serial.print("0"); + Serial.println(response, HEX); + + delay(100); + } + + // Deselect the device + digitalWrite(CS_PIN, HIGH); + + Serial.println("- Test data transmission complete"); +} +``` + +***To test this example, no external SPI device is required. The code will demonstrate SPI communication patterns, though without a connected device, the received data will typically be `0xFF`.*** + +You can open the Arduino IDE's Serial Monitor (Tools> Serial Monitor) to see the SPI communication in action. The example sketch shows how to properly select devices, send data and handle responses. + +The image below shows how the SPI communication from our example appears in a logic analyzer, with the decoded protocol showing the chip select, clock and data signals being transmitted. + +When working with SPI on the Nano 33 BLE Sense Rev2, there are several key points to keep in mind for successful implementation: + +- The SPI protocol requires careful attention to timing and device selection. Always ensure that only one device is selected (`CS` `LOW`) at a time, and remember to deselect devices (`CS` `HIGH`) after communication to avoid conflicts. +- Different SPI devices may require different clock speeds and modes, so check your device's datasheet for the correct `SPISettings()` parameters. +- Keep in mind that SPI is a synchronous protocol, meaning that data is transferred in both directions simultaneously with each clock pulse. Even if you only need to send data, you will still receive data back, and vice versa. +- The Nano 33 BLE Sense Rev2 board can communicate with multiple SPI devices by using different Chip Select (`CS`) pins, making it perfect for complex projects that need to interface with various sensors, displays and storage devices. +- Remember that pin `D13` is both the SPI clock (SCK) and the built-in LED pin. The LED may flicker during SPI communication, which is normal behavior. + +***__Safety reminder__: The Nano 33 BLE Sense Rev2 operates at +3.3 VDC logic levels. Most SD card modules, many displays, and other common SPI devices are designed for +5 VDC operation. Always verify voltage compatibility and use appropriate level shifters when necessary to prevent permanent damage to your board.*** + +## I2C Communication + +The Nano 33 BLE Sense Rev2 board features built-in I2C (Inter-Integrated Circuit) communication that allows your projects to communicate with multiple devices using just two wires. I2C is implemented within the nRF52840 microcontroller and uses two dedicated pins to provide reliable serial communication with sensors, displays, memory modules and other microcontrollers. This makes it perfect for projects that need to connect several devices without using many pins. + +I2C is particularly useful when your project needs to communicate with multiple sensors and devices in a simple way, rather than using complex wiring. While SPI is excellent for high-speed communication and UART for basic serial data exchange, I2C excels at connecting many devices with minimal wiring. Multiple I2C devices can share the same two-wire bus, each with its own unique address, making it ideal for sensor networks, display modules and expandable systems. + +***__Important note:__ The Nano 33 BLE Sense Rev2 has several onboard sensors that use the I2C bus. These sensors are already connected internally and share the same I2C bus with any external devices you connect to pins `A4` and `A5`.*** + +The Nano 33 BLE Sense Rev2's I2C interface offers the following technical specifications: + +| **Parameter** | **Value** | **Notes** | +|:-----------------:|:---------------:|:--------------------------:| +| Clock Speed | Up to 400 kHz | Standard/Fast mode | +| Data Transfer | 8-bit | Standard data width | +| Communication | Half-duplex | One direction at a time | +| I2C Pins | `A4`, `A5` | `SDA`, `SCL` respectively | +| Device Addressing | 7-bit/10-bit | Up to 127 unique addresses | +| Operating Voltage | +3.3 VDC | Same as board | +| Pull-up Resistors | Internal 4.7 kΩ | Already installed | + +The Nano 33 BLE Sense Rev2 board uses the following pins for I2C communication: + +| **Arduino Pin** | **Microcontroller Pin** | **I2C Function** | **Description** | +|:---------------:|:-----------------------:|:----------------:|:-----------------:| +| `A4` | `P0.31` | `SDA` | Serial Data Line | +| `A5` | `P0.02` | `SCL` | Serial Clock Line | + +***__Onboard I2C Devices:__ The Nano 33 BLE Sense Rev2 has several sensors already connected to the I2C bus internally: BMI270 (IMU) at address `0x68`, BMM150 (Magnetometer) at address `0x10`, LPS22HB (Pressure) at address `0x5C`, APDS-9960 (Proximity/Gesture) at address `0x39`, and HS3003 (Temperature/Humidity) at address `0x44`. Avoid using these addresses for external devices.*** + +You can communicate via I2C using the dedicated `Wire.h` library, which is included in the `Arduino Mbed OS Nano Boards` core. The library provides simple functions to initialize the bus, send and receive data and manage multiple devices. + +The following example demonstrates basic I2C communication patterns: + +```arduino +/** +I2C Basic Example for the Arduino Nano 33 BLE Sense Rev2 Board +Name: nano_33_ble_sense_rev2_i2c_basic.ino +Purpose: This sketch demonstrates basic I2C communication +patterns and how to scan for connected devices. + +@author Arduino Product Experience Team +@version 1.0 01/06/25 +*/ + +#include + +void setup() { + // Initialize serial communication and wait up to 2.5 seconds for connection + Serial.begin(115200); + unsigned long startTime = millis(); + while (!Serial && millis() - startTime < 2500) { + delay(100); + } + + Serial.println("- Arduino Nano 33 BLE Sense Rev2 - I2C Basic Example started..."); + + // Initialize I2C communication as master + Wire.begin(); + + Serial.println("- I2C initialized successfully"); + Serial.println("- Pins A4 (SDA) and A5 (SCL) are ready"); + Serial.println("- Internal pull-ups are already enabled"); + + // Scan for I2C devices + Serial.println("\n- Scanning for I2C devices..."); + scanI2CDevices(); + + delay(2000); +} + +void loop() { + // Example: Communicate with an external I2C device + // Using address 0x48 as example (common for temperature sensors) + const int EXTERNAL_DEVICE_ADDRESS = 0x48; + + // Write a single byte + Serial.println("\n- Writing single byte (0xAA) to device 0x48..."); + Wire.beginTransmission(EXTERNAL_DEVICE_ADDRESS); + Wire.write(0xAA); + byte error = Wire.endTransmission(); + + if (error == 0) { + Serial.println(" Success!"); + } else { + Serial.println(" No device found at address 0x48"); + } + + delay(1000); + + // Request data from device + Serial.println("- Requesting 2 bytes from device 0x48..."); + Wire.requestFrom(EXTERNAL_DEVICE_ADDRESS, 2); + + // Read any available data + if (Wire.available()) { + while (Wire.available()) { + int data = Wire.read(); + Serial.print(" Received: 0x"); + if (data < 16) Serial.print("0"); + Serial.println(data, HEX); + } + } else { + Serial.println(" No data received"); + } + + delay(3000); +} + +void scanI2CDevices() { + byte error, address; + int devicesFound = 0; + + Serial.println(" Scanning addresses 0x01 to 0x7F..."); + + for (address = 1; address < 127; address++) { + Wire.beginTransmission(address); + error = Wire.endTransmission(); + + if (error == 0) { + Serial.print(" I2C device found at address 0x"); + if (address < 16) Serial.print("0"); + Serial.print(address, HEX); + + // Identify onboard sensors + switch (address) { + case 0x10: + Serial.print(" (BMM150 - Magnetometer)"); + break; + case 0x39: + Serial.print(" (APDS-9960 - Proximity/Gesture)"); + break; + case 0x44: + Serial.print(" (HS3003 - Temperature/Humidity)"); + break; + case 0x5C: + Serial.print(" (LPS22HB - Pressure)"); + break; + case 0x68: + case 0x69: + Serial.print(" (BMI270 - IMU)"); + break; + default: + Serial.print(" (External device)"); + break; + } + Serial.println(); + devicesFound++; + } + } + + if (devicesFound == 0) { + Serial.println(" No I2C devices found!"); + } else { + Serial.print(" Total devices found: "); + Serial.println(devicesFound); + } +} +``` + +***To test this example, no external I2C devices are required. The code will scan and detect all onboard sensors that are connected to the I2C bus. You can also connect external I2C devices to pins `A4` (`SDA`) and `A5` (`SCL`) to see them detected.*** + +You can open the Arduino IDE's Serial Monitor (Tools> Serial Monitor) to see the I2C scan results and communication attempts. The scan will show all onboard sensors and any external devices you have connected. + +The image below shows how the I2C communication from our example appears in a logic analyzer, with the decoded protocol showing the device address and data bytes being transmitted. + +When working with I2C on the Nano 33 BLE Sense Rev2, there are several key points to keep in mind for successful implementation: + +- Internal pull-up resistors are already installed on the board (4.7 kΩ to +3.3 VDC), so you don't need to add external pull-ups for most applications. +- Multiple onboard sensors share the I2C bus, so always check for address conflicts before connecting external devices. Use the I2C scanner example to identify all connected devices. +- The board operates at +3.3 VDC, so ensure all external I2C devices are +3.3 VDC compatible or use appropriate level shifters for +5 VDC devices. +- Keep in mind that I2C is a half-duplex protocol, meaning data flows in only one direction at a time. The master device (your Nano 33 BLE Sense Rev2 board) controls the clock line and initiates all communication. +- When connecting multiple external devices, simply connect all `SDA` pins together and all `SCL` pins together, along with power and ground connections. +- The Nano 33 BLE Sense Rev2 board can communicate with up to 127 different I2C devices on the same bus (including the onboard sensors), making it perfect for complex sensor networks. + +***__Voltage compatibility reminder__: Unlike many Arduino boards that operate at +5 VDC, the Nano 33 BLE Sense Rev2 board operates at +3.3 VDC. Many common I2C modules (especially displays and sensors) are designed for +5 VDC operation. Always verify voltage compatibility and use level shifters when necessary to prevent damage to your board or devices.*** + +## USB Keyboard + +## USB Keyboard (HID) + +The Nano 33 BLE Sense Rev2 board features built-in HID (Human Interface Device) communication that allows your projects to emulate input devices like keyboards and mice. HID is implemented within the nRF52840 microcontroller and uses the Micro-USB connection to communicate directly with computers as standard input devices. This makes it perfect for automation projects, assistive technologies, gaming controllers and interactive installations that need to control computers or send keystrokes and mouse movements. + +HID is particularly useful when your project needs to interact directly with computer software, rather than just sending data through serial communication. While serial communication requires special software on the computer to interpret data, HID devices are recognized automatically by any operating system as standard keyboards or mice. This allows your Nano 33 BLE Sense Rev2 board to trigger keyboard shortcuts, type text, move the mouse cursor, or click buttons, making it ideal for presentation controllers, accessibility devices and automation systems. + +The Nano 33 BLE Sense Rev2's HID interface offers the following technical specifications: + +| **Parameter** | **Value** | **Notes** | +|:----------------:|:----------------:|:-------------------------:| +| Device Types | Keyboard & Mouse | Standard HID classes | +| Connection | USB Micro | Native USB connection | +| Compatibility | Cross-platform | Windows, macOS, Linux | +| Key Modifiers | All standard | Ctrl, Alt, Shift, GUI/Cmd | +| Mouse Buttons | 3 buttons | Left, Right, Middle | +| Mouse Movement | Relative/Delta | Smooth cursor movement | +| Scroll Wheel | Supported | Vertical scroll only | +| Multiple Devices | Supported | Keyboard + Mouse together | + +The Nano 33 BLE Sense Rev2 uses the USB Micro connector for HID communication: + +| **Connection** | **Function** | **Description** | +|:--------------:|:------------:|:----------------------------:| +| Micro USB | HID | Keyboard and Mouse emulation | + +***__Important note:__ When HID functionality is active, the Nano 33 BLE Sense Rev2 board will be recognized by your computer as an input device. Be careful with your code to avoid sending unintended keystrokes or mouse movements that could interfere with normal computer operation.*** + +To use the board as a keyboard or mouse, you need to include the `PluggableUSBHID.h` library and create the appropriate objects: + +```arduino +#include "PluggableUSBHID.h" +#include "USBKeyboard.h" +#include "USBMouse.h" + +USBKeyboard Keyboard; +USBMouse Mouse; +``` + +The following example demonstrates basic keyboard emulation capabilities: + +```arduino +/** +USB Keyboard Example for the Arduino Nano 33 BLE Sense Rev2 Board +Name: nano_33_ble_sense_rev2_usb_keyboard.ino +Purpose: This sketch demonstrates how to use the Nano 33 BLE Sense Rev2 as a +USB keyboard to send keystrokes and text. + +@author Arduino Product Experience Team +@version 1.0 01/06/25 +*/ + +#include "PluggableUSBHID.h" +#include "USBKeyboard.h" + +USBKeyboard Keyboard; + +void setup() { + // Initialize serial communication and wait up to 2.5 seconds for connection + Serial.begin(115200); + unsigned long startTime = millis(); + while (!Serial && millis() - startTime < 2500) { + delay(100); + } + + Serial.println("- Arduino Nano 33 BLE Sense Rev2 - USB Keyboard Example started..."); + Serial.println("- WARNING: This will send actual keystrokes to your computer!"); + + // Wait 5 seconds before starting HID to give user time to read warning + Serial.println("- Starting in 5 seconds..."); + for (int i = 5; i> 0; i--) { + Serial.print(i); + Serial.println(" seconds remaining"); + delay(1000); + } + + Serial.println("- Keyboard HID initialized. Starting demonstration..."); + + delay(1000); + + // Demonstrate basic text typing + Serial.println("- Typing basic text..."); + Keyboard.printf("Hello from Nano 33 BLE Sense Rev2!\n"); + delay(1000); + + // Demonstrate typing sensor data + Serial.println("- Typing with formatted data..."); + int sensorValue = 42; + Keyboard.printf("Sensor reading: %d\n", sensorValue); + delay(1000); + + Serial.println("- Keyboard demonstration completed!"); +} + +void loop() { + // Send a timestamp every 10 seconds + static unsigned long lastMessage = 0; + if (millis() - lastMessage> 10000) { + lastMessage = millis(); + + Serial.println("- Sending periodic message..."); + + // Send message with timestamp + Keyboard.printf("Nano 33 BLE Sense Rev2 - Uptime: %lu seconds\n", millis() / 1000); + } + + delay(100); +} +``` + +***To test this example, no external components are needed. The code will wait 5 seconds before activating HID functionality, then automatically demonstrate various keyboard functions.*** + +You can open the Arduino IDE's Serial Monitor (Tools> Serial Monitor) to see the status messages. After 5 seconds, the Nano 33 BLE Sense Rev2 board will type text directly into whatever application has focus on your computer. + +The following example demonstrates mouse emulation capabilities: + +``` +/** +USB Mouse Example for the Arduino Nano 33 BLE Sense Rev2 Board +Name: nano_33_ble_sense_rev2_usb_mouse.ino +Purpose: This sketch demonstrates how to use the Nano 33 BLE Sense Rev2 as a +USB mouse to control cursor movement and clicking. + +@author Arduino Product Experience Team +@version 1.0 01/06/25 +*/ + +#include "PluggableUSBHID.h" +#include "USBMouse.h" + +USBMouse Mouse; + +void setup() { + // Initialize serial communication and wait up to 2.5 seconds for connection + Serial.begin(115200); + unsigned long startTime = millis(); + while (!Serial && millis() - startTime < 2500) { + delay(100); + } + + Serial.println("- Arduino Nano 33 BLE Sense Rev2 - USB Mouse Example started..."); + Serial.println("- WARNING: This will control your actual mouse cursor!"); + + // Wait 5 seconds before starting HID + Serial.println("- Starting in 5 seconds..."); + for (int i = 5; i> 0; i--) { + Serial.print(i); + Serial.println(" seconds remaining"); + delay(1000); + } + + Serial.println("- Mouse HID initialized. Starting demonstration..."); + + delay(1000); + + // Demonstrate basic mouse movement + Serial.println("- Moving mouse in a square pattern..."); + Mouse.move(100, 0); // Move right + delay(500); + Mouse.move(0, 100); // Move down + delay(500); + Mouse.move(-100, 0); // Move left + delay(500); + Mouse.move(0, -100); // Move up + delay(500); + + Serial.println("- Mouse demonstration completed!"); +} + +void loop() { + // Create a gentle circular mouse movement every 15 seconds + static unsigned long lastMovement = 0; + if (millis() - lastMovement> 15000) { + lastMovement = millis(); + + Serial.println("- Creating circular mouse movement..."); + for (int angle = 0; angle < 360; angle += 30) { + int x = (int)(10 * cos(angle * PI / 180)); + int y = (int)(10 * sin(angle * PI / 180)); + Mouse.move(x, y); + delay(100); + } + } + + delay(100); +} +``` + +You can open the Arduino IDE's Serial Monitor (Tools> Serial Monitor) to see the status messages. The mouse cursor will move according to the programmed pattern. + +When working with HID on the Nano 33 BLE Sense Rev2 board, there are several key points to keep in mind for successful implementation: + +- HID functionality makes your board appear as a real keyboard and mouse to your computer, so always include safeguards and delays in your code to prevent unintended actions that could interfere with normal computer operation. +- Always include a delay or warning period before activating HID functionality to give yourself time to prepare or stop the program if needed. +- HID devices are automatically recognized by all modern operating systems without requiring special drivers, making your projects instantly compatible with Windows, macOS and Linux. +- For debugging HID projects, use `Serial.println()` statements to track what your code is doing, since you cannot rely on the Arduino IDE's Serial Monitor once HID actions start interfering with your computer. +- The board can function as both a keyboard and mouse simultaneously, allowing for complex automation sequences that combine typing, shortcuts and mouse control. +- Different operating systems may have slightly different keyboard layouts and shortcuts, so test your HID projects on your target platform to ensure compatibility. +- Combine with onboard sensors to create innovative input devices that use gestures, proximity, or environmental conditions to control computer interactions. + +***__Safety tip__: When developing HID projects, consider adding a physical button or sensor input to enable/disable HID functionality. This gives you a hardware "kill switch" if your code starts sending unwanted inputs.*** + +## Sensors + +### IMU + +![The LSM9DS1 sensor](assets/Nano33_ble_sense_imu.png) + +To access the data from the IMU system, you need to install the [BMI270_BMM150](https://github.com/arduino-libraries/Arduino_BMI270_BMM150) library, which comes with examples that can be used directly with the Nano 33 BLE Sense Rev2. + +The Arduino BMI270_BMM150 library allows us to use the Arduino Nano 33 BLE Rev2 IMU system without having to go into complicated programming. The library takes care of the sensor initialization and sets its values as follows: + +- Accelerometer range is set at [-4, +4]g -/+0.122 mg. +- Gyroscope range is set at [-2000, +2000] dps +/-70 mdps. +- Magnetometer range is set at [-400, +400] uT +/-0.014 uT. +- Accelerometer Output data rate is fixed at 104 Hz. +- Gyroscope Output data rate is fixed at 104 Hz. +- Magnetometer Output data rate is fixed at 20 Hz. + +It can be installed directly from the library manager through the IDE of your choice. To use it, we need to include it at the top of the sketch: + +```arduino +#include "Arduino_BMI270_BMM150.h" +``` + +And to initialize the library, we can use the following command inside `void setup()`. + +```arduino + if (!IMU.begin()) { + Serial.println("Failed to initialize IMU!"); + while (1); + } +``` + +#### Accelerometer + +An accelerometer is an electromechanical device used to measure acceleration forces. Such forces may be static, like the continuous force of gravity or, as is the case with many mobile devices, dynamic to sense movement or vibrations. + +The accelerometer data can be accessed through the following commands: + +```arduino + float x, y, z; + + if (IMU.accelerationAvailable()) { + IMU.readAcceleration(x, y, z); + } +``` + +The following example demonstrates basic access to the accelerometer: + +```arduino +/* + Arduino BMI270 - Simple Accelerometer + + This example reads the acceleration values from the BMI270 + sensor and continuously prints them to the Serial Monitor + or Serial Plotter. + + The circuit: + - Arduino Nano 33 BLE Sense Rev2 + + created 10 Jul 2019 + by Riccardo Rizzo + + This example code is in the public domain. +*/ + +#include "Arduino_BMI270_BMM150.h" + +void setup() { + Serial.begin(9600); + while (!Serial); + Serial.println("Started"); + + if (!IMU.begin()) { + Serial.println("Failed to initialize IMU!"); + while (1); + } + + Serial.print("Accelerometer sample rate = "); + Serial.print(IMU.accelerationSampleRate()); + Serial.println(" Hz"); + Serial.println(); + Serial.println("Acceleration in G's"); + Serial.println("X\tY\tZ"); +} + +void loop() { + float x, y, z; + + if (IMU.accelerationAvailable()) { + IMU.readAcceleration(x, y, z); + + Serial.print(x); + Serial.print('\t'); + Serial.print(y); + Serial.print('\t'); + Serial.println(z); + } +} +``` + +In order to get a correct reading of the board data, before uploading the sketch to the board hold the board in your hand, from the side of the USB port. The board should be facing up and "pointing" away from you. The image below illustrates the board's position and how it works: + +![Interacting with the X and Y axes](assets/nano33BS_02_illustration.png) + +#### Gyroscope + +A gyroscope sensor is a device that can measure and maintain the orientation and angular velocity of an object. Gyroscopes are more advanced than accelerometers, as they can measure the tilt and lateral orientation of an object, whereas an accelerometer can only measure its linear motion. + +The gyroscope data can be accessed through the following commands: + +```arduino + float x, y, z; + + if (IMU.gyroscopeAvailable()) { + IMU.readGyroscope(x, y, z); + } +``` + +The following example demonstrates basic access to the gyroscope: + +````arduino +/* + Arduino BMI270 - Simple Gyroscope + + This example reads the gyroscope values from the BMI270 + sensor and continuously prints them to the Serial Monitor + or Serial Plotter. + + The circuit: + - Arduino Nano 33 BLE Sense Rev2 + + created 10 Jul 2019 + by Riccardo Rizzo + + This example code is in the public domain. +*/ + +#include "Arduino_BMI270_BMM150.h" + +void setup() { + Serial.begin(9600); + while (!Serial); + Serial.println("Started"); + + if (!IMU.begin()) { + Serial.println("Failed to initialize IMU!"); + while (1); + } + Serial.print("Gyroscope sample rate = "); + Serial.print(IMU.gyroscopeSampleRate()); + Serial.println(" Hz"); + Serial.println(); + Serial.println("Gyroscope in degrees/second"); + Serial.println("X\tY\tZ"); +} + +void loop() { + float x, y, z; + + if (IMU.gyroscopeAvailable()) { + IMU.readGyroscope(x, y, z); + + Serial.print(x); + Serial.print('\t'); + Serial.print(y); + Serial.print('\t'); + Serial.println(z); + } +} +```` + +Now with the board parallel to the ground you can swiftly move it towards one direction: forward, backwards, right or left. According to the movement of your choice, the results will print every second to your monitor! + +![Positioning of the board](assets/nano33BS_03_gyroscope.png) + +#### Magnetometer + +A magnetometer is a device that measures magnetism, that is the direction, strength, or relative change of a magnetic field at a particular location. + +The magnetometer data can be accessed through the following commands: + +```arduino + float x, y, z; + + IMU.readMagneticField(x, y, z); +``` + +The following example demonstrates basic access to the magnetometer: + +```arduino +/* + Arduino BMM150 - Simple Magnetometer + + This example reads the magnetic field values from the BMM150 + sensor and continuously prints them to the Serial Monitor + or Serial Plotter. + + The circuit: + - Arduino Nano 33 BLE Sense Rev2 + + created 10 Jul 2019 + by Riccardo Rizzo + + This example code is in the public domain. +*/ + +#include "Arduino_BMI270_BMM150.h" + +void setup() { + Serial.begin(9600); + while (!Serial); + Serial.println("Started"); + + if (!IMU.begin()) { + Serial.println("Failed to initialize IMU!"); + while (1); + } + Serial.print("Magnetic field sample rate = "); + Serial.print(IMU.magneticFieldSampleRate()); + Serial.println(" Hz"); + Serial.println(); + Serial.println("Magnetic Field in uT"); + Serial.println("X\tY\tZ"); +} + +void loop() { + float x, y, z; + + if (IMU.magneticFieldAvailable()) { + IMU.readMagneticField(x, y, z); + + Serial.print(x); + Serial.print('\t'); + Serial.print(y); + Serial.print('\t'); + Serial.println(z); + } +} +``` + +![How a magnetometer works](assets/nano33BS_04_magnetometer.png) + +After you have successfully verified and uploaded the sketch to the board, it's time to put it to the test. You can choose an electric appliance at home or any object that runs with electrical current like a laptop charger to test it out. + +If you want to learn more on how to use the IMU, please check out the tutorial below: + +#### Tutorials + +- [Accessing IMU gyroscope data with Nano 33 BLE Sense Rev2](/tutorials/nano-33-ble-sense-rev2/imu-gyroscope) +- [Accessing IMU accelerometer data with Nano 33 BLE Sense Rev2](/tutorials/nano-33-ble-sense-rev2/imu-accelerometer) +- [Accessing IMU magnetometer data with Nano 33 BLE Sense Rev2](/tutorials/nano-33-ble-sense-rev2/imu-magnetometer) + +### Proximity and Gesture Detection + +![The APDS-9960 proximity and gesture sensor](assets/Nano33_ble_sense_gesture.png) + +To access the data from the APDS9960 module, you need to install the [APDS9960](https://github.com/arduino-libraries/Arduino_APDS9960) library, which comes with examples that can be used directly with the Nano 33 BLE Sense Rev2. + +It can be installed directly from the library manager through the IDE of your choice. To use it, we need to include it at the top of the sketch: + +```arduino +#include +``` + +And to initialize the library, we can use the following command inside `void setup()`. + +```arduino +if (!APDS.begin()) { + Serial.println("Error initializing APDS9960 sensor!"); +} +``` + +Then we check if there is data available from the proximity sensor. If there is we can print the value in the serial monitor. The value can range between 0-255, where 0 is close and 255 is far away. If it prints the value -1, it indicates an error. + +```arduino +if (APDS.proximityAvailable()) { + Serial.println(APDS.readProximity()); +} +``` + +You can also check detect gestures with the same sensor, these gestures include UP, DOWN, LEFT and RIGHT gestures. + +```arduino +if (APDS.gestureAvailable()) { + int gesture = APDS.readGesture(); + switch (gesture) { + case GESTURE_UP: + Serial.println("Detected UP gesture"); + break; + + case GESTURE_DOWN: + Serial.println("Detected DOWN gesture"); + break; + + case GESTURE_LEFT: + Serial.println("Detected LEFT gesture"); + break; + + case GESTURE_RIGHT: + Serial.println("Detected RIGHT gesture"); + break; + + default: + // Ignore + break; + } + } +``` + +Additionally to promiximity and gesture sensing, the sensor can detect colors. + +```arduino + if (APDS.colorAvailable()) { + APDS.readColor(r, g, b); + } +``` + +The following example demonstrates the full use of the proximity and gesture sensors, including RGB sensor: + +```arduino +/* + APDS-9960 - All sensor data from APDS-9960 + + This example reads all data from the on-board APDS-9960 sensor of the + Nano 33 BLE Sense: + - color RGB (red, green, blue) + - proximity + - gesture + and prints updates to the Serial Monitor every 100 ms. + + The circuit: + - Arduino Nano 33 BLE Sense + + This example code is in the public domain. +*/ + +#include + +void setup() { + Serial.begin(9600); + while (!Serial); // Wait for Serial Monitor to open + + if (!APDS.begin()) { + Serial.println("Error initializing APDS-9960 sensor."); + while (true); // Stop forever + } +} + +int proximity = 0; +int r = 0, g = 0, b = 0; +unsigned long lastUpdate = 0; + +void loop() { + + // Check if a proximity reading is available. + if (APDS.proximityAvailable()) { + proximity = APDS.readProximity(); + } + + // Check if a gesture reading is available + if (APDS.gestureAvailable()) { + int gesture = APDS.readGesture(); + switch (gesture) { + case GESTURE_UP: + Serial.println("Detected UP gesture"); + break; + + case GESTURE_DOWN: + Serial.println("Detected DOWN gesture"); + break; + + case GESTURE_LEFT: + Serial.println("Detected LEFT gesture"); + break; + + case GESTURE_RIGHT: + Serial.println("Detected RIGHT gesture"); + break; + + default: + // Ignore + break; + } + } + + // Check if a color reading is available + if (APDS.colorAvailable()) { + APDS.readColor(r, g, b); + } + + // Print updates every 100 ms + if (millis() - lastUpdate> 100) { + lastUpdate = millis(); + Serial.print("PR="); + Serial.print(proximity); + Serial.print(" RGB="); + Serial.print(r); + Serial.print(","); + Serial.print(g); + Serial.print(","); + Serial.println(b); + } +} +``` + +#### Tutorials + +If you want to learn more on how to use the proximity sensor, please check out the tutorial below: + +- [Proximity Detection with the Nano 33 BLE Sense](https://docs.arduino.cc/tutorials/nano-33-ble-sense/proximity_sensor) +- [Gesture Recognition with the Nano 33 BLE Sense](https://docs.arduino.cc/tutorials/nano-33-ble-sense/gesture_sensor) + +### Temperature and Humidity + +![The HS3003 temperature and humidity sensor](assets/Nano33_ble_sense_temperature.png) + +Temperature sensors are components that convert physical temperature into digital data. Likewise, humidity sensors are able to measure atmospheric moisture levels and translate that into electrical signal. As such, temperature and humidity sensors are essential for environmental monitoring especially in and around sensitive electronic equipment. + +The HS3003 is an ultra-compact sensor for relative humidity and temperature. We will use the I2C protocol to communicate with the sensor and get data from it. The sensor's range of different values are the following: + +- Humidity accuracy: ± 3.5% rH, 20 to +80% rH +- Humidity range: 0 to 100 % +- Temperature accuracy: ± 0.5 °C,15 to +40 °C +- Temperature range: -40 to 120°C + +To access the data from the HS3003 module, we need to install the [Arduino_HS300x](https://github.com/arduino-libraries/Arduino_HS300x) library, which comes with examples that can be used directly with the Nano 33 BLE Sense Rev2. + +It can be installed directly from the library manager through the IDE of your choice. To use it, you need to include it at the top of the sketch: + +```arduino +#include +``` + +And to initialize the library, we can use the following command inside `void setup()`. + +```arduino +if (!HS300x.begin()) { + Serial.println("Failed to initialize humidity temperature sensor!"); +} +``` + +Then we can print our values in the serial monitor to check the temperature and humidity values. + +```arduino +Serial.println(HS300x.readTemperature()); +Serial.println(HS300x.readHumidity()); +``` + +The following example allows you to read the temperature in degrees Celsius and the relative humidity: + +```arduino +/* + HS300x - Read Sensors + + This example reads data from the on-board HS300x sensor of the + Nano 33 BLE Sense and prints the temperature and humidity sensor + values to the Serial Monitor once a second. + + The circuit: + - Arduino Nano 33 BLE Sense R2 + + This example code is in the public domain. +*/ + +#include + +void setup() { + Serial.begin(9600); + while (!Serial); + + if (!HS300x.begin()) { + Serial.println("Failed to initialize humidity temperature sensor!"); + while (1); + } +} + +void loop() { + // read all the sensor values + float temperature = HS300x.readTemperature(); + float humidity = HS300x.readHumidity(); + + // print each of the sensor values + Serial.print("Temperature = "); + Serial.print(temperature); + Serial.println(" °C"); + + Serial.print("Humidity = "); + Serial.print(humidity); + Serial.println(" %"); + + // print an empty line + Serial.println(); + + // wait 1 second to print again + delay(1000); +} +``` + +After you have successfully verified and uploaded the sketch to the board, open the Serial Monitor. You will now see the new values printed. If you want to test out whether it is working, you could slightly breathe (exhale) on your board and watch new values when the humidity, as well as the temperature, levels rise or decrease. + +#### Tutorial + +If you want to learn more on how to use the temperature and humidity sensor, please check out the tutorial below: + +- [Reading Temperature & Humidity on Nano 33 BLE Sense Rev2](/tutorials/nano-33-ble-sense-rev2/humidity-and-temperature-sensor) + +### Pressure + +![The LPS22HB pressure sensor](assets/Nano33_ble_sense_pressure.png) + +To access the data from the LPS22HB module, we need to install the [LPS22HB](https://github.com/arduino-libraries/Arduino_LPS22HB) library, which comes with examples that can be used directly with the Nano 33 BLE Sense Rev2. + +It can be installed directly from the library manager through the IDE of your choice. To use it, we need to include it at the top of the sketch: + +```arduino +#include +``` + +And to initialize the library, we can use the following command inside `void setup()`. + +```arduino +if (!BARO.begin()) { + Serial.println("Failed to initialize pressure sensor!"); +} +``` + +Then we can read the values from the sensor using the code below. + +```arduino +BARO.readPressure(); +``` + +The following example allows you to read the temperature in degrees Celsius and the pressure from the LPS22HB sensor: + +```arduino +/* + LPS22HB - Read Pressure + + This example reads data from the on-board LPS22HB sensor of the + Nano 33 BLE Sense and prints the temperature and pressure sensor + value to the Serial Monitor once a second. + + The circuit: + - Arduino Nano 33 BLE Sense + + This example code is in the public domain. +*/ + +#include + +void setup() { + Serial.begin(9600); + while (!Serial); + + if (!BARO.begin()) { + Serial.println("Failed to initialize pressure sensor!"); + while (1); + } +} + +void loop() { + // read the sensor value + float pressure = BARO.readPressure(); + + // print the sensor value + Serial.print("Pressure = "); + Serial.print(pressure); + Serial.println(" kPa"); + + float temperature = BARO.readTemperature(); + + // print the sensor value + Serial.print("Temperature = "); + Serial.print(temperature); + Serial.println(" C"); + + // print an empty line + Serial.println(); + + // wait 1 second to print again + delay(1000); +} +``` + +After you have successfully verified and uploaded the sketch to the board, open the Serial Monitor. In order to test out the code, you could begin by stabilizing your board on a fixed position and observe the values returned through the Serial Monitor. If you are living in an apartment block, you could experiment further and move to different floors and notice the changes in altitude values. + +#### Tutorial + +If you want to learn more on how to use the temperature and humidity sensor, please check out the tutorial below: + +- [Access Barometric Pressure Sensor Data on Nano 33 BLE Sense Rev2](/tutorials/nano-33-ble-sense-rev2/barometric-sensor) + +### Microphone + +![The MP34DT05 microphone](assets/Nano33_ble_sense_microphone.png) + +To access the data from the MP34DT06JTR, we need to use the [PDM](https://www.arduino.cc/en/Reference/PDM) library that is included in the **Arduino Mbed OS Nano Board package**. If the Board Package is installed, you will find an example that works by browsing **File> Examples> PDM> PDMSerialPlotter**. + +***Please note: The sampling frequency in the PDMSerialPlotter example is set to 16000 Hz. If the microphone appears to not be working (monitor is printing a value of -128), try to change this rate to 20000 Hz. You can change this at the top of the PDMSerialPlotter example sketch.*** + +```arduino +static const int frequency = 20000; //frequency at 20 KHz instead of 16 KHz +``` + +### Tutorial + +If you want to learn more on how to use the Microphone, please check out the tutorial below: + +- [Controlling the On-Board RGB LED with Microphone](https://docs.arduino.cc/tutorials/nano-33-ble-sense/microphone_sensor) + +## Connectivity + +The Nano 33 BLE Sense Rev2 supports Bluetooth® through the [u-blox NINA-B306](https://docs.arduino.cc/resources/datasheets/NINA-B3-series.pdf) module. To use this module, we can use the [ArduinoBLE](https://www.arduino.cc/en/Reference/ArduinoBLE) library. + +![ Bluetooth® module.](assets/Nano33_ble_sense_ble.png) + +### Bluetooth® + +To enable Bluetooth® on the Nano 33 BLE Sense Rev2, we can use the [ArduinoBLE](https://www.arduino.cc/en/Reference/ArduinoBLE) library, and include it at the top of our sketch: + +```arduino +#include +``` + +Set the service and characteristic: + +```arduino +BLEService ledService("180A"); // BLE LED Service +BLEByteCharacteristic switchCharacteristic("2A57", BLERead | BLEWrite); +``` + +Set advertised name and service: + +```arduino + BLE.setLocalName("Nano 33 BLE Sense Rev2"); + BLE.setAdvertisedService(ledService); +``` + +Start advertising: + +```arduino +BLE.advertise(); +``` + +Listen for Bluetooth® Low Energy peripherals to connect: + +```arduino +BLEDevice central = BLE.central(); +``` + +### Tutorials + +- [Controlling Nano 33 BLE Sense Rev2 RGB LED via Bluetooth®](/tutorials/nano-33-ble-sense/bluetooth) + +## Support + +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. + +### Help Center + +Explore our Help Center, which offers a comprehensive collection of articles and guides for Nano family boards. The Help Center is designed to provide in-depth technical assistance and help you make the most of your device. + +- [Nano family help center page](https://support.arduino.cc/hc/en-us/sections/360004605400-Nano-Family) + +### Forum + +Join our community forum to connect with other Nano family board users, share your experiences, and ask questions. The Forum is an excellent place to learn from others, discuss issues, and discover new ideas and projects related to the Nano 33 BLE Sense Rev2. + +- [Nano category in the Arduino Forum](https://forum.arduino.cc/c/official-hardware/nano-family/87) + +### Contact Us + +Please get in touch with our support team if you need personalized assistance or have questions not covered by the help and support resources described before. We're happy to help you with any issues or inquiries about the Nano family boards. + +- [Contact us page](https://www.arduino.cc/en/contact-us/) \ No newline at end of file

AltStyle によって変換されたページ (->オリジナル) /