diff --git a/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/image-map-bool-trigger.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/image-map-bool-trigger.png new file mode 100644 index 0000000000..aeddcadd2a Binary files /dev/null and b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/image-map-bool-trigger.png differ diff --git a/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/image-map-int-trigger.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/image-map-int-trigger.png new file mode 100644 index 0000000000..20753a5f11 Binary files /dev/null and b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/image-map-int-trigger.png differ diff --git a/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/image-map-markers.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/image-map-markers.png new file mode 100644 index 0000000000..0a73806ad0 Binary files /dev/null and b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/image-map-markers.png differ diff --git a/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/image-map.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/image-map.png new file mode 100644 index 0000000000..ad847a1a72 Binary files /dev/null and b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/image-map.png differ diff --git a/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/dashboard-widgets.md b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/dashboard-widgets.md index a243696e0b..dc13e9b0ba 100644 --- a/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/dashboard-widgets.md +++ b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/dashboard-widgets.md @@ -198,6 +198,26 @@ gaugeVariable = analogRead(A0); Use the image widget to put a JPG, PNG or WEBP image on your dashboard! If you instead want to use an image URL, then chose the URL option under image source. Keep in mind the URL needs to be a HTTPS URL and not a HTTP URL. It is also possible to use local addresses. If you are using the URL option you can add a refresh frequency to the image widget, enabling the widget to function as a video or moving image. The image will then update The image can be made to fill the widget frame or to fit within the widget frame. A grey background can be added to the widget to help with visibility issues for PNGs with transparent backgrounds. +### Image Map + +![Image Map Widget](assets/image-map.png) + +Monitor your environment at a glance by placing markers on a map of your space. It could be a map of your house, warehouse, plant, etc. Enabling you to see real-time data from your devices. + +Upload or link an image of the space you want to monitor. You can then add `markers` that you can customize the look and placement of while also linking to any public URL. + +![Image map markers](assets/image-map-markers.png) + +You can also add `triggers` and set their label, unit, position and looks. Link any `int`, `float`, `String`, `bool` or any Specialized types based on them to the triggers on the image map. + +Depending on the variable that you link you will get different options. With a `boolean` you can decide if the style should be `On/Off`, `True/False` or `Icons`. Then change the color of the trigger depending on the state if you check the `Custom style` option. + +![Image map boolean](assets/image-map-bool-trigger.png) + +With a `int` or `float` you can change the color of the trigger depending on the threshold if you check the `Customize color` option. + +![Image map int](assets/image-map-int-trigger.png) + ### LED ![LED Widget](assets/widget-led.png) diff --git a/content/hardware/01.mkr/01.boards/mkr-wifi-1010/tutorials/mkr-battery-app-note/mkr-battery-app-note.md b/content/hardware/01.mkr/01.boards/mkr-wifi-1010/tutorials/mkr-battery-app-note/mkr-battery-app-note.md index 70b17a117b..6471e5f2ac 100644 --- a/content/hardware/01.mkr/01.boards/mkr-wifi-1010/tutorials/mkr-battery-app-note/mkr-battery-app-note.md +++ b/content/hardware/01.mkr/01.boards/mkr-wifi-1010/tutorials/mkr-battery-app-note/mkr-battery-app-note.md @@ -124,7 +124,7 @@ We will go through the lines needed to create a Sketch to read the battery value **4.** We will now create a variable to store the maximum source voltage `max_Source_voltage` as well as the upper (`batteryFullVoltage`) and lower (`batteryEmptyVoltage`) values for the battery. We will also define the battery capacity as `batteryCapacity` so as to determine the charging current. Since we are using a 750 mAh battery in this example, we will set the value to `0.750`. ```arduino - int max_Source_voltage; + float max_Source_voltage; float batteryFullVoltage = 4.2; float batteryEmptyVoltage = 3.3; @@ -185,12 +185,13 @@ void loop() **13.** In order to convert `rawADC` into a voltage reading (`voltADC`) we will divide `rawADC` by 4095 and then multiply it by the analog reference voltage (3.3V). ```arduino -voltADC = rawADC * (3.3/4095.0); +voltADC = rawADC * 3.3 / 4096.0; ``` -**14.** The `voltADC` variable gives us the voltage sensed directly on the PB09 pin. This voltage is passed through the voltage divider, so it is a fraction of the actual battery voltage. We can then calculate the equivilanet battery voltage as follows. +**14.** The `voltADC` variable gives us the voltage sensed directly on the PB09 pin. This voltage is passed through the voltage divider, so it is a fraction of the actual battery voltage. We can then calculate the equivalent battery voltage as follows. + ```arduino -voltBat = voltADC * (max_Source_voltage/3.3); +voltBat = max_Source_voltage * rawADC / 4096.0; ``` **15.** We can approximate the battery voltage to be proportional to the capacity level. Since the `map()` function does not work with float variables, we will manually map the values. @@ -266,7 +267,7 @@ float voltBat; //calculated voltage on battery int R1 = 330000; // resistor between battery terminal and SAMD pin PB09 int R2 = 1000000; // resistor between SAMD pin PB09 and ground -int max_Source_voltage; // upper source voltage for the battery +float max_Source_voltage; // upper source voltage for the battery // define voltage at which battery is full/empty float batteryFullVoltage = 4.2; //upper voltage limit for battery @@ -303,8 +304,8 @@ void loop() { rawADC = analogRead(ADC_BATTERY); //the value obtained directly at the PB09 input pin - voltADC = rawADC * (3.3/4095.0); //convert ADC value to the voltage read at the pin - voltBat = voltADC * (max_Source_voltage/3.3); //we cannot use map since it requires int inputs/outputs + voltADC = rawADC * 3.3 / 4096.0; //convert ADC value to the voltage read at the pin + voltBat = max_Source_voltage * rawADC / 4096.0; //we cannot use map since it requires int inputs/outputs int new_batt = (voltBat - batteryEmptyVoltage) * (100) / (batteryFullVoltage - batteryEmptyVoltage); //custom float friendly map function diff --git a/content/hardware/02.uno/boards/uno-q/datasheet/datasheet.md b/content/hardware/02.uno/boards/uno-q/datasheet/datasheet.md index abe37c9ad1..afd7eca746 100644 --- a/content/hardware/02.uno/boards/uno-q/datasheet/datasheet.md +++ b/content/hardware/02.uno/boards/uno-q/datasheet/datasheet.md @@ -254,6 +254,120 @@ JMISC handles both domains: 1.8 V MPU lines sit alongside 3.3 V MCU signals (e.g MPU GPIO signals operate in the application processor's low-voltage domain (1.8 V). Ensure any connection to the microcontroller is level-compatible with its I/O voltage rail (3.3 V). For example, use a level shifter or an open-drain configuration with a pull-up to the microcontroller's I/O rail. +
+ +## Hardware Acceleration + +

The UNO Q provides hardware acceleration for both 3D graphics and video encoding/decoding through the integrated Adreno 702 GPU running at 845 MHz.

+ +### Graphics Acceleration + +

The Adreno 702 GPU provides hardware-accelerated 3D graphics rendering through open-source Mesa drivers. Applications can access GPU acceleration via standard graphics APIs, including OpenGL, OpenGL ES, Vulkan, and OpenCL.

+ +| **Graphics API** | **Driver** | **Hardware Support** | **Current Driver Version** | **Device Name** | +|------------------|------------|----------------------|----------------------------|------------------------| +| Desktop OpenGL | freedreno | - | 3.1 | FD702 | +| OpenGL ES | freedreno | 3.1 | 3.1 | FD702 | +| Vulkan | turnip | 1.1 | 1.0.318 | Turnip Adreno (TM) 702 | +| OpenCL | Mesa | 2.0 | 2.0 | - | + +

The Adreno 702 GPU features unified memory architecture, sharing system RAM with the CPU for data transfer. It supports 64-bit memory addressing and provides direct rendering capabilities for optimal graphics performance.

+ +| **Parameter** | **Specification** | +|--------------------------------|----------------------------------| +| Clock Frequency | 845 MHz | +| Memory Architecture | Unified (shared with system RAM) | +| Available Video Memory | 1740 MB | +| Memory Addressing | 64-bit | +| Direct Rendering | Yes | +| Maximum 2D Texture Size | 16384 × 16384 pixels | +| Maximum 3D Texture Size | 2048³ voxels | +| Maximum Cube Map Size | 16384 × 16384 pixels | +| OpenGL Shading Language (GLSL) | 1.40 | +| OpenGL ES Shading Language | 3.10 ES | + +

The Mesa graphics stack provides support for standard OpenGL extensions and features. Applications using OpenGL, OpenGL ES, or Vulkan will automatically use hardware acceleration without additional configuration. Standard graphics utilities such as mesa-utils and vulkan-tools work out of the box on the UNO Q.

+ +
+ Note: The OpenGL and Vulkan drivers are available through the freedreno (OpenGL/OpenGL ES) and turnip (Vulkan) open-source Mesa drivers, providing transparency and community support. While the Adreno 702 hardware supports Vulkan 1.1, the current driver implementation provides Vulkan 1.0.318. There are no UNO Q-specific OpenGL or Vulkan examples. However, standard Mesa utilities and examples from the Mesa project can be used as references. +
+ +### Video Acceleration + +

The Adreno 702 GPU includes dedicated hardware video encoders and decoders accessible through the V4L2 (Video4Linux2) API via /dev/video0 and /dev/video1 devices. Hardware acceleration is available for the following video codecs:

+ +| **Codec** | **Encoding** | **Decoding** | **GStreamer Element** | +|--------------|--------------|--------------|---------------------------| +| H.264 (AVC) | Yes | Yes | v4l2h264enc / v4l2h264dec | +| H.265 (HEVC) | Yes | Yes | v4l2h265enc / v4l2h265dec | +| VP9 | No | Yes | v4l2vp9dec | + +

The hardware video encoder and decoder offload compression and decompression tasks from the CPU to dedicated hardware, enabling efficient real-time video processing. This reduces system power consumption and allows the CPU to focus on application logic. Hardware acceleration is available for resolutions up to 1920×1080 (Full HD), including common formats such as 720p (1280×720).

+ +#### GStreamer Integration + +

The recommended approach for accessing hardware video acceleration is through GStreamer, which provides a high-level pipeline interface to the V4L2 devices. The following GStreamer elements provide hardware-accelerated video processing:

+ +For H.264 decoding, the following pipeline can be used: + +```bash +gst-launch-1.0 filesrc location=videos/xxxxx.mp4 \ + ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! v4l2h264dec \ + ! videoconvert ! autovideosink +``` + +For H.265 decoding, the following pipeline can be used: + +```bash +gst-launch-1.0 filesrc location=videos/xxxxx.mp4 \ + ! qtdemux name=demux demux.video_0 ! queue ! h265parse ! v4l2h265dec \ + ! videoconvert ! autovideosink +``` + +For VP9 decoding, the following pipeline can be used: + +```bash +gst-launch-1.0 filesrc location=videos/xxxxx.webm \ + ! matroskademux ! queue ! v4l2vp9dec \ + ! videoconvert ! autovideosink +``` + +For H.264 encoding, the following pipeline can be used: + +```bash +gst-launch-1.0 videotestsrc num-buffers=30 \ + ! video/x-raw,width=1280,height=720,framerate=30/1 \ + ! v4l2h264enc ! h264parse ! mp4mux ! filesink location=/tmp/output.mp4 +``` + +For H.265 encoding, the following pipeline can be used: + +```bash +gst-launch-1.0 videotestsrc num-buffers=30 \ + ! video/x-raw,width=1920,height=1080,framerate=30/1 \ + ! v4l2h265enc ! h265parse ! mp4mux ! filesink location=/tmp/output.mp4 +``` + +For concurrent encoding and decoding, the following pipeline can be used: + +```bash +gst-launch-1.0 -v videotestsrc num-buffers=1000 \ + ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 \ + ! v4l2h264enc capture-io-mode=4 output-io-mode=2 ! h264parse \ + ! v4l2h264dec capture-io-mode=4 output-io-mode=2 ! videoconvert \ + ! autovideosink +``` + +
+ Developer Access: The V4L2 video devices are accessible through standard Linux APIs, allowing direct integration into C/C++ applications using libv4l2 or through higher-level frameworks like GStreamer, FFmpeg, or OpenCV with V4L2 backend support. +
+ +### OpenCL Support + +

OpenCL 2.0 support is available through the Mesa implementation, allowing general-purpose GPU (GPGPU) computing for parallel processing tasks, scientific computing, and compute-intensive operations. The Adreno 702's OpenCL capabilities allow offloading compute-intensive workloads from the CPU to the GPU for improved performance.

+ +
+ ## Peripherals ![UNO Q Peripherals](assets/ABX00162-ABX00173_headers.png) @@ -538,7 +652,7 @@ For first time setting up: 1. Install Arduino App Lab [1], launch it, and connect UNO Q, use a **USB-C data** cable for PC-hosted mode, or simply power the board for SBC mode. 2. The board will automatically check for updates. If there are any updates available, you will be prompted to install them. Once the update is finished, the Arduino App Lab[1] will need to be restarted. -3. During the first setup, you will be asked to provide a name and password for the device (default is `arduino` / `arduino`). You will also be asked to provide Wi-Fi® credentials for your local network. +3. During the first setup, you will be asked to provide a name and password for the device. You will also be asked to provide Wi-Fi® credentials for your local network. 4. To test the board, navigate to an example App in the **"Examples"** section of the Arduino App Lab[1], and click on the "Run" button in the top right corner. You can also create a new App in the **"Apps"** section. 5. The status of the App can be monitored in the console tab of the App. @@ -727,6 +841,7 @@ Lors de l’ installation et de l’ exploitation de ce dispositif, la distance | **Date** | **Revision** | **Changes** | | :--------: | :----------: | ---------------------------------------------- | +| 24/11/2025 | 4 | Add hardware acceleration section (graphics APIs, video codecs, OpenCL support); remove incorrect default password reference | | 05/11/2025 | 3 | Update operational information | | 27/10/2025 | 2 | Mechanical drawing and RTC power detail update | | 01/10/2025 | 1 | First release | diff --git a/content/hardware/02.uno/boards/uno-q/tutorials/01.user-manual/assets/arduino-ide.png b/content/hardware/02.uno/boards/uno-q/tutorials/01.user-manual/assets/arduino-ide.png new file mode 100644 index 0000000000..b5a2f5bfe0 Binary files /dev/null and b/content/hardware/02.uno/boards/uno-q/tutorials/01.user-manual/assets/arduino-ide.png differ diff --git a/content/hardware/02.uno/boards/uno-q/tutorials/01.user-manual/assets/bsp-install.png b/content/hardware/02.uno/boards/uno-q/tutorials/01.user-manual/assets/bsp-install.png new file mode 100644 index 0000000000..21a8a58c10 Binary files /dev/null and b/content/hardware/02.uno/boards/uno-q/tutorials/01.user-manual/assets/bsp-install.png differ diff --git a/content/hardware/02.uno/boards/uno-q/tutorials/01.user-manual/assets/custom-python-rpc.png b/content/hardware/02.uno/boards/uno-q/tutorials/01.user-manual/assets/custom-python-rpc.png new file mode 100644 index 0000000000..2730e53374 Binary files /dev/null and b/content/hardware/02.uno/boards/uno-q/tutorials/01.user-manual/assets/custom-python-rpc.png differ diff --git a/content/hardware/02.uno/boards/uno-q/tutorials/01.user-manual/content.md b/content/hardware/02.uno/boards/uno-q/tutorials/01.user-manual/content.md index bc46225680..e0e5b6680f 100644 --- a/content/hardware/02.uno/boards/uno-q/tutorials/01.user-manual/content.md +++ b/content/hardware/02.uno/boards/uno-q/tutorials/01.user-manual/content.md @@ -154,6 +154,40 @@ You should now see the red LED of the built-in RGB LED turning on for one second ***The LED controlled in this example is driven by the STM32 microcontroller through the Arduino sketch.*** +### Arduino IDE (Beta) + +The Arduino UNO Q is compatible with the standard Arduino IDE, allowing you to program the board using the familiar Arduino language and ecosystem. + +![Arduino IDE + UNO Q](assets/arduino-ide.png) + +***The Arduino UNO Q features a dual-processor architecture. The Arduino IDE targets and programs only the __UNO Q Microcontroller (STM32)__. If you wish to program the Qualcomm Microprocessor, please refer to the [Arduino App Lab section](#install-arduino-app-lab).*** + +#### Installing the UNO Q Core + +To start using the board, you must first install the specific core that supports the UNO Q architecture (based on Zephyr). + +1. Open the Arduino IDE. +2. Navigate to **Tools > Board > Boards Manager...** or click the **Boards Manager** icon in the left sidebar. +3. In the search bar, type `UNO Q`. +4. Locate the **Arduino UNO Q Zephyr Core** and click **Install**. + +![Installing the UNO Q Zephyr Core](assets/bsp-install.png) + +***Troubleshooting: If the core does not appear in the search results, you may need to add the package manually. Go to __File > Preferences__ and add the following link to the __Additional Boards Manager URLs__ field: `https://downloads.arduino.cc/packages/package_zephyr_index.json`*** + +#### Hello World (Blink) + +Once the core is installed, you can verify that everything is working by uploading the classic Blink sketch. + +1. **Select the Board:** Go to **Tools > Board > Arduino UNO Q Board** and select **Arduino UNO Q**. +2. **Select the Port:** Connect your board via USB-C. Go to **Tools > Port** and select the port corresponding to your UNO Q. +3. **Open the Example:** Go to **File > Examples > 01.Basics > Blink**. +4. **Upload:** Click the **Upload** button (right arrow icon) in the top toolbar. + +The IDE will compile the sketch and upload it to the STM32 microcontroller. You should now see the red LED of the built-in RGB LED turning on for one second, then off for one second, repeatedly. + +![Red LED blinking](assets/blinking-led.gif) + ## Onboard User Interface The Arduino UNO Q offers a wide range of user interfaces, making interaction intuitive and straightforward. @@ -287,8 +321,8 @@ LEDs #1 and #2 are controlled by the MPU. There is a dedicated LED interface in our Linux OS for controlling these LEDs, they can be controlled via `/sys/class/leds` from the **Command Line**, using **SSH**, an **ADB** connection from your PC terminal or by using the Linux built-in terminal application when used in single-board computer mode: ```bash -echo 1 | sudo tee /sys/class/leds/red:user/brightness # set HIGH/ON -echo 0 | sudo tee /sys/class/leds/red:user/brightness # set LOW/OFF +echo 1 | tee /sys/class/leds/red:user/brightness # set HIGH/ON +echo 0 | tee /sys/class/leds/red:user/brightness # set LOW/OFF ``` ![Linux LED control](assets/linux-led-control.gif) @@ -785,24 +819,126 @@ The `Bridge` library provides a communication layer built on top of the `Arduino - **MPU side (Qualcomm QRB, Linux)**: Runs higher-level services and can remotely invoke MCU functions. - **MCU side (STM32, Zephyr RTOS)**: Handles time-critical tasks and exposes functions to the MPU via RPC. +#### The Arduino Router (Infrastructure) + +Under the hood, the communication is managed by a background Linux service called the **Arduino Router** (`arduino-router`). + +While the `Bridge` library is what you use in your code, the Router is the traffic controller that makes it possible. It implements a **Star Topology** network using MessagePack RPC. + +**Key Features:** + +- **Multipoint Communication:** Unlike simple serial communication (which is typically point-to-point), the Router allows multiple Linux processes to communicate with the MCU simultaneously (and with each other). + + **Linux ↔ MCU:** Multiple Linux processes can interact with the MCU simultaneously (e.g., a Python® script reading sensors while a separate C++ application commands motors). + + **Linux ↔ Linux:** You can use the Router to bridge different applications running on the MPU. For example, a Python script can expose an RPC function that another Python® or C++ application calls directly, allowing services to exchange data without involving the MCU at all. + +- **Service Discovery:** Clients (like your Python® script or the MCU Sketch) "register" functions they want to expose. The Router keeps a directory of these functions and routes calls to the correct destination. + +**Source Code:** + +- **[Arduino Router Service](https://github.com/arduino/arduino-router)** +- **[Arduino_RouterBridge Library](https://github.com/arduino-libraries/Arduino_RouterBridge/tree/main)** + +#### System Configuration & Hardware Interfaces + +The Router manages the physical connection between the two processors. It is important to know which hardware resources are claimed by the Router to avoid conflicts in your own applications. + +* **Linux Side (MPU):** The router claims the serial device `/dev/ttyHS1`. +* **MCU Side (STM32):** The router claims the hardware serial port `Serial1`. + +> **⚠️ WARNING: Reserved Resources** +> Do not attempt to open `/dev/ttyHS1` (on Linux) or `Serial1` (on Arduino/Zephyr) in your own code. These interfaces are exclusively locked by the `arduino-router` service. Attempting to access them directly will cause the Bridge to fail. + +#### Managing the Router Service + +The arduino-router runs automatically as a system service. In most cases, you do not need to interact with it directly. However, if you are debugging advanced issues or need to restart the communication stack, you can control it via the Linux terminal: + +**Check Status** To see if the router is running and connected: +```bash +systemctl status arduino-router +``` +**Restart the Service** If the communication seems stuck, you can restart the router without rebooting the board: +```bash +sudo systemctl restart arduino-router +``` +**View Logs** To view the real-time logs for debugging (e.g., to see if RPC messages are being rejected or if a client has disconnected): +```bash +journalctl -u arduino-router -f +``` + +To capture more detailed information in the logs, you can append the `--verbose` argument to the systemd service configuration. + +- Open the service file for editing: + ```bash + sudo nano /etc/systemd/system/arduino-router.service + ``` + +- Locate the line beginning with `ExecStart=` and append `--verbose` to the end of the command. The updated service file should look like this: + + ```bash + [Unit] + Description=Arduino Router Service + After=network-online.target + Wants=network-online.target + Requires= + + [Service] + # Put the micro in a ready state. + ExecStartPre=-/usr/bin/gpioset -c /dev/gpiochip1 -t0 37=0 + ExecStart=/usr/bin/arduino-router --unix-port /var/run/arduino-router.sock --serial-port /dev/ttyHS1 --serial-baudrate 115200 --verbose # <--- ADD THIS + # End the boot animation after the router is started. + ExecStartPost=/usr/bin/gpioset -c /dev/gpiochip1 -t0 70=1 + StandardOutput=journal + StandardError=journal + Restart=always + RestartSec=3 + + [Install] + WantedBy=multi-user.target + ``` + +- You must reload the systemd daemon for the configuration changes to take effect. + + ```bash + sudo systemctl daemon-reload + ``` + +- Restart the Router: + + ```bash + sudo systemctl restart arduino-router + ``` + +- View the verbose logs: + + ```bash + journalctl -u arduino-router -f + ``` + #### Core Components -`BridgeClass` -- Main class managing RPC clients and servers. Provides methods to: -- Initialize the bridge (`begin()`) -- Call remote procedures (`call()`) -- Notify without waiting for a response (`notify()`) -- Expose local functions for remote execution (`provide()`, `provide_safe()`) -- Process incoming requests (`update()`) +`BridgeClass` The main class managing RPC clients and servers. +- `begin()`: Initializes the bridge and the internal serial transport. +- `call(method, args...)`: Invokes a function on the Linux side and waits for a result. +- `notify(method, args...)`: Invokes a function on the Linux side without waiting for a response (fire-and-forget). +- `provide(name, function)`: Exposes a local MCU function to Linux. Note: The function executes in the high-priority background RPC thread. Keep these functions short and thread-safe. +- `provide_safe(name, function)`: Exposes a local MCU function, but ensures it executes within the main `loop()` context. Use this if your function interacts with standard Arduino APIs (like `digitalWrite` or `Serial`) to avoid concurrency crashes. + +***__Warning:__ Do not use `Bridge.call()` or `Monitor.print()` inside `provide()` functions. Initiating a new communication while responding to one causes system deadlocks.*** +`RpcCall` +- Helper class representing an asynchronous RPC. If its `.result` method is invoked, it waits for the response, extracts the return value, and propagates error codes if needed. -`RpcResult` -- Helper class representing the result of a remote call. It waits for the response, extracts the return value, and propagates error codes if needed. +`Monitor` +- The library includes a pre-defined Monitor object. This allows the Linux side to send text streams to the MCU (acting like a virtual Serial Monitor) via the RPC method mon/write. **Threading and Safety** - The bridge uses Zephyr mutexes (`k_mutex`) to guarantee safe concurrent access when reading/writing over the transport. Updates are handled by a background thread that continuously polls for requests. +- **Incoming Updates**: Handled by a dedicated background thread (`updateEntryPoint`) that continuously polls for requests. +- **Safe Execution**: The provide_safe mechanism hooks into the main loop (`__loopHook`) to execute user callbacks safely when the processor is idle. -#### Usage Example +#### Usage Example (Arduino App Lab) This example shows the **Linux side (Qualcomm QRB)** toggling an LED on the **MCU (STM32)** by calling a remote function over the Bridge. @@ -863,6 +999,117 @@ After pasting the Python script into your App’s Python file and the Arduino co ***There are more advanced methods in the Bridge RPC library that you can discover by testing our different built-in examples inside Arduino App Lab.*** +#### Interacting via Unix Socket (Advanced) + +Linux processes communicate with the Router using a **Unix Domain Socket** located at: +`/var/run/arduino-router.sock` + +While the `Bridge` library handles this automatically for you, you can manually connect to this socket to interact with the MCU or other Linux services using any language that supports **MessagePack RPC** (e.g., Python, C++, Rust, Go). + +#### Usage Example (Custom Python Client) + +The following example demonstrates how to control an MCU function (`set_led_state`) from a standard Python script using the `msgpack` library, without using the Arduino App Lab helper classes. This is useful for integrating Arduino functions into existing Linux applications. + +**Prerequisites:** + +1. **Flash the MCU Sketch** + + Upload the following code using the Arduino IDE or Arduino App Lab. This registers the function we want to call. + + ```cpp + #include "Arduino_RouterBridge.h" + + void setup() { + pinMode(LED_BUILTIN, OUTPUT); + + Bridge.begin(); + // We use provide_safe to ensure the hardware call runs in the main loop context + Bridge.provide_safe("set_led_state", set_led_state); + } + + void loop() { + } + + void set_led_state(bool state) { + digitalWrite(LED_BUILTIN, state ? LOW : HIGH); + } + ``` +2. **Install the Python Dependency** + + Install the msgpack library using the system package manager: + + ```bash + sudo apt install python3-msgpack + ``` +3. **Create the Python Script** + + Create a new file named msgpack_test.py: + + ```bash + nano msgpack_test.py + ``` +4. **Add the Script Content** + + Copy and paste the following code. This script connects manually to the Router's Unix socket and sends a raw RPC request. + + ```python + import socket + import msgpack + import sys + + # 1. Define the connection to the Router's Unix Socket + SOCKET_PATH = "/var/run/arduino-router.sock" + + # 2. Parse command line arguments + # Default to turning LED ON (True) if no argument is provided + led_state = True + + if len(sys.argv) > 1: + arg = sys.argv[1] + if arg == "1": + led_state = True + elif arg == "0": + led_state = False + else: + print("Usage: python3 msgpack_test.py [1|0]") + sys.exit(1) + + print(f"Sending request to set LED: {led_state}") + + # 3. Create the MessagePack RPC Request + # Format: [type=0 (Request), msgid=1, method="set_led_state", params=[led_state]] + request = [0, 1, "set_led_state", [led_state]] + packed_req = msgpack.packb(request) + + # 4. Send the request + try: + with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as client: + client.connect(SOCKET_PATH) + client.sendall(packed_req) + + # 5. Receive the response + response_data = client.recv(1024) + response = msgpack.unpackb(response_data) + + # Response Format: [type=1 (Response), msgid=1, error=None, result=None] + print(f"Router Response: {response}") + + except Exception as e: + print(f"Connection failed: {e}") + ``` + +**Running the Example** + +You can now test the connection by running the script from the terminal and passing `1` (ON) or `0` (OFF): + +```bash +python3 msgpack_test.py 1 # to turn on the LED +# or +python3 msgpack_test.py 0 # to turn off the LED +``` +![Custom Python to Router example](assets/custom-python-rpc.png) + + ### SPI The UNO Q supports SPI communication, which allows data transmission between the board and other SPI-compatible devices. @@ -1176,6 +1423,47 @@ If you want to forget the saved network so it doesn’t auto-connect again, you sudo nmcli connection delete ``` +#### WPA2-Enterprise Connections + +To connect to a WPA2-Enterprise network, you need to provide additional authentication configuration. The possible configurations can be complex; please refer to the [official documentation](https://people.freedesktop.org/~lkundrak/nm-dbus-api/nm-settings.html) for a comprehensive list of options. + +For example, here is the configuration for **Eduroam**, an international Wi-Fi roaming service for users in research and education. + +```bash +nmcli con add \ + type wifi \ + connection.id Eduroam \ # Connection name + wifi.ssid eduroam \ # Network Wi-Fi SSID + wifi.mode infrastructure \ + wifi-sec.key-mgmt wpa-eap \ + 802-1x.eap peap \ + 802-1x.phase2-auth mschapv2 \ + 802-1x.identity +``` + + + +Here's another example using TTLS authentication with PAP: + +```bash +nmcli con add \ + type wifi \ + connection.id ExampleNetwork \ # Connection name + wifi.ssid \ # Network Wi-Fi SSID + wifi.mode infrastructure \ + wifi-sec.key-mgmt wpa-eap \ + 802-1x.eap ttls \ + 802-1x.phase2-auth pap \ + 802-1x.domain-suffix-match example.com \ + 802-1x.identity +``` + +If you prefer not to store your password in plain text (especially when it contains special characters), you can use the `--ask` flag to be prompted for the password interactively when connecting: + +```bash +nmcli --ask con up +``` + #### From the Microcontroller Since the radio module is connected to the Qualcomm microprocessor, we need the **Bridge** to expose the connectivity to the microcontroller. diff --git a/content/hardware/02.uno/boards/uno-q/tutorials/04.update-image/update-image.md b/content/hardware/02.uno/boards/uno-q/tutorials/04.update-image/update-image.md index 0882107ed1..ff5437eeb8 100644 --- a/content/hardware/02.uno/boards/uno-q/tutorials/04.update-image/update-image.md +++ b/content/hardware/02.uno/boards/uno-q/tutorials/04.update-image/update-image.md @@ -23,16 +23,19 @@ However, if we want to hard-reset the board and perform a fresh installation, it ### Software Requirements +- [Arduino Flasher CLI](https://www.arduino.cc/en/software/#flasher-tool) +- At least 10 GB of free disk space + To re-flash the board, we will use the **Arduino Flasher CLI** tool: - Download the [Arduino Flasher CLI](https://www.arduino.cc/en/software/#flasher-tool) -***Note that this tool will download an image with a size that exceeds 1 GB. A stable Internet connection is recommended.*** +***Note that this tool will download an image with a size that exceeds 1 GB. A stable Internet connection and at least 10 GB of free disk space is recommended.*** ## Download & Install CLI Tool 1. Download the [Arduino Flasher CLI](https://www.arduino.cc/en/software/#flasher-tool) for your OS (MacOS / Linux / Windows) -2. Unzip the downloaded file, (you will receive a executable binary named `arduino-flasher-cli`) +2. Unzip the downloaded file, (you will receive an executable binary named `arduino-flasher-cli`) ### Verify Tool Is Installed @@ -50,13 +53,13 @@ You should see something like: ![Output from testing tool (MacOS)](assets/macos.png) -This means it is working, and we can proceed to [flashing the board](#flash-image-to-the-board). +This means it is working, and we can proceed to [preparing the hardware](#preparing-the-hardware). **Important Note:** Do not run the file directly from Finder, you will receive a prompt window akin to: ![Error running ](assets/error-finder.png) -As the tool is ran from the command line with specific flags (explained further below), there is no reason to run it from Finder. +As the tool is run from the command line with specific flags (explained further below), there is no reason to run it from Finder. #### Windows @@ -70,7 +73,7 @@ A new window should appear, prompting you to install the driver. Install it, and ![Output from testing tool (Windows)](assets/windows.png) -This means it is working, and we can proceed to [flashing the board](#flash-image-to-the-board). +This means it is working, and we can proceed to [preparing the hardware](#preparing-the-hardware). #### Linux @@ -84,7 +87,7 @@ You should see something like: ![Output from testing tool (Linux)](assets/linux.png) -This means it is working, and we can proceed to [flashing the board](#flash-image-to-the-board). +This means it is working, and we can proceed to [preparing the hardware](#preparing-the-hardware). ***Note: in some Linux systems, the `arduino-flasher-cli` could exit with an error right before flashing. This may occur if the kernel module `qcserial` is loaded. A workaround solution to fix this is in place (see section below).*** diff --git a/content/hardware/02.uno/boards/uno-q/tutorials/06.adb/adb.md b/content/hardware/02.uno/boards/uno-q/tutorials/06.adb/adb.md new file mode 100644 index 0000000000..a536186ac2 --- /dev/null +++ b/content/hardware/02.uno/boards/uno-q/tutorials/06.adb/adb.md @@ -0,0 +1,80 @@ +--- +title: Connect to UNO Q via ADB +description: Learn how to connect to the UNO Q's shell via ADB. +author: Karl Söderby +tags: [UNO Q, ADB, Linux] +--- + +The Linux OS running on the [Arduino UNO Q](https://store.arduino.cc/products/uno-q) can be accessed over USB, using a tool called Android Debug Bridge (ADB). + +ADB is a tool that you install on your computer, where you can access the board's shell and run operations on the system. + +## Requirements + +The following hardware is required: +- [Arduino UNO Q](https://store.arduino.cc/products/uno-q) +- [USB-C® type cable](https://store.arduino.cc/products/usb-cable2in1-type-c) + +You will also need to have the following software installed on your OS: +- [Android Debug Bridge](https://developer.android.com/tools/releases/platform-tools) + +## Installing ADB (Host Computer) + +The ADB command line tool is supported on MacOS, Windows & Linux. For more specific instructions for your OS, see the sections below. + +***You can find more information and download the latest version for the tool for all operating systems directly from the [Android SDK Platform Tools](https://developer.android.com/tools/releases/platform-tools#downloads) page.*** + +### MacOS + +To install the ADB tools on **MacOS**, we can use `homebrew`. Open the terminal and run the following command: + +```bash +brew install android-platform-tools +``` + +To verify the tool is installed, run `adb version`. + +### Windows + +To install the ADB tools on **Windows**, we can use `winget`, supported on Windows 11 and on some earlier Windows 10 versions. + +Open a terminal and run the following: + +```bash +winget install Google.PlatformTools +``` + +To verify the tool is installed, run `adb version`. + +### Linux + +To install ADB tools on a **Debian/Ubuntu Linux distribution**, open a terminal and run the following command: + +```bash +sudo apt-get install android-sdk-platform-tools +``` + +To verify the tool is installed, run `adb version`. + +## Connect via ADB + +1. Connect the UNO Q board to your computer via USB-C®. +2. Run `adb devices` in the terminal. This should list the connected devices. + + ![Connected devices](assets/connected-devices.png) + +>Note that it may take up to a minute for the device to appear after connecting it. + +3. Run `adb shell`. If you have not set up your board prior to this via the Arduino App Lab, you may be required to provide a password, which is `arduino`. +4. You should now be inside your board's terminal. + + ![Terminal on the board.](assets/board-terminal.png) + +5. You are now able to run commands via the terminal on your board! To exit from the terminal, simply type `exit`. + +## Summary + +Connecting via ADB is an easy way to gain access to your board's shell, allowing you to perform actions such as installing packages, editing files and running scripts. + +The `arduino-app-cli` can also be used directly via the shell, allowing you to launch Apps directly from the command line. You can read more about that in the link below: +- [Arduino App CLI: Manage Apps from the Command Line](/software/app-lab/tutorials/cli/) \ No newline at end of file diff --git a/content/hardware/02.uno/boards/uno-q/tutorials/06.adb/assets/board-terminal.png b/content/hardware/02.uno/boards/uno-q/tutorials/06.adb/assets/board-terminal.png new file mode 100644 index 0000000000..3a83ffa5ee Binary files /dev/null and b/content/hardware/02.uno/boards/uno-q/tutorials/06.adb/assets/board-terminal.png differ diff --git a/content/hardware/02.uno/boards/uno-q/tutorials/06.adb/assets/connected-devices.png b/content/hardware/02.uno/boards/uno-q/tutorials/06.adb/assets/connected-devices.png new file mode 100644 index 0000000000..ed27cffab4 Binary files /dev/null and b/content/hardware/02.uno/boards/uno-q/tutorials/06.adb/assets/connected-devices.png differ diff --git a/content/hardware/02.uno/boards/uno-r4-minima/tutorials/adc-resolution/adc-resolution.md b/content/hardware/02.uno/boards/uno-r4-minima/tutorials/adc-resolution/adc-resolution.md index 0df2ae9f53..ab75b53273 100644 --- a/content/hardware/02.uno/boards/uno-r4-minima/tutorials/adc-resolution/adc-resolution.md +++ b/content/hardware/02.uno/boards/uno-r4-minima/tutorials/adc-resolution/adc-resolution.md @@ -25,7 +25,7 @@ The goals of this tutorials are: An analog-to-digital converter (ADC) transforms an analog signal to a digital one. The standard resolution on Arduino boards is set to 10-bit (0-1023). The UNO R4 Minima supports up to 14-bit resolutions, which can provide a more precise value from analog signals. -To update the resolution, you will only need to use the [analogReadResolution()](https://reference.arduino.cc/reference/en/language/functions/zero-due-mkr-family/analogreadresolution/) command. +To update the resolution, you will only need to use the [analogReadResolution()](https://docs.arduino.cc/language-reference/en/functions/analog-io/analogReadResolution/) command. To use it, simply include it in your `setup()`, and use `analogRead()` to retrieve a value from an analog pin. @@ -42,4 +42,4 @@ void loop(){ ## Summary -This short tutorial shows how to update the resolution for your ADC, a new feature available on the UNO R4 Minima board. \ No newline at end of file +This short tutorial shows how to update the resolution for your ADC, a new feature available on the UNO R4 Minima board. diff --git a/content/hardware/02.uno/boards/uno-r4-wifi/tutorials/adc-resolution/adc-resolution.md b/content/hardware/02.uno/boards/uno-r4-wifi/tutorials/adc-resolution/adc-resolution.md index 9c093fb817..4889fb0c21 100644 --- a/content/hardware/02.uno/boards/uno-r4-wifi/tutorials/adc-resolution/adc-resolution.md +++ b/content/hardware/02.uno/boards/uno-r4-wifi/tutorials/adc-resolution/adc-resolution.md @@ -27,7 +27,7 @@ The goals of this tutorials are: An analog-to-digital converter (ADC) transforms an analog signal to a digital one. The standard resolution on Arduino boards is set to 10-bit (0-1023). The UNO R4 WiFi supports up to 14-bit resolutions, which can provide a more precise value from analog signals. -To update the resolution, you will only need to use the [analogReadResolution()](https://reference.arduino.cc/reference/en/language/functions/zero-due-mkr-family/analogreadresolution/) command. +To update the resolution, you will only need to use the [analogReadResolution()](https://docs.arduino.cc/language-reference/en/functions/analog-io/analogReadResolution/) command. To use it, simply include it in your `setup()`, and use `analogRead()` to retrieve a value from an analog pin. diff --git a/content/hardware/02.uno/shields/4-relays-shield/product.md b/content/hardware/02.uno/shields/4-relays-shield/product.md index 6218de704d..65e407f525 100644 --- a/content/hardware/02.uno/shields/4-relays-shield/product.md +++ b/content/hardware/02.uno/shields/4-relays-shield/product.md @@ -8,4 +8,5 @@ forumCategorySlug: '/hardware/12' sku: [A000110] --- -The Arduino 4 Relays Shield allows your Arduino driving high power loads. \ No newline at end of file +The Arduino 4 Relays Shield allows your Arduino to drive high power loads. + diff --git a/content/hardware/02.uno/shields/4-relays-shield/tutorials/4-relay-shield-basics/4-relay-shield-basics.md b/content/hardware/02.uno/shields/4-relays-shield/tutorials/4-relay-shield-basics/4-relay-shield-basics.md index dcdb04ac48..5936b4d731 100644 --- a/content/hardware/02.uno/shields/4-relays-shield/tutorials/4-relay-shield-basics/4-relay-shield-basics.md +++ b/content/hardware/02.uno/shields/4-relays-shield/tutorials/4-relay-shield-basics/4-relay-shield-basics.md @@ -79,10 +79,10 @@ We will now get to the programming part of this tutorial. First, let's take a look at how we will activate our relays. We are actually not using a library, as the operation is very basic. -- `int relay_1 = 4;` - assigns `relay_1` to pin 4. It is important that we assign it to pin 1, as the relay is internally wired to this pin. -- `int relay_2 = 7;` - assigns `relay_2` to pin 7. Same here, the relay is wired to pin 2, so we can't use a pin of our choosing. -- `int relay_3 = 8;` - assigns `relay_3` to pin 8. Same here, the relay is wired to pin 2, so we can't use a pin of our choosing. -- `int relay_4 = 12;` - assigns `relay_4` to pin 12. Same here, the relay is wired to pin 2, so we can't use a pin of our choosing. +- `int relay_1 = 4;` - assigns `relay_1` to pin 4. It is important that we assign it to pin 4, as the relay is internally wired to this pin. +- `int relay_2 = 7;` - assigns `relay_2` to pin 7. Same here, the relay is wired to pin 7, so we can't use a pin of our choosing. +- `int relay_3 = 8;` - assigns `relay_3` to pin 8. Same here, the relay is wired to pin 8, so we can't use a pin of our choosing. +- `int relay_4 = 12;` - assigns `relay_4` to pin 12. Same here, the relay is wired to pin 12, so we can't use a pin of our choosing. - `pinMode(relay_X, OUTPUT)` - configures relay 1 to be an `OUTPUT`. - `digitalWrite(relay_X, state)` - write either a high or low state to relay 1. diff --git a/content/hardware/03.nano/boards/nano-every/downloads/ABX00028-schematics.pdf b/content/hardware/03.nano/boards/nano-every/downloads/ABX00028-schematics.pdf index e817741452..49154ac895 100644 Binary files a/content/hardware/03.nano/boards/nano-every/downloads/ABX00028-schematics.pdf and b/content/hardware/03.nano/boards/nano-every/downloads/ABX00028-schematics.pdf differ diff --git a/content/hardware/03.nano/carriers/nano-connector-carrier/certifications/Arduino_ASX00061-CERT_CE.pdf b/content/hardware/03.nano/carriers/nano-connector-carrier/certifications/Arduino_ASX00061-CERT_CE.pdf new file mode 100644 index 0000000000..60ccb85a29 Binary files /dev/null and b/content/hardware/03.nano/carriers/nano-connector-carrier/certifications/Arduino_ASX00061-CERT_CE.pdf differ diff --git a/content/hardware/03.nano/carriers/nano-connector-carrier/certifications/Arduino_ASX00061-CERT_RoHS.pdf b/content/hardware/03.nano/carriers/nano-connector-carrier/certifications/Arduino_ASX00061-CERT_RoHS.pdf new file mode 100644 index 0000000000..3588a82011 Binary files /dev/null and b/content/hardware/03.nano/carriers/nano-connector-carrier/certifications/Arduino_ASX00061-CERT_RoHS.pdf differ diff --git a/content/hardware/03.nano/carriers/nano-connector-carrier/certifications/Arduino_ASX00061-CERT_UKCA.pdf b/content/hardware/03.nano/carriers/nano-connector-carrier/certifications/Arduino_ASX00061-CERT_UKCA.pdf new file mode 100644 index 0000000000..f6b166074a Binary files /dev/null and b/content/hardware/03.nano/carriers/nano-connector-carrier/certifications/Arduino_ASX00061-CERT_UKCA.pdf differ diff --git a/content/hardware/03.nano/carriers/nano-connector-carrier/certifications/Arduino_ASX00061-DoC_FCC.pdf b/content/hardware/03.nano/carriers/nano-connector-carrier/certifications/Arduino_ASX00061-DoC_FCC.pdf new file mode 100644 index 0000000000..8af7281a00 Binary files /dev/null and b/content/hardware/03.nano/carriers/nano-connector-carrier/certifications/Arduino_ASX00061-DoC_FCC.pdf differ diff --git a/content/hardware/04.pro/boards/portenta-c33/compatibility.yml b/content/hardware/04.pro/boards/portenta-c33/compatibility.yml index 4a483f7fdc..7be05bee27 100644 --- a/content/hardware/04.pro/boards/portenta-c33/compatibility.yml +++ b/content/hardware/04.pro/boards/portenta-c33/compatibility.yml @@ -10,7 +10,7 @@ hardware: - nicla-vision shields: - portenta-vision-shield - - portenta-cat-m1-nb-iot-gnss-shield + #- portenta-cat-m1-nb-iot-gnss-shield carriers: - portenta-breakout - portenta-max-carrier diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/edge-control/_unlisted/getting-started-edge-control/content.md b/content/hardware/05.pro-solutions/solutions-and-kits/edge-control/_unlisted/getting-started-edge-control/content.md index 6de3a6a9de..85eb675306 100644 --- a/content/hardware/05.pro-solutions/solutions-and-kits/edge-control/_unlisted/getting-started-edge-control/content.md +++ b/content/hardware/05.pro-solutions/solutions-and-kits/edge-control/_unlisted/getting-started-edge-control/content.md @@ -166,4 +166,4 @@ void loop() { ### Next Steps -We are developing new tutorials on how to connect valves, LCDs, watermark sensors and use many other functionalities of the board. In the mean time you can explore the Arduino Edge Control library to develop your own application. +We are developing new tutorials on how to connect valves, LCDs, watermark sensors and use many other functionalities of the board. In the mean time you can explore the [Arduino Edge Control](https://github.com/arduino-libraries/Arduino_EdgeControl) library to develop your own application. diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/portenta-machine-control/downloads/AKX00032-full-pinout.pdf b/content/hardware/05.pro-solutions/solutions-and-kits/portenta-machine-control/downloads/AKX00032-full-pinout.pdf index 6d37c5c662..42f2a289b3 100644 Binary files a/content/hardware/05.pro-solutions/solutions-and-kits/portenta-machine-control/downloads/AKX00032-full-pinout.pdf and b/content/hardware/05.pro-solutions/solutions-and-kits/portenta-machine-control/downloads/AKX00032-full-pinout.pdf differ diff --git a/content/hardware/06.nicla/boards/nicla-sense-env/datasheet/assets/Nicla_Sense_Env_Power_Tree.png b/content/hardware/06.nicla/boards/nicla-sense-env/datasheet/assets/Nicla_Sense_Env_Power_Tree.png index 56e7de36f4..838fbc39e3 100644 Binary files a/content/hardware/06.nicla/boards/nicla-sense-env/datasheet/assets/Nicla_Sense_Env_Power_Tree.png and b/content/hardware/06.nicla/boards/nicla-sense-env/datasheet/assets/Nicla_Sense_Env_Power_Tree.png differ diff --git a/content/hardware/06.nicla/boards/nicla-sense-env/datasheet/datasheet.md b/content/hardware/06.nicla/boards/nicla-sense-env/datasheet/datasheet.md index dcda5d1dbf..17622ef4ee 100644 --- a/content/hardware/06.nicla/boards/nicla-sense-env/datasheet/datasheet.md +++ b/content/hardware/06.nicla/boards/nicla-sense-env/datasheet/datasheet.md @@ -1,322 +1,329 @@ ---- -identifier: ABX00089 -title: Arduino® Nicla Sense Env -type: pro -variant: 'Datasheet' -author: José Bagur ---- -![](assets/featured.png) - -# Description -

Start sensing the world around you with Nicla Sense Env. The board combines three state-of-the-art sensors from Renesas® with the simplicity of integration and scalability of the Arduino ecosystem. Expand your Portenta, MKR, or Nano projects by adding a Nicla Sense Env. In addition to its ultra-low power temperature and humidity sensor, it integrates two state-of-the-art, industrial-grade gas sensors, able to evaluate air quality in indoor and outdoor environments.

- - -# Target Areas: -Industrial automation, building automation, prototyping - -# CONTENTS - -## Application Examples - -The Arduino Nicla Sense Env, when combined with Portenta, MKR, or Nano family boards, provides a versatile solution for various sectors. Below are some application examples that demonstrate its transformative potential: - -- **Industrial automation**: The Nicla Sense Env enhances industrial automation by providing precise monitoring and control capabilities, ensuring safety, efficiency, and environmental compliance in various processes. - - **Heat pump machines**: When combined with a Portenta family board, the Nicla Sense Env can be easily installed into any heat pump to properly monitor air quality, temperature, and humidity, both indoors and outdoors. This allows users to adjust the thermostat, set temperature schedules, and review energy consumption and air quality at any time. - - **Industrial processes toxic substances detection**: The Nicla Sense Env can be easily implemented in multiple industrial processes to detect the presence of poisonous substances or gas leakages, such as volatile organic compounds (VOCs), hydrocarbons, CO2, and hydrogen. The data can then be transmitted to the connected Portenta, MKR, or Nano family board to provide real-time alarms. -- **Prototyping**: The Nicla Sense Env offers a ready-to-use solution for developers working on prototypes, integrating various environmental sensors to expedite development. - - **Ready-to-use environmental monitoring prototyping solution**: The Nicla Sense Env is a valuable tool for Portenta, MKR, and Nano family board developers working on prototypes, integrating ready-to-use sensors such as temperature, humidity, and gas sensors. -- **Building automation**: In building automation, the Nicla Sense Env facilitates the creation of intelligent systems that improve comfort, safety, and energy efficiency. - - **Climate control systems**: Integrate a Nicla Sense Env into your HVAC, air conditioning, or ventilation system to accurately measure air quality, humidity, and temperature. This ensures compliance with environmental regulations inside your smart building and increases tenant comfort. - - **Automated air purifier**: With its embedded sensing capabilities, the Nicla Sense Env provides a comprehensive solution for air purifier systems in smart buildings and offices, saving energy and helping to maintain user health and wellness. - - **Fumes and fire detection**: The effects of fire, smoke, and fumes can be catastrophic in various environments. By incorporating intelligent gas sensors with onboard Artificial Intelligence (AI), the Nicla Sense Env can detect the presence of indoor and outdoor carbon dioxide, notifying authorities for timely intervention. - -## Features -### General Specifications Overview - -

-The Nicla Sense Env is a compact, powerful board for environmental sensing applications. It integrates two advanced state-of-the-art, industrial-grade gas sensors, and the Renesas R7FA2E1A92DNH microcontroller, making it ideal for monitoring air quality, temperature, and humidity in various environments. -

- -The main features are highlighted in the table shown below. - -| **Feature** | **Description** | -|-----------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Microcontroller | 48 MHz, Arm® Cortex® M23 (not accessible or programmable by the user) | -| Internal Memory | 128 kB Flash and 16 kB SRAM | -| Power Supply | Various options for easily powering the board: Using the power supply of the connected Portenta, MKR, or Nano board and using an external power supply connected through the board's header connector pins (VCC pin) | -| Analog Peripherals | 12-bit ADC (x2) | -| Digital Peripherals | UART (x1), I2C (x1), SPI (x1) | -| Onboard Humidity and Temperature Sensor | Renesas HS4001 | -| Onboard Indoor Air Quality Sensor | Renesas ZMOD4410AI1V (total volatile organic compounds, CO2, and indoor air quality) | -| Onboard Outdoor Air Quality Sensor | Renesas ZMOD4510AI1V (nitrogen dioxide, ozone, and outdoor air quality) | -| Dimensions | 22.86 mm x 22.86 mm | -| Weight | 2 g | -| Pinout features | Castellated pins allow the board to be SMD soldered on a custom board or carrier | - -
- -### Accessories - -- ESLOV cable (included) -- 12-pin P-MOD header connector (not included, P/N: TSM-106-01-L-DH-TR) - -### Related Products - -- Arduino Portenta C33 (SKU: ABX00074) -- Arduino Portenta H7 (SKU: ABX00042) -- Arduino Portenta H7 Lite (SKU: ABX00045) -- Arduino Portenta H7 Lite Connected (SKU: ABX00046) -- Arduino MKR WiFi 1010 (SKU: ABX00023) -- Arduino MKR WAN 1310 (SKU: ABX00029) -- Arduino MKR Zero (SKU: ABX00012) -- Arduino MKR NB 1500 (SKU: ABX00019) -- Arduino Nano 33 BLE (SKU: ABX00030) -- Arduino Nano 33 BLE Rev2 (SKU: ABX00071) -- Arduino Nano 33 BLE Sense (SKU: ABX00031) -- Arduino Nano 33 BLE Sense Rev2 (SKU: ABX00069) -- Arduino Nano 33 IoT (SKU: ABX00027) -- Arduino Nano ESP32 (SKU: ABX00092) -- Arduino Nano Every (SKU: ABX00028) -- Arduino Nano RP2040 Connect (SKU: ABX00052) -- Arduino UNO R4 Minima (SKU: ABX00080) -- Arduino UNO R4 WiFi (SKU: ABX00087) -- Arduino Zero (SKU: ABX00003) - -
- -## Ratings - -### Recommended Operating Conditions - -

-The table below provides a comprehensive guideline for the optimal use of the Nicla Sense Env, outlining typical operating conditions and design limits. The operating conditions of the Nicla Sense Env are largely based on the specifications of its components. -

- -
- -| **Parameter** | **Symbol** | **Min** | **Typ** | **Max** | **Unit** | -|:--------------------------------:|:--------------:|:-------:|:-------:|:-------:|:--------:| -| Supply Input Voltage1 | VIN | - | 3.3 | - | V | -| ESLOV Input Voltage | VESLOV | - | 5.0 | - | V | -| Operating Temperature | TOP | -40 | - | 85 | °C | - -
- -1 Nicla Sense Env powered through the VCC pin (+3.3 VDC). - -
-

Tip: To put the Nicla Sense Env in deep sleep mode, use the API provided by the Nicla Sense Env Arduino library.

-
- -
-

Safety Note: The Nicla Sense Env board operates at 3.3 VDC, and while its pins are 5 VDC tolerant, we recommend using a level translator when connecting it to 5 VDC-compatible Arduino boards to ensure safe communication and prevent potential damage to the components. This connection can be made either through the Nicla Sense Env’s ESLOV connector or its dedicated I2C pins (I2C0).

-
- - -
- -## Functional Overview - -

-The core of the Nicla Sense Env is the R7FA2E1A92DNH microcontroller from Renesas. The board also contains several sensors and user-programmable LEDs connected to its microcontroller, such as a relative humidity and temperature sensor, indoor and outdoor air quality sensors, and two LEDs, one orange and one RGB LED, available for the user. -

- -### Pinout - -The Nicla Sense Env connectors pinout is shown in the figure below. - -![](assets/Nicla_Sense_Env_Pinout.png) - -
- -### Block Diagram - -An overview of the high-level architecture of the Nicla Sense Env is illustrated in the figure below. - -![](assets/Nicla_Sense_Env_Block_Diagram.png) - -
- -### Power Supply - -
- -The Nicla Sense Env can be powered through one of the following interfaces: - -- **ESLOV connector**: The Nicla Sense Env can be powered through the power supply of a connected Portenta or MKR family board by using the ESLOV connector. -- **External +3.3 VDC power supply**: This can be connected to the VCC pin of the board's header connector. -- **Onboard P-MOD connector**: The Nicla Sense Env can also be powered through the power pins (VCC pin) of the onboard P-MOD connector (VCC pin) using an external +3.3 VDC power supply. - -A detailed figure below illustrates the power options available on the Nicla Sense Env and the main system power architecture. - -![](assets/Nicla_Sense_Env_Power_Tree.png) - -
-Low-Power Tip: Use the API provided by the Nicla Sense Env Arduino library to put the board into low-power and deep sleep mode. -
- -
- -
-Safety Note: If you power your Nicla Sense Env board through its VCC pin, notice that the only operating input voltage is +3.3 VDC; any other voltage will permanently damage the board. -
- -
- -## Device Operation - -
- -### Getting Started - IDE - -If you want to program your Nicla Sense Env offline with a Portenta, MKR, or Nano family board, install the Arduino Desktop IDE **[1]**. You will need a USB cable to connect the Portenta, MKR, or Nano board to your computer. - -### Getting Started - Arduino Web Editor - -All Arduino devices work out of the box on the Arduino Cloud Editor **[2]** by installing a simple plugin. The Arduino Cloud Editor is hosted online. Therefore, it will always be up-to-date with all the latest features and support for all boards and devices. Follow **[3]** to start coding on the browser and upload your sketches onto your device. - -### 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. Take a look at the official documentation to know more. - -### Nicla Sense Env Arduino and MicroPython Library - -The Arduino_NiclaSenseEnv library **[4]** offers an Arduino API to read data from the Nicla Sense Env's onboard sensors (ZMOD4410, ZMOD4510 and HS4001) and control the board's functionality. This library is also available for MicroPython **[5]**. - -### Sample Sketches - -Sample sketches for the Nicla Sense Env can be found either in the “Examples” menu in the Arduino IDE or the “Nicla Sense Env Documentation” section of Arduino documentation **[6]**. - -### Online Resources - -Now that you have gone through the basics of what you can do with the device, you can explore the endless possibilities it provides by checking exciting projects on Arduino Project Hub **[7]**, the Arduino Library Reference **[8]**, and the online store **[9]** where you will be able to complement your Nicla Sense Env board with additional extensions, sensors, and actuators. -
- -
- -## Mechanical Information - -

-The Nicla Sense Env is a double-sided 28.86 mm x 28.86 mm board with an ESLOV connector overhanging the bottom edge and dual castellated/through-hole pins around two of the four edges of the board. -

- -### Board Dimensions - -The Nicla Sense Env board outline is shown in the figure below; all the dimensions are in mm. - -![](assets/Nicla_Sense_Env_Outline.png) - -

-The Nicla Sense Env does not have mounting holes for mechanical fixing. The slots found in the board were placed because of the board's sensor requirements and specifications. -

- -
- -### Board Connectors - -

-The ESLOV connector of the Nicla Sense Env is placed on the bottom side of the board; its placement is shown in the figure below; all the dimensions are in mm. -

- -![](assets/Nicla_Sense_Env_Connectors.png) - -

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

- -
- -### Board Peripherals and Actuators - -

-The Nicla Sense Env has one reset button and two LEDs, an orange and an RGB LED, available for the user; the reset button, the orange LED, and the RGB LED are placed on the top side of the board. The placement of these components is shown in the figure below; all the dimensions are in mm. -

- -![](assets/Nicla_Sense_Env_PeripheralsActuators.png) - -
- -## Product Compliance - -### Product Compliance Summary - -| **Product Compliance** | -|:----------------------:| -| CE (European Union) | -| RoHS | -| REACH | -| WEEE | -| VCCI (Japan) | - -### Japan VCCI Statement - -

-This is a VCCI Class B compliant product. -

- -### 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). -

- -### 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. -

- -| **Substance** | **Maximum Limit (ppm)** | -|----------------------------------------|-------------------------| -| Lead (Pb) | 1000 | -| Cadmium (Cd) | 100 | -| Mercury (Hg) | 1000 | -| Hexavalent Chromium (Cr6+) | 1000 | -| Poly Brominated Biphenyls (PBB) | 1000 | -| Poly Brominated Diphenyl ethers (PBDE) | 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), 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 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. -

- -## Company Information - -| **Company Information** | **Details** | -|-------------------------|--------------------------------------------| -| **Company Name** | Arduino S.r.l. | -| **Company Address** | Via Andrea Appiani, 25-20900 Monza (Italy) | - -## Reference Documentation - -| **No.** | **Reference** | **Link** | -|:-------:|-------------------------------------------|------------------------------------------------------------| -| 1 | Arduino IDE (Desktop) | https://www.arduino.cc/en/Main/Software | -| 2 | Arduino IDE (Cloud) | https://create.arduino.cc/editor | -| 3 | Arduino Cloud - Getting Started | https://docs.arduino.cc/arduino-cloud/guides/overview/ | -| 4 | Arduino_NiclaSenseEnv Library | https://github.com/arduino-libraries/Arduino_NiclaSenseEnv | -| 5 | Arduino_NiclaSenseEnv MicroPython Library | https://github.com/arduino/arduino-nicla-sense-env-mpy/ | -| 6 | Nicla Sense Env Documentation | https://docs.arduino.cc/hardware/nicla-sense-env/ | -| 7 | Project Hub | https://create.arduino.cc/projecthub | -| 8 | Library Reference | https://www.arduino.cc/reference/en/ | -| 9 | Online Store | https://store.arduino.cc/ | - -## Document Revision History - -| **Date** | **Revision** | **Changes** | -|:----------:|:------------:|:------------------------------------------------------:| -| 14/01/2025 | 2 | Update on Product Compliance with Japan VCCI Statement | +--- +identifier: ABX00089 +title: Arduino® Nicla Sense Env +type: pro +variant: 'Datasheet' +author: José Bagur +--- +![](assets/featured.png) + +# Description +

Start sensing the world around you with Nicla Sense Env. The board combines three state-of-the-art sensors from Renesas® with the simplicity of integration and scalability of the Arduino ecosystem. Expand your Portenta, MKR, or Nano projects by adding a Nicla Sense Env. In addition to its ultra-low power temperature and humidity sensor, it integrates two state-of-the-art, industrial-grade gas sensors, able to evaluate air quality in indoor and outdoor environments.

+ + +# Target Areas: +Industrial automation, building automation, prototyping + +# CONTENTS + +## Application Examples + +The Arduino Nicla Sense Env, when combined with Portenta, MKR, or Nano family boards, provides a versatile solution for various sectors. Below are some application examples that demonstrate its transformative potential: + +- **Industrial automation**: The Nicla Sense Env enhances industrial automation by providing precise monitoring and control capabilities, ensuring safety, efficiency, and environmental compliance in various processes. + - **Heat pump machines**: When combined with a Portenta family board, the Nicla Sense Env can be easily installed into any heat pump to properly monitor air quality, temperature, and humidity, both indoors and outdoors. This allows users to adjust the thermostat, set temperature schedules, and review energy consumption and air quality at any time. + - **Industrial processes toxic substances detection**: The Nicla Sense Env can be easily implemented in multiple industrial processes to detect the presence of poisonous substances or gas leakages, such as volatile organic compounds (VOCs), hydrocarbons, CO2, and hydrogen. The data can then be transmitted to the connected Portenta, MKR, or Nano family board to provide real-time alarms. +- **Prototyping**: The Nicla Sense Env offers a ready-to-use solution for developers working on prototypes, integrating various environmental sensors to expedite development. + - **Ready-to-use environmental monitoring prototyping solution**: The Nicla Sense Env is a valuable tool for Portenta, MKR, and Nano family board developers working on prototypes, integrating ready-to-use sensors such as temperature, humidity, and gas sensors. +- **Building automation**: In building automation, the Nicla Sense Env facilitates the creation of intelligent systems that improve comfort, safety, and energy efficiency. + - **Climate control systems**: Integrate a Nicla Sense Env into your HVAC, air conditioning, or ventilation system to accurately measure air quality, humidity, and temperature. This ensures compliance with environmental regulations inside your smart building and increases tenant comfort. + - **Automated air purifier**: With its embedded sensing capabilities, the Nicla Sense Env provides a comprehensive solution for air purifier systems in smart buildings and offices, saving energy and helping to maintain user health and wellness. + - **Fumes and fire detection**: The effects of fire, smoke, and fumes can be catastrophic in various environments. By incorporating intelligent gas sensors with onboard Artificial Intelligence (AI), the Nicla Sense Env can detect the presence of indoor and outdoor carbon dioxide, notifying authorities for timely intervention. + +## Features +### General Specifications Overview + +

+The Nicla Sense Env is a compact, powerful board for environmental sensing applications. It integrates two advanced state-of-the-art, industrial-grade gas sensors, and the Renesas R7FA2E1A92DNH microcontroller, making it ideal for monitoring air quality, temperature, and humidity in various environments. +

+ +The main features are highlighted in the table shown below. + +| **Feature** | **Description** | +|-----------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Microcontroller | 48 MHz, Arm® Cortex® M23 (not accessible or programmable by the user) | +| Internal Memory | 128 kB Flash and 16 kB SRAM | +| Power Supply | Various options for easily powering the board: Using the power supply of the connected Portenta, MKR, or Nano board and using an external power supply connected through the board's header connector pins (VCC pin) | +| Analog Peripherals | 12-bit ADC (x2) | +| Digital Peripherals | UART (x1), I2C (x1), SPI (x1) | +| Onboard Humidity and Temperature Sensor | Renesas HS4001 | +| Onboard Indoor Air Quality Sensor | Renesas ZMOD4410AI1V (total volatile organic compounds, CO2, and indoor air quality) | +| Onboard Outdoor Air Quality Sensor | Renesas ZMOD4510AI1V (nitrogen dioxide, ozone, and outdoor air quality) | +| Dimensions | 22.86 mm x 22.86 mm | +| Weight | 2 g | +| Pinout features | Castellated pins allow the board to be SMD soldered on a custom board or carrier | + +
+ +### Accessories + +- ESLOV cable (included) +- 12-pin P-MOD header connector (not included, P/N: TSM-106-01-L-DH-TR) + +### Related Products + +- Arduino Portenta C33 (SKU: ABX00074) +- Arduino Portenta H7 (SKU: ABX00042) +- Arduino Portenta H7 Lite (SKU: ABX00045) +- Arduino Portenta H7 Lite Connected (SKU: ABX00046) +- Arduino MKR WiFi 1010 (SKU: ABX00023) +- Arduino MKR WAN 1310 (SKU: ABX00029) +- Arduino MKR Zero (SKU: ABX00012) +- Arduino MKR NB 1500 (SKU: ABX00019) +- Arduino Nano 33 BLE (SKU: ABX00030) +- Arduino Nano 33 BLE Rev2 (SKU: ABX00071) +- Arduino Nano 33 BLE Sense (SKU: ABX00031) +- Arduino Nano 33 BLE Sense Rev2 (SKU: ABX00069) +- Arduino Nano 33 IoT (SKU: ABX00027) +- Arduino Nano ESP32 (SKU: ABX00092) +- Arduino Nano Every (SKU: ABX00028) +- Arduino Nano RP2040 Connect (SKU: ABX00052) +- Arduino UNO R4 Minima (SKU: ABX00080) +- Arduino UNO R4 WiFi (SKU: ABX00087) +- Arduino Zero (SKU: ABX00003) + +
+ +## Ratings + +### Recommended Operating Conditions + +

+The table below provides a comprehensive guideline for the optimal use of the Nicla Sense Env, outlining typical operating conditions and design limits. The operating conditions of the Nicla Sense Env are largely based on the specifications of its components. +

+ +
+ +| **Parameter** | **Symbol** | **Min** | **Typ** | **Max** | **Unit** | +|:-----------------------------------:|:---------------:|:-------:|:-------:|:-------:|:--------:| +| `IN` Pin Input Voltage1 | VIN | 2.3 | 5.0 | 6.5 | V | +| `OUT` Pin Input Voltage2 | VOUT | - | 3.3 | 3.3 | V | +| ESLOV Input Voltage | VESLOV | - | 5.0 | - | V | +| Operating Temperature | TOP | -40 | - | 85 | °C | + +
+ +

+1 Power input through the IN pin, regulated to +3.3 VDC by the onboard voltage regulator. +

+ +

+2 Direct +3.3 VDC power input through the OUT pin, bypassing the onboard voltage regulator. +

+ +
+

Power Tip: To put the Nicla Sense Env in deep sleep mode, use the API provided by the Nicla Sense Env Arduino library.

+
+ +
+

Safety Note: The Nicla Sense Env board operates at +3.3 VDC, and while its pins are +5 VDC tolerant, we recommend using a level translator when connecting it to +5 VDC-compatible Arduino boards to ensure safe communication and prevent potential damage to the components. This connection can be made either through the Nicla Sense Env's ESLOV connector or its dedicated I2C pins (I2C0).

+
+ +
+ +## Functional Overview + +

+The core of the Nicla Sense Env is the R7FA2E1A92DNH microcontroller from Renesas. The board also contains several sensors and user-programmable LEDs connected to its microcontroller, such as a relative humidity and temperature sensor, indoor and outdoor air quality sensors, and two LEDs, one orange and one RGB LED, available for the user. +

+ +### Pinout + +The Nicla Sense Env connectors pinout is shown in the figure below. + +![](assets/Nicla_Sense_Env_Pinout.png) + +
+ +### Block Diagram + +An overview of the high-level architecture of the Nicla Sense Env is illustrated in the figure below. + +![](assets/Nicla_Sense_Env_Block_Diagram.png) + +
+ +### Power Supply + +
+ +The Nicla Sense Env can be powered through one of the following interfaces: + +- **ESLOV connector**: The Nicla Sense Env can be powered through the power supply of a connected Portenta or MKR family board by using the ESLOV connector. +- **External +2.3 to +6.5 VDC power supply**: This can be connected to the `IN` pin (pin 9) of the board's header connector. The onboard voltage regulator converts this input to +3.3 VDC for the internal circuitry. +- **External +3.3 VDC power supply**: This can be connected to the `OUT` pin (pin 7) of the board's header connector, **bypassing the onboard voltage regulator**. +- **Onboard P-MOD connector**: The Nicla Sense Env can also be powered through the `+3V3` power pin of the onboard P-MOD connector using an external +3.3 VDC power supply. + +A detailed figure below illustrates the power options available on the Nicla Sense Env and the main system power architecture. + +![](assets/Nicla_Sense_Env_Power_Tree.png) + +
+Low-Power Tip: Use the API provided by the Nicla Sense Env Arduino library to put the board into low-power and deep sleep mode. +
+ +
+ +
+Safety Note: Do not exceed the voltage limits specified for each power pin: +2.3 to +6.5 VDC for the IN pin and +3.3 VDC for the OUT pin. Voltages outside these ranges will permanently damage the board. Neither pin has reverse polarity protection; always verify all connections before applying power. +
+ +
+ +## Device Operation + +
+ +### Getting Started - IDE + +If you want to program your Nicla Sense Env offline with a Portenta, MKR, or Nano family board, install the Arduino Desktop IDE **[1]**. You will need a USB cable to connect the Portenta, MKR, or Nano board to your computer. + +### Getting Started - Arduino Web Editor + +All Arduino devices work out of the box on the Arduino Cloud Editor **[2]** by installing a simple plugin. The Arduino Cloud Editor is hosted online. Therefore, it will always be up-to-date with all the latest features and support for all boards and devices. Follow **[3]** to start coding on the browser and upload your sketches onto your device. + +### 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. Take a look at the official documentation to know more. + +### Nicla Sense Env Arduino and MicroPython Library + +The Arduino_NiclaSenseEnv library **[4]** offers an Arduino API to read data from the Nicla Sense Env's onboard sensors (ZMOD4410, ZMOD4510 and HS4001) and control the board's functionality. This library is also available for MicroPython **[5]**. + +### Sample Sketches + +Sample sketches for the Nicla Sense Env can be found either in the “Examples” menu in the Arduino IDE or the “Nicla Sense Env Documentation” section of Arduino documentation **[6]**. + +### Online Resources + +Now that you have gone through the basics of what you can do with the device, you can explore the endless possibilities it provides by checking exciting projects on Arduino Project Hub **[7]**, the Arduino Library Reference **[8]**, and the online store **[9]** where you will be able to complement your Nicla Sense Env board with additional extensions, sensors, and actuators. +
+ +
+ +## Mechanical Information + +

+The Nicla Sense Env is a double-sided 28.86 mm x 28.86 mm board with an ESLOV connector overhanging the bottom edge and dual castellated/through-hole pins around two of the four edges of the board. +

+ +### Board Dimensions + +The Nicla Sense Env board outline is shown in the figure below; all the dimensions are in mm. + +![](assets/Nicla_Sense_Env_Outline.png) + +

+The Nicla Sense Env does not have mounting holes for mechanical fixing. The slots found in the board were placed because of the board's sensor requirements and specifications. +

+ +
+ +### Board Connectors + +

+The ESLOV connector of the Nicla Sense Env is placed on the bottom side of the board; its placement is shown in the figure below; all the dimensions are in mm. +

+ +![](assets/Nicla_Sense_Env_Connectors.png) + +

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

+ +
+ +### Board Peripherals and Actuators + +

+The Nicla Sense Env has one reset button and two LEDs, an orange and an RGB LED, available for the user; the reset button, the orange LED, and the RGB LED are placed on the top side of the board. The placement of these components is shown in the figure below; all the dimensions are in mm. +

+ +![](assets/Nicla_Sense_Env_PeripheralsActuators.png) + +
+ +## Product Compliance + +### Product Compliance Summary + +| **Product Compliance** | +|:----------------------:| +| CE (European Union) | +| RoHS | +| REACH | +| WEEE | +| VCCI (Japan) | + +### Japan VCCI Statement + +

+This is a VCCI Class B compliant product. +

+ +### 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). +

+ +### 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. +

+ +| **Substance** | **Maximum Limit (ppm)** | +|----------------------------------------|-------------------------| +| Lead (Pb) | 1000 | +| Cadmium (Cd) | 100 | +| Mercury (Hg) | 1000 | +| Hexavalent Chromium (Cr6+) | 1000 | +| Poly Brominated Biphenyls (PBB) | 1000 | +| Poly Brominated Diphenyl ethers (PBDE) | 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), 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 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. +

+ +## Company Information + +| **Company Information** | **Details** | +|-------------------------|--------------------------------------------| +| **Company Name** | Arduino S.r.l. | +| **Company Address** | Via Andrea Appiani, 25-20900 Monza (Italy) | + +## Reference Documentation + +| **No.** | **Reference** | **Link** | +|:-------:|-------------------------------------------|------------------------------------------------------------| +| 1 | Arduino IDE (Desktop) | https://www.arduino.cc/en/Main/Software | +| 2 | Arduino IDE (Cloud) | https://create.arduino.cc/editor | +| 3 | Arduino Cloud - Getting Started | https://docs.arduino.cc/arduino-cloud/guides/overview/ | +| 4 | Arduino_NiclaSenseEnv Library | https://github.com/arduino-libraries/Arduino_NiclaSenseEnv | +| 5 | Arduino_NiclaSenseEnv MicroPython Library | https://github.com/arduino/arduino-nicla-sense-env-mpy/ | +| 6 | Nicla Sense Env Documentation | https://docs.arduino.cc/hardware/nicla-sense-env/ | +| 7 | Project Hub | https://create.arduino.cc/projecthub | +| 8 | Library Reference | https://www.arduino.cc/reference/en/ | +| 9 | Online Store | https://store.arduino.cc/ | + +## Document Revision History + +| **Date** | **Revision** | **Changes** | +|:----------:|:------------:|:------------------------------------------------------:| +| 14/01/2025 | 2 | Update on Product Compliance with Japan VCCI Statement | | 10/10/2024 | 1 | First release | \ No newline at end of file diff --git a/content/hardware/06.nicla/boards/nicla-sense-env/tutorials/01.user-manual/assets/user-manual-5.png b/content/hardware/06.nicla/boards/nicla-sense-env/tutorials/01.user-manual/assets/user-manual-5.png index 6924b40a90..33e9ddebb5 100644 Binary files a/content/hardware/06.nicla/boards/nicla-sense-env/tutorials/01.user-manual/assets/user-manual-5.png and b/content/hardware/06.nicla/boards/nicla-sense-env/tutorials/01.user-manual/assets/user-manual-5.png differ diff --git a/content/hardware/06.nicla/boards/nicla-sense-env/tutorials/01.user-manual/content.md b/content/hardware/06.nicla/boards/nicla-sense-env/tutorials/01.user-manual/content.md index 2260fc9668..62b925f45e 100644 --- a/content/hardware/06.nicla/boards/nicla-sense-env/tutorials/01.user-manual/content.md +++ b/content/hardware/06.nicla/boards/nicla-sense-env/tutorials/01.user-manual/content.md @@ -1,1119 +1,1132 @@ ---- -title: 'Nicla Sense Env User Manual' -difficulty: beginner -compatible-products: [nicla-sense-env] -description: 'Learn about the hardware and software features of the Arduino® Nicla Sense Env.' -tags: - - RGB - - Sensors - - Cheat sheet - - User manual -author: 'José Bagur' -hardware: - - hardware/06.nicla/boards/nicla-sense-env -software: - - ide-v1 - - ide-v2 - - iot-cloud - - web-editor ---- - -This user manual provides a comprehensive overview of the Nicla Sense Env board, highlighting its hardware and software elements. With it, you will learn how to set up, configure, and use all the main features of a Nicla Sense Env board. - -![ ](assets/hero-banner.png) - -## Hardware and Software Requirements - -### Hardware Requirements - -- [Nicla Sense Env](https://store.arduino.cc/products/nicla-sense-env) (x1) -- [Portenta C33](https://store.arduino.cc/products/portenta-c33) (x1) -- [USB-C® cable](https://store.arduino.cc/products/usb-cable2in1-type-c) (x1) - -### Software Requirements - -- [Arduino IDE 2.0+](https://www.arduino.cc/en/software) or [Arduino Web Editor](https://create.arduino.cc/editor) -- [Arduino_NiclaSenseEnv library](https://github.com/arduino-libraries/Arduino_NiclaSenseEnv) -- [Arduino Renesas Portenta Boards core](https://github.com/arduino/ArduinoCore-renesas) (required to work with the Portenta C33 board) - -***The Nicla Sense Env board is not intended as a standalone device but as a shield to work alongside a Portenta, MKR, or Nano family board. In this user manual, we will use the Portenta C33 as the main board and show how to use the Nicla Sense Env board as a shield.*** - -## Nicla Sense Env Overview - -Enhance your environmental sensing capabilities with the Nicla Sense Env board. This board combines three cutting-edge sensors from Renesas® with the Arduino ecosystem's ease of integration and scalability. This board is well-suited for augmenting your Portenta or MKR-based projects with environmental sensing capabilities. - -![ ](assets/front_page.png) - -The Nicla Sense Env includes an ultra-low power temperature and humidity sensor, complemented by two sophisticated industrial-grade gas sensors capable of assessing air quality in indoor and outdoor settings. Its compact dimensions (22.86 x 22.86 mm) and sturdy build make the Nicla Sense Env an excellent choice for projects that demand sensor fusion and the computational capabilities of Arduino boards. - -### Nicla Sense Env Architecture Overview - -The Nicla Sense Env features a secure, certified, and durable design that suits various applications, such as industrial automation, building automation, and prototyping. - -The top view of the Nicla Sense Env board is shown in the image below: - -![The Nicla Sense Env main components (top view)](assets/user-manual-1.png) - -The bottom view of the Nicla Sense Env board is shown in the image below: - -![The Nicla Sense Env main components (bottom view)](assets/user-manual-2.png) - -Here's an overview of the board's main components shown in the images above: - -- **Microcontroller**: At the heart of the Nicla Sense Env is a [Renesas RA2E1 microcontroller](https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ra2e1-48mhz-arm-cortex-m23-entry-level-general-purpose-microcontroller). This entry-level single-chip microcontroller, known as one of the industry's most energy-efficient ultra-low-power microcontroller, is based on a 48 MHz Arm® Cortex®-M23 core with up to 128 KB code flash and 16 KB SRAM memory. -- **Onboard humidity and temperature sensor**: The Nicla Sense Env features an onboard humidity and temperature sensor, the [HS4001 from Renesas](https://www.renesas.com/us/en/products/sensor-products/environmental-sensors/humidity-temperature-sensors/hs4001-relative-humidity-and-temperature-sensor-digital-output-15-rh). This highly accurate, ultra-low power, fully calibrated relative humidity and temperature sensor features proprietary sensor-level protection, ensuring high reliability and long-term stability. -- **Onboard indoor air quality sensor**: The Nicla Sense Env features an onboard gas sensor, the [ZMOD4410 from Renesas](https://www.renesas.com/us/en/document/dst/zmod4410-datasheet). This sophisticated sensor was designed to detect total volatile organic compounds (TVOC), estimate CO2, and monitor and report indoor air quality (IAQ). -- **Onboard outdoor air quality sensor**: The Nicla Sense Env features an onboard gas sensor, the [ZMOD4510 from Renesas](https://www.renesas.com/us/en/document/dst/zmod4410-datasheet). This sophisticated sensor was designed to monitor and report outdoor air quality (OAQ) based on nitrogen dioxide (NO2) and ozone (O3) measurements. -- **Onboard user LEDs**: The Nicla Sense Env has two onboard user-programmable LEDs; one is an orange LED, and the other one is an RGB LED. -- **ESLOV connector**: The Nicla Sense Env has an onboard ESLOV connector to extend the board communication capabilities via I2C. -- **Surface mount**: The castellated pins of the board allow it to be positioned as a surface-mountable module. - -### Board Libraries - -The [`Arduino_NiclaSenseEnv` library](https://github.com/arduino-libraries/Arduino_NiclaSenseEnv) contains an application programming interface (API) to read data from the board and control its parameters and behavior over I²C. This library supports the following: - -- Board control (sleep, reset, and factory reset) -- Board configuration (I²C address configuration) -- Onboard RGB LED control -- Onboard orange LED control -- Onboard indoor air quality sensor control (sulfur detection, odor intensity, ethanol level, TVOC, CO₂, IAQ measurements) -- Onboard outdoor air quality sensor control (NO₂, O3, OAQ measurements) -- Temperature and humidity sensor control -- UART comma-separated values (CSV) output - -***The Portenta, MKR, Nano and UNO (R4) family boards support the `Arduino_NiclaSenseEnv` library.*** - -To install the `Arduino_NiclaSenseEnv` library, navigate to `Tools > Manage libraries...` or click the **Library Manager** icon in the left tab of the Arduino IDE. In the Library Manager tab, search for `Arduino_NiclaSenseEnv` and install the latest version of the library. - -![Installing the board's library in the Arduino IDE](assets/user-manual-3.png) - -### Pinout - -The full pinout is available and downloadable as PDF from the link below: - -- [Nicla Sense Env pinout](https://docs.arduino.cc/resources/pinouts/ABX00089-full-pinout.pdf) - -### Datasheet - -The complete datasheet is available and downloadable as PDF from the link below: - -- [Nicla Sense Env datasheet](https://docs.arduino.cc/resources/datasheets/ABX00089-datasheet.pdf) - -### Schematics - -The complete schematics are available and downloadable as PDF from the link below: - -- [Nicla Sense Env schematics](https://docs.arduino.cc/resources/schematics/ABX00089-schematics.pdf) - -### STEP Files - -The complete STEP files are available and downloadable from the link below: - -- [Nicla Sense Env STEP files](../../downloads/ABX00089-step.zip) - -## First Use - -### Unboxing the Product - -Let's check out what is inside the box of the Nicla Sense Env board. Besides the board, you will find an ESLOV cable inside the box, which can connect the Nicla Sense Env with other supported Arduino boards with an onboard ESLOV connector (Portenta or MKR family boards). The board's MKR-styled pins can also connect the Nicla Sense Env to other supported Arduino boards (Nano family), but 2.54 mm header pins (not included) must be soldered to the MKR-styled board pins. - -![Unboxing the Nicla Sense Env](assets/user-manual-4.png) - -**The Nicla Sense Env is not a standalone device but a shield for an Arduino-supported board from the Portenta, MKR, or Nano board families**. This user manual will use a Portenta C33 as the main or host board and the Nicla Sense Env as a shield or client board connected through the included ESLOV cable. - -### Connecting the Board - -As shown in the image below, the Nicla Sense Env can be connected to a Portenta or MKR family board using the onboard ESLOV connector and the included ESLOV cable. Alternatively, you can connect the Nicla Sense Env as a shield by using the MKR-style pins on the Portenta or MKR family boards. - -![Connecting the Nicla Sense Env](assets/user-manual-23.png) - -For other compatible boards, such as those from the Nano family, the Nicla Sense Env can also be connected using the 2.54 mm pins of the Nicla Sense Env board. - -***Important note: The Nicla Sense Env board operates at 3.3 VDC, and while its pins are 5 VDC tolerant, we recommend using a level translator when connecting it to 5 VDC-compatible Arduino boards to ensure safe communication and prevent potential damage to the components. This connection can be made either through the Nicla Sense Env’s ESLOV connector or its dedicated I2C pins (`I2C0`), as illustrated in the image below.*** - -![Connecting the Nicla Sense Env to a 5 VDC-compatible Arduino board](assets/user-manual-24.png) - -As shown in the image above, the use of a dedicated level translator between the Nicla Sense Env board and the 5 VDC-compatible Arduino board, in this example an Arduino UNO R4 WiFi, is recommended. - -### Powering the Board - -The Nicla Sense Env can be powered by: - -- Using the onboard **ESLOV connector**, which has a dedicated +5 VDC power line regulated onboard to +3.3 VDC. -- Using an **external +3.3 VDC power supply** connected to the `VCC` pin (please refer to the [board pinout section](#pinout) of the user manual). - -![Different ways to power the Nicla Sense Env](assets/user-manual-5.png) - -***The Nicla Sense Env's `VCC` pin can be connected only to a +3.3 VDC power supply; any other voltage will permanently damage the board. Furthermore, the `VCC` pin does not have reverse polarity protection. Double-check your connections to avoid damaging the board.*** - -In this user manual, we will use the board's ESLOV connector to power it. - -### Hello World Example - -Let's control the Nicla Sense Env board to reproduce the classic `hello world` example used in the Arduino ecosystem: the `Blink`. We will use this example to verify the Nicla Sense Env's connection to the host board (a Portenta C33) via ESLOV, the host board's connection to the Arduino IDE, and that the `Arduino_NiclaSenseEnv` library and both boards, the shield and the host, are working as expected. This section will refer to the Nicla Sense Env as a shield or client. - -***We are using the API of the `Arduino_NiclaSenseEnv` library with the host board (Portenta C33) to control the Nicla Sense Env (shield).*** - -First, connect the shield to the host board via ESLOV, as shown in the image below, using an ESLOV cable (included with your Nicla Sense Env): - -![Connecting the Nicla Sense Env to the host board via ESLOV](assets/user-manual-6.png) - -Now, connect the host board to your computer using a USB-C® cable, open the Arduino IDE, and connect the host board to it. - -***If you are new to the Portenta C33, please refer to the board's [user manual](https://docs.arduino.cc/tutorials/portenta-c33/user-manual/) for more detailed information.*** - -Copy and paste the example sketch below into a new sketch in the Arduino IDE: - -```arduino -/** - Blink Example on Nicla Sense Env - Name: nicla_sense_env_blink.ino - Purpose: This sketch demonstrates how to blink the onboard - orange LED of the Nicla Sense Env board. - - @author Arduino Product Experience Team - @version 1.0 31/05/24 -*/ - -// Include the NiclaSenseEnv library -#include "NiclaSenseEnv.h" - -// Global device object for the Nicla Sense Env board -NiclaSenseEnv device; - -/** - Toggles the onboard orange LED between on and off states. - @param led Reference to OrangeLED object controlling the LED. -*/ -void toggleLED(OrangeLED& led) { - // Turn on the LED to full brightness for one second - led.setBrightness(63); - delay(1000); - - // Turn off the LED for one second - led.setBrightness(0); - delay(1000); -} - -void setup() { - // Initialize serial communication at 115200 bits per second. - Serial.begin(115200); - - // Wait for Serial to be ready with a timeout of 5 seconds - for(auto start = millis(); !Serial && millis() - start < 5000;); - - if (device.begin()) { - // Initialize the onboard orange LED - auto orangeLED = device.orangeLED(); - } -} - -void loop() { - // Retrieve the orange LED object - OrangeLED orangeLED = device.orangeLED(); - - // Continuously toggle the orange LED on and off - toggleLED(orangeLED); -} -``` - -To upload the sketch to the host 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 host board (Portenta C33) in the Arduino IDE](assets/user-manual-7.png) - -You should see the onboard orange LED of your Nicla Sense Env board turn on for one second, then off for one second, repeatedly. - -![Hello World on the Nicla Sense Env board](assets/user-manual-8.gif) - -## Board Management - -This section of the user manual outlines how to manage the onboard sensors and main features of the Nicla Sense Env board using the `Arduino_NiclaSenseEnv` library API. It also explains how to perform essential tasks such as retrieving the board's information, managing sensor states, resetting the board, and putting it into deep sleep mode. - -### Board Information - -Detailed information from the board, such as its I2C address, serial number, product ID, software revision, and UART communication settings, can be retrieved using the `Arduino_NiclaSenseEnv` library API. The example sketch shown below retrieves that information using a dedicated function called `printDeviceInfo()`: - -```arduino -/** - Board Information Retrieval Example for Nicla Sense Env - Name: nicla_sense_env_board_info_example.ino - Purpose: This sketch demonstrates how to retrieve detailed board information from the Nicla Sense Env using the Arduino_NiclaSenseEnv library API. - - @author Sebastián Romero, modified by the Arduino Product Experience Team - @version 1.0 31/05/24 -*/ - -// Include the NiclaSenseEnv library -#include "NiclaSenseEnv.h" - -// Global device object for Nicla Sense Env -NiclaSenseEnv device; - -/** - Prints detailed device information to the Serial Monitor. - This function outputs all critical system parameters including - the device I2C address, serial number, and other configuration settings. -*/ -void printDeviceInfo() { - Serial.println("- Device Information:"); - Serial.print("- Device (0x"); - Serial.print(device.deviceAddress(), HEX); - Serial.println(") connected."); - Serial.print("- Serial number: "); - Serial.println(device.serialNumber()); - Serial.print("- Product ID: "); - Serial.println(device.productID()); - Serial.print("- Software revision: "); - Serial.println(device.softwareRevision()); - Serial.print("- Baud rate: "); - Serial.println(device.UARTBaudRate()); - Serial.print("- CSV delimiter: "); - Serial.println(device.CSVDelimiter()); - - Serial.print("- Debugging enabled: "); - if (device.isDebuggingEnabled()) { - Serial.println("true"); - } else { - Serial.println("false"); - } - - Serial.print("- CSV output enabled: "); - if (device.isUARTCSVOutputEnabled()) { - Serial.println("true"); - } else { - Serial.println("false"); - } -} - -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)); - - if (device.begin()) { - Serial.println("- Device successfully initialized!"); - // Print device information once after initialization - printDeviceInfo(); - } else { - Serial.println("- Failed to initialize the device. Please check the connection!"); - } -} - -void loop() { - // Nothing to do here. All information is printed once in setup(). -} -``` - -Here is a detailed breakdown of the `printDeviceInfo()` function and the `Arduino_NiclaSenseEnv` library API functions used in the `printDeviceInfo()` function: - -- `deviceAddress()`: Retrieves the I2C address of the board. This is useful for identifying the board when multiple devices are connected to the same I2C bus. -- `serialNumber()`: Outputs the board's unique serial number. Each board's serial number is unique and can be used for tracking, inventory management, or validating its authenticity. -- `productID()`: Provides the product ID, which specifies the exact model or version of the board. -- `softwareRevision()`: This displays the current firmware version installed on the board. Keeping the firmware updated is critical for security, performance, and access to new features, making this information valuable for maintenance and support. -- `UARTBaudRate()`: Shows the baud rate used for UART communications. -- `CSVDelimiter()`: Reveals the delimiter used in CSV outputs. This detail is vital for developers who process or log data, as it affects how data is parsed and stored. -- `isDebuggingEnabled()`: Indicates whether the debugging mode is active. Debugging can provide additional output that helps diagnose issues or for development purposes. -- `isUARTCSVOutputEnabled()`: Shows whether CSV output through UART is enabled. This setting is important for applications that require data logging for analysis or reporting, as it impacts how data is exported from the board. - -After uploading the example sketch to the host board, you should see the following output in the Arduino IDE's Serial Monitor: - -![Example sketch output in the Arduino IDE's Serial Monitor](assets/user-manual-9.png) - -You can download the example sketch [here](assets/nicla_sense_env_board_info_example.zip). - -### Onboard Sensors Management - -Efficient management of the Nicla Sense Env's onboard sensors is important for optimizing its performance and power usage. The sketch shown below demonstrates how to manage (turn on or off) the onboard sensors (temperature, relative humidity, and air quality) of the Nicla Sense Env and check their status using the `Arduino_NiclaSenseEnv` library API: - -```arduino -/** - Onboard Sensors Management Example for Nicla Sense Env - Name: nicla_sense_env_sensors_management_example.ino - Purpose: This sketch demonstrates how to manage the onboard sensors of the Nicla Sense Env using the Arduino_NiclaSenseEnv library API. - - @author Arduino Product Experience Team - @version 1.0 31/05/24 -*/ - -// Include the NiclaSenseEnv library -#include "NiclaSenseEnv.h" - -// Global device object for Nicla Sense Env -NiclaSenseEnv device; - -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)); - - if (device.begin()) { - // Disable all the onboard sensors - Serial.println("- Disabling all sensors..."); - device.temperatureHumiditySensor().setEnabled(false); - device.indoorAirQualitySensor().setEnabled(false); - device.outdoorAirQualitySensor().setEnabled(false); - - // Check the onboard sensor states - Serial.println("- Checking the sensor states..."); - Serial.print("- Temperature sensor enabled: "); - if (device.temperatureHumiditySensor().enabled()) { - Serial.println("true"); - } else { - Serial.println("false"); - } - - Serial.print("- Indoor air quality sensor enabled: "); - if (device.indoorAirQualitySensor().enabled()) { - Serial.println("true"); - } else { - Serial.println("false"); - } - - Serial.print("- Outdoor air quality sensor enabled: "); - if (device.outdoorAirQualitySensor().enabled()) { - Serial.println("true"); - } else { - Serial.println("false"); - } - } else { - Serial.println("- Device could not be found. Please double-check the wiring!"); - } -} - -void loop() { - // Nothing to do here. All information is printed once in setup(). -} -``` - -This example sketch initializes the Nicla Sense Env board, disables all onboard sensors and then checks and prints the status of each sensor on the Arduino IDE's Serial Monitor. Here is a detailed breakdown of the example sketch shown before and the `Arduino_NiclaSenseEnv` library API functions used in the sketch: - -- `temperatureHumiditySensor().setEnabled(false)`: Disables the onboard temperature and humidity sensor. -- `indoorAirQualitySensor().setEnabled(false)`: Turns off the onboard indoor air quality sensor. -- `outdoorAirQualitySensor().setEnabled(false)`: Deactivates the onboard outdoor air quality sensor. -- `temperatureHumiditySensor().enabled()`: Checks if the onboard temperature and humidity sensor is active. -- `indoorAirQualitySensor().enabled()`: Indicates whether the onboard indoor air quality sensor is currently enabled. -- `outdoorAirQualitySensor().enabled()`: Confirms if the onboard outdoor air quality sensor is operational. - -After uploading the example sketch to the host board, you should see the following output in the Arduino IDE's Serial Monitor: - -![Example sketch output in the Arduino IDE's Serial Monitor](assets/user-manual-10.png) - -You can download the example sketch [here](assets/nicla_sense_env_sensors_management_example.zip). - -### Board Reset - -Resetting the Nicla Sense Env is important for troubleshooting and ensuring the device operates cleanly. It is handy after making significant changes to the configuration or when an unexpected behavior occurs. - -The example sketch below demonstrates how to reset the Nicla Sense Env using the `Arduino_NiclaSenseEnv` library API. It also shows how to verify that the board has been reset by turning off the temperature sensor before the reset and checking its status after the reset. - -```arduino -/** - Board Reset Example for Nicla Sense Env - Name: nicla_sense_env_board_reset_example.ino - Purpose: This sketch demonstrates how to reset the Nicla Sense Env - using the Arduino_NiclaSenseEnv library API and verifies the reset - by disabling and then re-enabling the temperature sensor. - - @author Arduino Product Experience Team - @version 1.0 31/05/24 -*/ - -// Include the NiclaSenseEnv library -#include "NiclaSenseEnv.h" - -// Global device object for Nicla Sense Env -NiclaSenseEnv device; - -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)); - - if (device.begin()) { - // Disable the temperature sensor - Serial.println("- Disabling temperature sensor..."); - device.temperatureHumiditySensor().setEnabled(false); - - // Check the temperature sensor state before reset - Serial.print("- Temperature sensor enabled before reset: "); - if (device.temperatureHumiditySensor().enabled()) { - Serial.println("true"); - } else { - Serial.println("false"); - } - - // Resetting the device - Serial.println("- Resetting the device..."); - device.reset(); - delay(2000); // Ensure the device has enough time to reset properly - - // Check the temperature sensor state after reset - Serial.print("- Temperature sensor enabled after reset: "); - if (device.temperatureHumiditySensor().enabled()) { - Serial.println("true"); - } else { - Serial.println("false"); - } - } else { - Serial.println("- Device could not be found. Please double-check the wiring!"); - } -} - -void loop() { - // Nothing to do here. The device resets in setup(). -} -``` - -This example shows that the temperature sensor, disabled before the reset, is re-enabled after the reset, confirming that the board has restarted and all settings have been reset to their defaults. Here is a detailed breakdown of the example sketch shown before and the `Arduino_NiclaSenseEnv` library API functions used in the sketch: - -- `device.temperatureHumiditySensor().setEnabled(false)`: Disables the onboard temperature and humidity sensor. -- `device.reset()`: This function reboots the Nicla Sense Env, clearing all temporary settings. - -After uploading the example sketch to the host board, you should see the following output in the Arduino IDE's Serial Monitor: - -![Example sketch output in the Arduino IDE's Serial Monitor](assets/user-manual-11.png) - -You can download the example sketch [here](assets/nicla_sense_env_board_reset_example.zip). - -### Low Power Mode Management - -Saving energy is vital for many projects, particularly those deployed in remote areas or with a limited power supply. The Nicla Sense Env supports a deep sleep mode that can help to minimize the board's power consumption. - -***Deep sleep is essential for extending battery life and minimizing energy consumption when the board is not collecting data or performing tasks. It is necessary for battery-powered or power-constrained applications.*** - -The example sketch shown below demonstrates how to put the Nicla Sense Env board into deep sleep mode using the `Arduino_NiclaSenseEnv` library API: - -```arduino -/** - Low Power Mode Management Example for Nicla Sense Env - Name: nicla_sense_env_low_power_mode_example.ino - Purpose: This sketch demonstrates how to put the Nicla Sense Env - into deep sleep mode using the Arduino_NiclaSenseEnv library API. - - @author Arduino Product Experience Team - @version 1.0 31/05/24 -*/ - -// Include the NiclaSenseEnv library -#include "NiclaSenseEnv.h" - -// Global device object for Nicla Sense Env -NiclaSenseEnv device; - -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)); - - if (device.begin()) { - // Putting the device to sleep - Serial.println("- Going to deep sleep mode..."); - device.deepSleep(); - } else { - Serial.println("- Device could not be found. Please double-check the wiring!"); - } -} - -void loop() { - // Nothing to do here. The device is in deep sleep mode. -} -``` - -Here is a detailed breakdown of the example sketch shown before and the `Arduino_NiclaSenseEnv` library API functions used in the sketch: - -- `device.deepSleep()`: This function puts the Nicla Sense Env board into a deep sleep state, minimizing power consumption to the lowest possible level. - -After uploading the example sketch to the host board, you should see the following output in the Arduino IDE's Serial Monitor: - -![Example sketch output in the Arduino IDE's Serial Monitor](assets/user-manual-12.png) - -***Waking up a Nicla Sense Env board from deep sleep mode can only be done by a hardware reset.*** - -You can download the example sketch [here](assets/nicla_sense_env_low_power_mode_example.zip). - -## LEDs - -This section of the user manual explains how to control both the onboard orange and RGB and LEDs of the Nicla Sense Env board using the `Arduino_NiclaSenseEnv` library API. The LEDs can be used to provide visual feedback for various operations, such as indicating status, warnings, or sensor errors. This section covers the basic usage of both LEDs, including turning them on, changing colors, and adjusting its brightness. - -![The onboard LEDs of the Nicla Sense Env board](assets/user-manual-20.png) - -### Orange LED - -The onboard orange LED on the Nicla Sense Env board can be controlled using the `Arduino_NiclaSenseEnv` library. The example sketch shown below shows how to smoothly increase and decrease the brightness of the onboard orange LED. The LED pulses continuously in the `loop()` function. - -```arduino -/** - Orange LED Control Example for Nicla Sense Env - Name: nicla_sense_env_orange_led_control_example_smooth_brightness.ino - Purpose: This sketch demonstrates how to smoothly control the orange LED - by increasing and decreasing its brightness using the Arduino_NiclaSenseEnv library. - - @author Arduino Product Experience Team - @version 1.0 31/05/24 -*/ - -// Include the NiclaSenseEnv library -#include "Arduino_NiclaSenseEnv.h" - -// Global device object for Nicla Sense Env -NiclaSenseEnv device; - -// Initial brightness level -int brightness = 0; - -// Amount to increase/decrease the brightness by each loop -int fadeAmount = 5; - -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)); - - if (device.begin()) { - Serial.println("- Device successfully initialized!"); - } else { - Serial.println("- Failed to initialize the device. Please check the connection!"); - } -} - -void loop() { - // Get the orange LED object - auto orangeLED = device.orangeLED(); - - // Set the brightness level - orangeLED.setBrightness(brightness); - - // Change the brightness for next time through the loop - brightness += fadeAmount; - - // Reverse the direction of the fading at the ends of the fade (0 and 255) - if (brightness <= 0 || brightness >= 255) { - // Change the direction of the fade - fadeAmount = -fadeAmount; - } - - // Wait for a short time before updating the brightness again - delay(30); -} -``` - -Here is a detailed breakdown of the example sketch shown before and the `Arduino_NiclaSenseEnv` library API functions used in the sketch: - -- `device.begin()`: Initializes the Nicla Sense Env board, setting up communication with all onboard sensors and components, including the orange LED. -- `orangeLED.setBrightness(uint8_t brightness)`: Adjusts the brightness of the orange LED. The brightness ranges from `0` (off) to `255` (full brightness). In this sketch, the brightness gradually increases from `0` to `255` and then decreases back to 0, creating a smooth pulsing effect. -- `fadeAmount`: Controls the rate of change of brightness. When the brightness reaches either 0 or 255, the direction of change is reversed, making the LED brightness smoothly cycle up and down. - -After uploading the example sketch to the Nicla Sense Env board, you should see the orange LED smoothly increase and decrease in brightness, creating a continuous pulsing effect. - -![Orange LED of the Nicla Sense Env board](assets/user-manual-22.gif) - -You can download the example sketch [here](assets/nicla_sense_env_orange_led_control_example.zip). - -### RGB LED - -The onboard RGB LED on the Nicla Sense Env board can be controlled using the `Arduino_NiclaSenseEnv` library. The example sketch shown below shows how to turn on the LED with different colors and then turn it off using the `setColor()` and `setBrightness()` functions. The LED colors cycle continuously in the `loop()` function. - -```arduino -/** - RGB LED Control Example for Nicla Sense Env - Name: nicla_sense_env_rgb_led_control_example_brightness.ino - Purpose: This sketch demonstrates how to control the RGB LED by setting - different colors and ensuring brightness control using the Arduino_NiclaSenseEnv library. - - @author Arduino Product Experience Team - @version 1.0 31/05/24 -*/ - -// Include the NiclaSenseEnv library -#include "Arduino_NiclaSenseEnv.h" - -// Global device object for Nicla Sense Env -NiclaSenseEnv device; - -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)); - - if (device.begin()) { - Serial.println("- Device successfully initialized!"); - } else { - Serial.println("- Failed to initialize the device. Please check the connection!"); - } -} - -void loop() { - // Get the RGB LED object - auto rgbLED = device.rgbLED(); - - // Turn on the LED with red color - rgbLED.setColor(255, 0, 0); - // Ensure maximum brightness, wait for one second - rgbLED.setBrightness(255); - Serial.println("- RGB LED is now red!"); - delay(1000); - - // Turn on the LED with green color - rgbLED.setColor(0, 255, 0); - // Ensure maximum brightness, wait for one second - rgbLED.setBrightness(255); - Serial.println("- RGB LED is now green!"); - delay(1000); - - // Turn on the LED with blue color - rgbLED.setColor(0, 0, 255); - // Ensure maximum brightness, wait for one second - rgbLED.setBrightness(255); - Serial.println("- RGB LED is now blue!"); - delay(1000); - - // Set the LED color to black and brightness to 0 to turn it off - rgbLED.setColor(0, 0, 0); - // Ensure minimum brightness, wait for one second - rgbLED.setBrightness(0); - Serial.println("- RGB LED is now off!"); - delay(1000); -} -``` - -Here is a detailed breakdown of the example sketch shown before and the `Arduino_NiclaSenseEnv` library API functions used in the sketch: - -- `device.begin()`: Initializes the Nicla Sense Env board, setting up communication with all onboard sensors and components, including the RGB LED. -- `rgbLED.setColor(uint8_t red, uint8_t green, uint8_t blue)`: This function sets the RGB LED to a specific color by specifying the intensity of the red, green, and blue components. Each value can range from `0` (off) to `255` (full brightness). In the example, the RGB LED cycles through red (255, 0, 0), green (0, 255, 0), and blue (0, 0, 255). -- `rgbLED.setBrightness(uint8_t brightness)`: Adjusts the brightness of the RGB LED. The value ranges from `0` (off) to `255` (full brightness). In the sketch, the brightness is set to 255 (maximum) when the LED is on, and to 0 (off) when the LED is turned off. - -After uploading the example sketch to the Nicla Sense Env board, you should see the following output in the Arduino IDE's Serial Monitor: - -![Example sketch output in the Arduino IDE's Serial Monitor](assets/user-manual-19.png) - -You should also see the onboard RGB LED of your Nicla Sense Env board turn on red for one second, then green for one second, then blue for one second, and finally turn off, repeating this cycle. - -![RGB LED of the Nicla Sense Env board](assets/user-manual-21.gif) - -You can download the example sketch [here](assets/nicla_sense_env_rgb_led_control_example_brightness.zip). - -## Temperature and Humidity Sensor - -The Nicla Sense Env board has an onboard temperature and humidity sensor, the HS4001 from Renesas. The HS4001 is a highly accurate, ultra-low power, fully calibrated automotive-grade relative humidity and temperature sensor. Its high accuracy, fast measurement response time, and long-term stability make the HS4001 sensor ideal for many applications ranging from portable devices to products designed for harsh environments. - -![The HS4001 sensor of the Nicla Sense Env board](assets/user-manual-13.png) - -The example sketch below demonstrates how to read temperature and humidity data from the HS4001 sensor using the `Arduino_NiclaSenseEnv` library API. The sketch will report the temperature and humidity values to the Arduino IDE's Serial Monitor every 2.5 seconds. - -```arduino -/** - Temperature and Humidity Sensor Example for Nicla Sense Env - Name: nicla_sense_env_temp_humidity_example.ino - Purpose: This sketch demonstrates how to read temperature and humidity from - the HS4001 sensor on the Nicla Sense Env using the Arduino_NiclaSenseEnv library API. - - @author Arduino Product Experience Team - @version 1.0 31/05/24 -*/ - -// Include the NiclaSenseEnv library -#include "NiclaSenseEnv.h" - -// Global device object for Nicla Sense Env -NiclaSenseEnv device; - -/** - Displays temperature and humidity data from the HS4001 sensor. - @param sensor Reference to TemperatureHumiditySensor object controlling the sensor. -*/ -void displaySensorData(TemperatureHumiditySensor& sensor) { - if (sensor.enabled()) { - float temperature = sensor.temperature(); - if (isnan(temperature)) { - Serial.println("- Temperature: N/A"); - } else { - Serial.print("- Temperature: "); - Serial.print(temperature, 2); - Serial.println(" °C"); - } - Serial.print("- Relative humidity: "); - Serial.print(sensor.humidity(), 2); - Serial.println(" %"); - Serial.println(""); - } else { - Serial.println("- Temperature sensor is disabled!"); - } -} - -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)); - - if (device.begin()) { - Serial.println("- Device is connected!"); - } else { - Serial.println("- Device could not be found. Please double check the wiring!"); - } -} - -void loop() { - // Read data from the HS4001 sensor - // Wait for 2.5 seconds before reading again - auto temperatureSensor = device.temperatureHumiditySensor(); - displaySensorData(temperatureSensor); - delay(2500); -} -``` - -Here is a detailed breakdown of the example sketch shown before and the `Arduino_NiclaSenseEnv` library API functions used in the sketch: - -- `temperatureHumiditySensor()`: Retrieves the temperature and humidity sensor object from the Nicla Sense Env. -- `sensor.enabled()`: Checks if the sensor is currently enabled. -- `sensor.temperature()`: Reads the current temperature value from the sensor. The reading is unavailable if the value is not a number (NaN). -- `sensor.humidity()`: Reads the current relative humidity value from the sensor. - -After uploading the example sketch to the host board, you should see the following output in the Arduino IDE's Serial Monitor: - -![Example sketch output in the Arduino IDE's Serial Monitor](assets/user-manual-14.png) - -You can download the example sketch [here](assets/nicla_sense_env_temp_humidity_example.zip). - -## Indoor Air Quality Sensor - -The Nicla Sense Env board features an onboard air quality sensor, the ZMOD4410 from Renesas. The ZMOD4410 is a highly integrated digital gas sensor module for indoor air quality monitoring. It provides measurements of total volatile organic compounds (TVOCs), estimates CO₂ levels, and monitors indoor air quality (IAQ), making it suitable for applications such as smart home devices, air purifiers, and HVAC systems. Its compact size, low power consumption, and high sensitivity make this sensor an excellent choice for various air quality monitoring applications. - -![The ZMOD4410 sensor of the Nicla Sense Env board](assets/user-manual-15.png) - -***Every ZMOD sensor is electrically and chemically calibrated during Renesas production. The calibration data is stored in the non-volatile memory (NVM) of the sensor module and is used by the firmware routines during sensor initialization. ZMOD sensors are qualified for a 10-year lifetime (following the JEDEC JESD47 standard) without the need for recalibration.*** - -The example sketch below demonstrates how to read air quality data from the ZMOD4410 sensor using the `Arduino_NiclaSenseEnv` library API. The sketch reports indoor air quality values to the Arduino IDE's Serial Monitor every 5 seconds. - -**Important**: The ZMOD4410 supports several operation modes, each with specific sample rates and warm-up requirements. For IAQ measurements, the sensor can take a sample every three seconds but requires 60 warm-up samples, meaning a total warm-up time of 3 minutes. In ultra-low-power mode, the sensor can take samples every 90 seconds but requires only 10 warm-up samples, meaning it takes 15 minutes to fully warm-up. - -```arduino -/** - Indoor Air Quality Sensor Example for Nicla Sense Env - Name: nicla_sense_env_indoor_air_quality_example.ino - Purpose: This sketch demonstrates how to read air quality data from the - ZMOD4410 sensor on the Nicla Sense Env using the Arduino_NiclaSenseEnv library API. - - @author Arduino Product Experience Team - @version 1.0 31/05/24 -*/ - -// Include the NiclaSenseEnv library -#include "NiclaSenseEnv.h" - -// Global device object for Nicla Sense Env -NiclaSenseEnv device; - -/** - Displays air quality data from the ZMOD4410 sensor. - @param sensor Reference to IndoorAirQualitySensor object controlling the sensor. -*/ -void displaySensorData(IndoorAirQualitySensor& sensor) { - if (sensor.enabled()) { - Serial.print("- Indoor air quality value: "); - Serial.println(sensor.airQuality()); - Serial.print("- CO2 (ppm): "); - Serial.println(sensor.CO2()); - Serial.print("- TVOC (mg/m3): "); - Serial.println(sensor.TVOC()); - Serial.print("- Ethanol (ppm): "); - Serial.println(sensor.ethanol()); - Serial.println(""); - } else { - Serial.println("- Indoor air quality sensor is disabled!"); - } -} - -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)); - - if (device.begin()) { - Serial.println("- Device is connected!"); - auto airQualitySensor = device.indoorAirQualitySensor(); - - // Set the sensor mode to indoor air quality - airQualitySensor.setMode(IndoorAirQualitySensorMode::indoorAirQuality); - - // The ZMOD4410 can take a sample every 3 seconds in IAQ mode and requires 60 warm-up samples, - // meaning the sensor will take about 3 minutes to fully warm-up before accurate readings can - // be obtained. In this example, we allow 5 seconds for the sensor to start delivering data. - delay(5000); - } else { - Serial.println("- Device could not be found. Please double-check the wiring!"); - } -} - -void loop() { - // Read data from the ZMOD4410 sensor every 5 seconds - auto airQualitySensor = device.indoorAirQualitySensor(); - displaySensorData(airQualitySensor); - delay(5000); -} -``` - -Here is a detailed breakdown of the example sketch shown before and the `Arduino_NiclaSenseEnv` library API functions used in the sketch: - -- `indoorAirQualitySensor()`: Retrieves the air quality sensor object from the Nicla Sense Env. -- `sensor.enabled()`: Checks if the sensor is currently enabled. -- `sensor.airQuality()`: Reads the current air quality value from the sensor. -- `sensor.CO2()`: Reads the estimated CO₂ concentration from the sensor. -- `sensor.TVOC()`: Reads the sensor's total concentration of volatile organic compounds. -- `sensor.ethanol()`: Reads the ethanol concentration from the sensor. - -After uploading the example sketch to the host board, you should see the following output in the Arduino IDE's Serial Monitor: - -![Example sketch output in the Arduino IDE's Serial Monitor](assets/user-manual-16.png) - -You can download the example sketch [here](assets/nicla_sense_env_indoor_air_quality_example.zip). - -## Outdoor Air Quality Sensor - -The Nicla Sense Env board features an onboard outdoor air quality sensor, the ZMOD4510 from Renesas. The ZMOD4510 is a digital gas sensor module for outdoor air quality monitoring. It measures nitrogen dioxide (NO₂) and ozone (O₃) levels. It calculates an outdoor air quality index (AQI), making it suitable for air quality monitoring stations, wearable devices, and smart city infrastructure applications. Its robustness, low power consumption, and high sensitivity make this sensor an excellent choice for outdoor air quality monitoring applications. - -![The ZMOD4510 sensor of the Nicla Sense Env board](assets/user-manual-17.png) - -***Every ZMOD sensor is electrically and chemically calibrated during Renesas production. The calibration data is stored in the non-volatile memory (NVM) of the sensor module and is used by the firmware routines during sensor initialization. ZMOD sensors are qualified for a 10-year lifetime (following the JEDEC JESD47 standard) without the need for recalibration.*** - -The example sketch below demonstrates how to read air quality data from the ZMOD4510 sensor using the `Arduino_NiclaSenseEnv` library API. The sketch reports outdoor air quality values to the Arduino IDE's Serial Monitor every 5 seconds. - -**Important**: The ZMOD4510 supports several operation modes, each with specific sample rates and warm-up requirements. For NO₂/O₃ measurements, the sensor can take a sample every 6 seconds but requires 50 warm-up samples, meaning a total warm-up time of 5 minutes. In ultra-low-power O₃ mode, the sensor can take samples every two seconds, but it requires 900 warm-up samples before it is fully operational, meaning it takes 30 minutes to warm-up completely. - -```arduino -/** - Outdoor Air Quality Sensor Example for Nicla Sense Env - Name: nicla_sense_env_outdoor_air_quality_example.ino - Purpose: This sketch demonstrates how to read air quality data from the - ZMOD4510 sensor on the Nicla Sense Env using the Arduino_NiclaSenseEnv library API. - - @author Arduino Product Experience Team - @version 1.0 31/05/24 -*/ - -// Include the NiclaSenseEnv library -#include "NiclaSenseEnv.h" - -// Global device object for Nicla Sense Env -NiclaSenseEnv device; - -/** - Displays air quality data from the ZMOD4510 sensor. - @param sensor Reference to OutdoorAirQualitySensor object controlling the sensor. -*/ -void displaySensorData(OutdoorAirQualitySensor& sensor) { - if (sensor.enabled()) { - Serial.print("- Outdoor air quality value: "); - Serial.println(sensor.airQualityIndex()); - Serial.print("- NO2 (ppb): "); - Serial.println(sensor.NO2()); - Serial.print("- O3 (ppb): "); - Serial.println(sensor.O3()); - Serial.println(""); - } else { - Serial.println("- Outdoor air quality sensor is disabled!"); - } -} - -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)); - - if (device.begin()) { - Serial.println("- Device is connected!"); - auto outdoorAirQualitySensor = device.outdoorAirQualitySensor(); - - // Enable the outdoor air quality sensor - outdoorAirQualitySensor.setMode(OutdoorAirQualitySensorMode::outdoorAirQuality); - outdoorAirQualitySensor.setEnabled(true); - - // The ZMOD4510 takes a sample every 6 seconds in NO2/O3 mode and requires 50 warm-up samples, - // meaning the sensor will take about 5 minutes to fully warm-up before accurate readings - // can be obtained. In this example, we allow 6 seconds for the sensor to start delivering data. - delay(6000); - } else { - Serial.println("- Device could not be found. Please double-check the wiring!"); - } -} - -void loop() { - // Read data from the ZMOD4510 sensor every 5 seconds - auto outdoorAirQualitySensor = device.outdoorAirQualitySensor(); - displaySensorData(outdoorAirQualitySensor); - delay(6000); -} -``` - -Here is a detailed breakdown of the example sketch shown before and the `Arduino_NiclaSenseEnv` library API functions used in the sketch: - -- `outdoorAirQualitySensor()`: Retrieves the outdoor air quality sensor object from the Nicla Sense Env. -- `sensor.enabled()`: Checks if the sensor is currently enabled. -- `sensor.airQualityIndex()`: Reads the current outdoor air quality index value. -- `sensor.NO2()`: Reads the nitrogen dioxide concentration from the sensor. -- `sensor.O3()`: Reads the ozone concentration from the sensor. - -After uploading the example sketch to the host board, you should see the following output in the Arduino IDE's Serial Monitor: - -![Example sketch output in the Arduino IDE's Serial Monitor](assets/user-manual-18.png) - -You can download the example sketch [here](assets/nicla_sense_env_outdoor_air_quality_example.zip). - -## Communication - -The Nicla Sense Env board features a UART interface for data logging purposes. This allows the board to output sensor data in `CSV` format over UART, enabling easy data logging and monitoring in various applications. The UART interface is handy for scenarios where the board needs to communicate with other microcontrollers or systems without relying on USB connections. - -The example sketch below demonstrates how to read data from the UART port on the Nicla Sense Env board. The sketch assumes the Nicla Sense Env is powered through the board's `VCC` pin or the ESLOV connector of a host board and connected to another board through the UART pins. The example also requires enabling the UART output on the Nicla Sense Env. - -```arduino -/** - UART Communication Example for Nicla Sense Env - Name: nicla_sense_env_uart_communication_example.ino - Purpose: This sketch demonstrates how to read data from the UART port on the Nicla Sense Env board - and process the data in CSV format for logging and monitoring purposes. - - @author Sebastián Romero, modified by the Arduino Product Experience Team - @version 1.0 31/05/24 -*/ - -// Include necessary libraries -#include -#include -#include - -// Define the default delimiter for CSV -constexpr char DEFAULT_DELIMITER = ','; - -// Define a mapping of CSV fields -std::map> csvFieldMapping = { - {0, {"HS4001 sample counter", "uint32"}}, - {1, {"HS4001 temperature (degC)", "float"}}, - {2, {"HS4001 humidity (%RH)", "float"}}, - {3, {"ZMOD4510 status", "uint8"}}, - {4, {"ZMOD4510 sample counter", "uint32"}}, - {5, {"ZMOD4510 EPA AQI", "uint16"}}, - {6, {"ZMOD4510 Fast AQI", "uint16"}}, - {7, {"ZMOD4510 O3 (ppb)", "float"}}, - {8, {"ZMOD4510 NO2 (ppb)", "float"}}, - {9, {"ZMOD4510 Rmox[0]", "float"}}, - // ... more fields as needed ... -}; - -// Define a map to store parsed values -std::map parsedValuesMap; - -/** - Converts a string to a float, handling exponents - @param str The string to convert - @return The float value -*/ -float parseFloatWithExponent(const String &str) { - double value = str.toDouble(); - return static_cast(value); -} - -/** - Processes a CSV line and maps the fields to their corresponding names - @param data The CSV line as a string - @param delimiter The character used to separate fields in the CSV line - @param targetMap The map to store parsed values -*/ -void processCSVLine(String data, char delimiter, std::map &targetMap) { - if (data.startsWith("INFO:") || data.startsWith("WARNING:")) { - return; - } - - if (data.startsWith("ERROR:")) { - Serial.println(data); - return; - } - - std::vector fields; - size_t pos = 0; - while ((pos = data.indexOf(delimiter)) != -1) { - fields.push_back(data.substring(0, pos)); - data = data.substring(pos + 1); - } - fields.push_back(data); // Last field - - for (size_t i = 0; i < fields.size(); ++i) { - auto [name, type] = csvFieldMapping[i]; - String fieldValue = fields[i]; - - if (fieldValue == "") { - continue; - } - - if (type == "float") { - float floatValue = parseFloatWithExponent(fieldValue); - targetMap[name] = String(floatValue); - } else { - targetMap[name] = fieldValue; - } - } -} - -void setup(){ - Serial.begin(115200); - Serial1.begin(38400, SERIAL_8N1); - - while (!Serial || !Serial1) { - delay(100); - } - - Serial.println("Serial ports initialized"); -} - -void loop() { - if (!Serial1.available()) { - delay(100); - return; - } - - String csvLine = Serial1.readStringUntil('\n'); - processCSVLine(csvLine, DEFAULT_DELIMITER, parsedValuesMap); - - if (parsedValuesMap.empty()) { - Serial.println("No data to parse."); - return; - } - - for (const auto &entry : parsedValuesMap) { - Serial.print(entry.first + ": "); - Serial.println(entry.second); - } - - Serial.println(); - parsedValuesMap.clear(); -} -``` - -Here is a detailed breakdown of the example sketch shown before and the main functionalities of the UART communication on the Nicla Sense Env: - -- First, the Nicla Sense Env needs to have its UART output enabled. This can be done by connecting to the board over I²C to a host board and running `device.begin()` and `device.setUARTCSVOutputEnabled(true, true)`. -- `Serial1.begin(38400, SERIAL_8N1)`: Initializes the `Serial1` port for UART communication with the specified baud rate and configuration. -- `processCSVLine()`: A function that processes a CSV line, maps the fields to their corresponding names and stores them in a map for easy access. -- The `loop()` function reads data from the UART port, processes the CSV data, and prints the parsed values to the Serial Monitor. - -You can download the example sketch [here](assets/nicla_sense_env_uart_communication_example.zip). - -## Support - -If you encounter any issues or have questions while working with your Nicla Sense Env 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 Nicla family boards. The Help Center is designed to provide in-depth technical assistance and help you make the most of your device. - -- [Nicla family help center page](https://support.arduino.cc/hc/en-us/sections/4410176504978-Nicla-Family) - -### Forum - -Join our community forum to connect with other Nicla 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 Nicla Sense Env. - -- [Nicla Sense Env category in the Arduino Forum](https://forum.arduino.cc/c/hardware/nicla-family/nicla-family/169) - -### 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 Nicla family boards. - +--- +title: 'Nicla Sense Env User Manual' +difficulty: beginner +compatible-products: [nicla-sense-env] +description: 'Learn about the hardware and software features of the Arduino® Nicla Sense Env.' +tags: + - RGB + - Sensors + - Cheat sheet + - User manual +author: 'José Bagur' +hardware: + - hardware/06.nicla/boards/nicla-sense-env +software: + - ide-v1 + - ide-v2 + - iot-cloud + - web-editor +--- + +This user manual provides a comprehensive overview of the Nicla Sense Env board, highlighting its hardware and software elements. With it, you will learn how to set up, configure, and use all the main features of a Nicla Sense Env board. + +![ ](assets/hero-banner.png) + +## Hardware and Software Requirements + +### Hardware Requirements + +- [Nicla Sense Env](https://store.arduino.cc/products/nicla-sense-env) (x1) +- [Portenta C33](https://store.arduino.cc/products/portenta-c33) (x1) +- [USB-C® cable](https://store.arduino.cc/products/usb-cable2in1-type-c) (x1) + +### Software Requirements + +- [Arduino IDE 2.0+](https://www.arduino.cc/en/software) or [Arduino Web Editor](https://create.arduino.cc/editor) +- [Arduino_NiclaSenseEnv library](https://github.com/arduino-libraries/Arduino_NiclaSenseEnv) +- [Arduino Renesas Portenta Boards core](https://github.com/arduino/ArduinoCore-renesas) (required to work with the Portenta C33 board) + +***The Nicla Sense Env board is not intended as a standalone device but as a shield to work alongside a Portenta, MKR, or Nano family board. In this user manual, we will use the Portenta C33 as the main board and show how to use the Nicla Sense Env board as a shield.*** + +## Nicla Sense Env Overview + +Enhance your environmental sensing capabilities with the Nicla Sense Env board. This board combines three cutting-edge sensors from Renesas® with the Arduino ecosystem's ease of integration and scalability. This board is well-suited for augmenting your Portenta or MKR-based projects with environmental sensing capabilities. + +![ ](assets/front_page.png) + +The Nicla Sense Env includes an ultra-low power temperature and humidity sensor, complemented by two sophisticated industrial-grade gas sensors capable of assessing air quality in indoor and outdoor settings. Its compact dimensions (22.86 x 22.86 mm) and sturdy build make the Nicla Sense Env an excellent choice for projects that demand sensor fusion and the computational capabilities of Arduino boards. + +### Nicla Sense Env Architecture Overview + +The Nicla Sense Env features a secure, certified, and durable design that suits various applications, such as industrial automation, building automation, and prototyping. + +The top view of the Nicla Sense Env board is shown in the image below: + +![The Nicla Sense Env main components (top view)](assets/user-manual-1.png) + +The bottom view of the Nicla Sense Env board is shown in the image below: + +![The Nicla Sense Env main components (bottom view)](assets/user-manual-2.png) + +Here's an overview of the board's main components shown in the images above: + +- **Microcontroller**: At the heart of the Nicla Sense Env is a [Renesas RA2E1 microcontroller](https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ra2e1-48mhz-arm-cortex-m23-entry-level-general-purpose-microcontroller). This entry-level single-chip microcontroller, known as one of the industry's most energy-efficient ultra-low-power microcontroller, is based on a 48 MHz Arm® Cortex®-M23 core with up to 128 KB code flash and 16 KB SRAM memory. +- **Onboard humidity and temperature sensor**: The Nicla Sense Env features an onboard humidity and temperature sensor, the [HS4001 from Renesas](https://www.renesas.com/us/en/products/sensor-products/environmental-sensors/humidity-temperature-sensors/hs4001-relative-humidity-and-temperature-sensor-digital-output-15-rh). This highly accurate, ultra-low power, fully calibrated relative humidity and temperature sensor features proprietary sensor-level protection, ensuring high reliability and long-term stability. +- **Onboard indoor air quality sensor**: The Nicla Sense Env features an onboard gas sensor, the [ZMOD4410 from Renesas](https://www.renesas.com/us/en/document/dst/zmod4410-datasheet). This sophisticated sensor was designed to detect total volatile organic compounds (TVOC), estimate CO2, and monitor and report indoor air quality (IAQ). +- **Onboard outdoor air quality sensor**: The Nicla Sense Env features an onboard gas sensor, the [ZMOD4510 from Renesas](https://www.renesas.com/us/en/document/dst/zmod4410-datasheet). This sophisticated sensor was designed to monitor and report outdoor air quality (OAQ) based on nitrogen dioxide (NO2) and ozone (O3) measurements. +- **Onboard user LEDs**: The Nicla Sense Env has two onboard user-programmable LEDs; one is an orange LED, and the other one is an RGB LED. +- **ESLOV connector**: The Nicla Sense Env has an onboard ESLOV connector to extend the board communication capabilities via I2C. +- **Surface mount**: The castellated pins of the board allow it to be positioned as a surface-mountable module. + +### Board Libraries + +The [`Arduino_NiclaSenseEnv` library](https://github.com/arduino-libraries/Arduino_NiclaSenseEnv) contains an application programming interface (API) to read data from the board and control its parameters and behavior over I²C. This library supports the following: + +- Board control (sleep, reset, and factory reset) +- Board configuration (I²C address configuration) +- Onboard RGB LED control +- Onboard orange LED control +- Onboard indoor air quality sensor control (sulfur detection, odor intensity, ethanol level, TVOC, CO₂, IAQ measurements) +- Onboard outdoor air quality sensor control (NO₂, O3, OAQ measurements) +- Temperature and humidity sensor control +- UART comma-separated values (CSV) output + +***The Portenta, MKR, Nano and UNO (R4) family boards support the `Arduino_NiclaSenseEnv` library.*** + +To install the `Arduino_NiclaSenseEnv` library, navigate to `Tools > Manage libraries...` or click the **Library Manager** icon in the left tab of the Arduino IDE. In the Library Manager tab, search for `Arduino_NiclaSenseEnv` and install the latest version of the library. + +![Installing the board's library in the Arduino IDE](assets/user-manual-3.png) + +### Pinout + +The full pinout is available and downloadable as PDF from the link below: + +- [Nicla Sense Env pinout](https://docs.arduino.cc/resources/pinouts/ABX00089-full-pinout.pdf) + +### Datasheet + +The complete datasheet is available and downloadable as PDF from the link below: + +- [Nicla Sense Env datasheet](https://docs.arduino.cc/resources/datasheets/ABX00089-datasheet.pdf) + +### Schematics + +The complete schematics are available and downloadable as PDF from the link below: + +- [Nicla Sense Env schematics](https://docs.arduino.cc/resources/schematics/ABX00089-schematics.pdf) + +### STEP Files + +The complete STEP files are available and downloadable from the link below: + +- [Nicla Sense Env STEP files](../../downloads/ABX00089-step.zip) + +## First Use + +### Unboxing the Product + +Let's check out what is inside the box of the Nicla Sense Env board. Besides the board, you will find an ESLOV cable inside the box, which can connect the Nicla Sense Env with other supported Arduino boards with an onboard ESLOV connector (Portenta or MKR family boards). The board's MKR-styled pins can also connect the Nicla Sense Env to other supported Arduino boards (Nano family), but 2.54 mm header pins (not included) must be soldered to the MKR-styled board pins. + +![Unboxing the Nicla Sense Env](assets/user-manual-4.png) + +**The Nicla Sense Env is not a standalone device but a shield for an Arduino-supported board from the Portenta, MKR, or Nano board families**. This user manual will use a Portenta C33 as the main or host board and the Nicla Sense Env as a shield or client board connected through the included ESLOV cable. + +### Connecting the Board + +As shown in the image below, the Nicla Sense Env can be connected to a Portenta or MKR family board using the onboard ESLOV connector and the included ESLOV cable. Alternatively, you can connect the Nicla Sense Env as a shield by using the MKR-style pins on the Portenta or MKR family boards. + +![Connecting the Nicla Sense Env](assets/user-manual-23.png) + +For other compatible boards, such as those from the Nano family, the Nicla Sense Env can also be connected using the 2.54 mm pins of the Nicla Sense Env board. + +***Important note: The Nicla Sense Env board operates at 3.3 VDC, and while its pins are 5 VDC tolerant, we recommend using a level translator when connecting it to 5 VDC-compatible Arduino boards to ensure safe communication and prevent potential damage to the components. This connection can be made either through the Nicla Sense Env’s ESLOV connector or its dedicated I2C pins (`I2C0`), as illustrated in the image below.*** + +![Connecting the Nicla Sense Env to a 5 VDC-compatible Arduino board](assets/user-manual-24.png) + +As shown in the image above, the use of a dedicated level translator between the Nicla Sense Env board and the 5 VDC-compatible Arduino board, in this example an Arduino UNO R4 WiFi, is recommended. + +### Powering the Board + +The Nicla Sense Env can be powered by: + +- Via **ESLOV connector**: Using the onboard ESLOV connector, which provides a dedicated +5 VDC power line. This voltage is internally regulated to +3.3 VDC by the onboard voltage regulator. +- Via **`IN` pin**: Using an external +2.3 to +6.5 VDC power supply connected to the `IN` pin (pin 9). This method uses the same internal regulation circuit as the ESLOV connector. +- Via **`OUT` pin**: Using an external regulated +3.3 VDC power supply connected to the `OUT` pin (pin 7). **This method bypasses the onboard voltage regulator**. + +![Different ways to power the Nicla Sense Env](assets/user-manual-5.png) + +The board's power architecture includes a voltage regulator (ISL9008A) that converts the input voltage to +3.3 VDC for the internal circuitry. When powering via ESLOV or the `IN` pin, the onboard regulator handles this conversion automatically and can supply up to 150 mA of current through the `OUT` pin. + +#### Power Pins Reference + +The following table summarizes the power-related pins on the Nicla Sense Env board: + +| **Pin** | **Name** | **Voltage** | **Description** | +|:-------:|:--------:|:----------------:|:-------------------------------------------------------:| +| 9 | `IN` | +2.3 to +6.5 VDC | Power input connected to the onboard voltage regulator | +| 7 | `OUT` | +3.3 VDC | Regulated +3.3 VDC output/External +3.3 VDC power input | +| 6 | `GND` | 0 VDC | Ground reference | + +***__Important note:__ Do not exceed the voltage limits specified for each power pin: +2.3 to +6.5 VDC for the `IN` pin and +3.3 VDC for the `OUT` pin. Voltages outside these ranges will permanently damage the board. Neither pin has reverse polarity protection; always verify all connections before applying power.*** + +In this user manual, we will use the board's ESLOV connector to power it. + +### Hello World Example + +Let's control the Nicla Sense Env board to reproduce the classic `hello world` example used in the Arduino ecosystem: the `Blink`. We will use this example to verify the Nicla Sense Env's connection to the host board (a Portenta C33) via ESLOV, the host board's connection to the Arduino IDE, and that the `Arduino_NiclaSenseEnv` library and both boards, the shield and the host, are working as expected. This section will refer to the Nicla Sense Env as a shield or client. + +***We are using the API of the `Arduino_NiclaSenseEnv` library with the host board (Portenta C33) to control the Nicla Sense Env (shield).*** + +First, connect the shield to the host board via ESLOV, as shown in the image below, using an ESLOV cable (included with your Nicla Sense Env): + +![Connecting the Nicla Sense Env to the host board via ESLOV](assets/user-manual-6.png) + +Now, connect the host board to your computer using a USB-C® cable, open the Arduino IDE, and connect the host board to it. + +***If you are new to the Portenta C33, please refer to the board's [user manual](https://docs.arduino.cc/tutorials/portenta-c33/user-manual/) for more detailed information.*** + +Copy and paste the example sketch below into a new sketch in the Arduino IDE: + +```arduino +/** + Blink Example on Nicla Sense Env + Name: nicla_sense_env_blink.ino + Purpose: This sketch demonstrates how to blink the onboard + orange LED of the Nicla Sense Env board. + + @author Arduino Product Experience Team + @version 1.0 31/05/24 +*/ + +// Include the NiclaSenseEnv library +#include "NiclaSenseEnv.h" + +// Global device object for the Nicla Sense Env board +NiclaSenseEnv device; + +/** + Toggles the onboard orange LED between on and off states. + @param led Reference to OrangeLED object controlling the LED. +*/ +void toggleLED(OrangeLED& led) { + // Turn on the LED to full brightness for one second + led.setBrightness(63); + delay(1000); + + // Turn off the LED for one second + led.setBrightness(0); + delay(1000); +} + +void setup() { + // Initialize serial communication at 115200 bits per second. + Serial.begin(115200); + + // Wait for Serial to be ready with a timeout of 5 seconds + for(auto start = millis(); !Serial && millis() - start < 5000;); + + if (device.begin()) { + // Initialize the onboard orange LED + auto orangeLED = device.orangeLED(); + } +} + +void loop() { + // Retrieve the orange LED object + OrangeLED orangeLED = device.orangeLED(); + + // Continuously toggle the orange LED on and off + toggleLED(orangeLED); +} +``` + +To upload the sketch to the host 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 host board (Portenta C33) in the Arduino IDE](assets/user-manual-7.png) + +You should see the onboard orange LED of your Nicla Sense Env board turn on for one second, then off for one second, repeatedly. + +![Hello World on the Nicla Sense Env board](assets/user-manual-8.gif) + +## Board Management + +This section of the user manual outlines how to manage the onboard sensors and main features of the Nicla Sense Env board using the `Arduino_NiclaSenseEnv` library API. It also explains how to perform essential tasks such as retrieving the board's information, managing sensor states, resetting the board, and putting it into deep sleep mode. + +### Board Information + +Detailed information from the board, such as its I2C address, serial number, product ID, software revision, and UART communication settings, can be retrieved using the `Arduino_NiclaSenseEnv` library API. The example sketch shown below retrieves that information using a dedicated function called `printDeviceInfo()`: + +```arduino +/** + Board Information Retrieval Example for Nicla Sense Env + Name: nicla_sense_env_board_info_example.ino + Purpose: This sketch demonstrates how to retrieve detailed board information from the Nicla Sense Env using the Arduino_NiclaSenseEnv library API. + + @author Sebastián Romero, modified by the Arduino Product Experience Team + @version 1.0 31/05/24 +*/ + +// Include the NiclaSenseEnv library +#include "NiclaSenseEnv.h" + +// Global device object for Nicla Sense Env +NiclaSenseEnv device; + +/** + Prints detailed device information to the Serial Monitor. + This function outputs all critical system parameters including + the device I2C address, serial number, and other configuration settings. +*/ +void printDeviceInfo() { + Serial.println("- Device Information:"); + Serial.print("- Device (0x"); + Serial.print(device.deviceAddress(), HEX); + Serial.println(") connected."); + Serial.print("- Serial number: "); + Serial.println(device.serialNumber()); + Serial.print("- Product ID: "); + Serial.println(device.productID()); + Serial.print("- Software revision: "); + Serial.println(device.softwareRevision()); + Serial.print("- Baud rate: "); + Serial.println(device.UARTBaudRate()); + Serial.print("- CSV delimiter: "); + Serial.println(device.CSVDelimiter()); + + Serial.print("- Debugging enabled: "); + if (device.isDebuggingEnabled()) { + Serial.println("true"); + } else { + Serial.println("false"); + } + + Serial.print("- CSV output enabled: "); + if (device.isUARTCSVOutputEnabled()) { + Serial.println("true"); + } else { + Serial.println("false"); + } +} + +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)); + + if (device.begin()) { + Serial.println("- Device successfully initialized!"); + // Print device information once after initialization + printDeviceInfo(); + } else { + Serial.println("- Failed to initialize the device. Please check the connection!"); + } +} + +void loop() { + // Nothing to do here. All information is printed once in setup(). +} +``` + +Here is a detailed breakdown of the `printDeviceInfo()` function and the `Arduino_NiclaSenseEnv` library API functions used in the `printDeviceInfo()` function: + +- `deviceAddress()`: Retrieves the I2C address of the board. This is useful for identifying the board when multiple devices are connected to the same I2C bus. +- `serialNumber()`: Outputs the board's unique serial number. Each board's serial number is unique and can be used for tracking, inventory management, or validating its authenticity. +- `productID()`: Provides the product ID, which specifies the exact model or version of the board. +- `softwareRevision()`: This displays the current firmware version installed on the board. Keeping the firmware updated is critical for security, performance, and access to new features, making this information valuable for maintenance and support. +- `UARTBaudRate()`: Shows the baud rate used for UART communications. +- `CSVDelimiter()`: Reveals the delimiter used in CSV outputs. This detail is vital for developers who process or log data, as it affects how data is parsed and stored. +- `isDebuggingEnabled()`: Indicates whether the debugging mode is active. Debugging can provide additional output that helps diagnose issues or for development purposes. +- `isUARTCSVOutputEnabled()`: Shows whether CSV output through UART is enabled. This setting is important for applications that require data logging for analysis or reporting, as it impacts how data is exported from the board. + +After uploading the example sketch to the host board, you should see the following output in the Arduino IDE's Serial Monitor: + +![Example sketch output in the Arduino IDE's Serial Monitor](assets/user-manual-9.png) + +You can download the example sketch [here](assets/nicla_sense_env_board_info_example.zip). + +### Onboard Sensors Management + +Efficient management of the Nicla Sense Env's onboard sensors is important for optimizing its performance and power usage. The sketch shown below demonstrates how to manage (turn on or off) the onboard sensors (temperature, relative humidity, and air quality) of the Nicla Sense Env and check their status using the `Arduino_NiclaSenseEnv` library API: + +```arduino +/** + Onboard Sensors Management Example for Nicla Sense Env + Name: nicla_sense_env_sensors_management_example.ino + Purpose: This sketch demonstrates how to manage the onboard sensors of the Nicla Sense Env using the Arduino_NiclaSenseEnv library API. + + @author Arduino Product Experience Team + @version 1.0 31/05/24 +*/ + +// Include the NiclaSenseEnv library +#include "NiclaSenseEnv.h" + +// Global device object for Nicla Sense Env +NiclaSenseEnv device; + +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)); + + if (device.begin()) { + // Disable all the onboard sensors + Serial.println("- Disabling all sensors..."); + device.temperatureHumiditySensor().setEnabled(false); + device.indoorAirQualitySensor().setEnabled(false); + device.outdoorAirQualitySensor().setEnabled(false); + + // Check the onboard sensor states + Serial.println("- Checking the sensor states..."); + Serial.print("- Temperature sensor enabled: "); + if (device.temperatureHumiditySensor().enabled()) { + Serial.println("true"); + } else { + Serial.println("false"); + } + + Serial.print("- Indoor air quality sensor enabled: "); + if (device.indoorAirQualitySensor().enabled()) { + Serial.println("true"); + } else { + Serial.println("false"); + } + + Serial.print("- Outdoor air quality sensor enabled: "); + if (device.outdoorAirQualitySensor().enabled()) { + Serial.println("true"); + } else { + Serial.println("false"); + } + } else { + Serial.println("- Device could not be found. Please double-check the wiring!"); + } +} + +void loop() { + // Nothing to do here. All information is printed once in setup(). +} +``` + +This example sketch initializes the Nicla Sense Env board, disables all onboard sensors and then checks and prints the status of each sensor on the Arduino IDE's Serial Monitor. Here is a detailed breakdown of the example sketch shown before and the `Arduino_NiclaSenseEnv` library API functions used in the sketch: + +- `temperatureHumiditySensor().setEnabled(false)`: Disables the onboard temperature and humidity sensor. +- `indoorAirQualitySensor().setEnabled(false)`: Turns off the onboard indoor air quality sensor. +- `outdoorAirQualitySensor().setEnabled(false)`: Deactivates the onboard outdoor air quality sensor. +- `temperatureHumiditySensor().enabled()`: Checks if the onboard temperature and humidity sensor is active. +- `indoorAirQualitySensor().enabled()`: Indicates whether the onboard indoor air quality sensor is currently enabled. +- `outdoorAirQualitySensor().enabled()`: Confirms if the onboard outdoor air quality sensor is operational. + +After uploading the example sketch to the host board, you should see the following output in the Arduino IDE's Serial Monitor: + +![Example sketch output in the Arduino IDE's Serial Monitor](assets/user-manual-10.png) + +You can download the example sketch [here](assets/nicla_sense_env_sensors_management_example.zip). + +### Board Reset + +Resetting the Nicla Sense Env is important for troubleshooting and ensuring the device operates cleanly. It is handy after making significant changes to the configuration or when an unexpected behavior occurs. + +The example sketch below demonstrates how to reset the Nicla Sense Env using the `Arduino_NiclaSenseEnv` library API. It also shows how to verify that the board has been reset by turning off the temperature sensor before the reset and checking its status after the reset. + +```arduino +/** + Board Reset Example for Nicla Sense Env + Name: nicla_sense_env_board_reset_example.ino + Purpose: This sketch demonstrates how to reset the Nicla Sense Env + using the Arduino_NiclaSenseEnv library API and verifies the reset + by disabling and then re-enabling the temperature sensor. + + @author Arduino Product Experience Team + @version 1.0 31/05/24 +*/ + +// Include the NiclaSenseEnv library +#include "NiclaSenseEnv.h" + +// Global device object for Nicla Sense Env +NiclaSenseEnv device; + +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)); + + if (device.begin()) { + // Disable the temperature sensor + Serial.println("- Disabling temperature sensor..."); + device.temperatureHumiditySensor().setEnabled(false); + + // Check the temperature sensor state before reset + Serial.print("- Temperature sensor enabled before reset: "); + if (device.temperatureHumiditySensor().enabled()) { + Serial.println("true"); + } else { + Serial.println("false"); + } + + // Resetting the device + Serial.println("- Resetting the device..."); + device.reset(); + delay(2000); // Ensure the device has enough time to reset properly + + // Check the temperature sensor state after reset + Serial.print("- Temperature sensor enabled after reset: "); + if (device.temperatureHumiditySensor().enabled()) { + Serial.println("true"); + } else { + Serial.println("false"); + } + } else { + Serial.println("- Device could not be found. Please double-check the wiring!"); + } +} + +void loop() { + // Nothing to do here. The device resets in setup(). +} +``` + +This example shows that the temperature sensor, disabled before the reset, is re-enabled after the reset, confirming that the board has restarted and all settings have been reset to their defaults. Here is a detailed breakdown of the example sketch shown before and the `Arduino_NiclaSenseEnv` library API functions used in the sketch: + +- `device.temperatureHumiditySensor().setEnabled(false)`: Disables the onboard temperature and humidity sensor. +- `device.reset()`: This function reboots the Nicla Sense Env, clearing all temporary settings. + +After uploading the example sketch to the host board, you should see the following output in the Arduino IDE's Serial Monitor: + +![Example sketch output in the Arduino IDE's Serial Monitor](assets/user-manual-11.png) + +You can download the example sketch [here](assets/nicla_sense_env_board_reset_example.zip). + +### Low Power Mode Management + +Saving energy is vital for many projects, particularly those deployed in remote areas or with a limited power supply. The Nicla Sense Env supports a deep sleep mode that can help to minimize the board's power consumption. + +***Deep sleep is essential for extending battery life and minimizing energy consumption when the board is not collecting data or performing tasks. It is necessary for battery-powered or power-constrained applications.*** + +The example sketch shown below demonstrates how to put the Nicla Sense Env board into deep sleep mode using the `Arduino_NiclaSenseEnv` library API: + +```arduino +/** + Low Power Mode Management Example for Nicla Sense Env + Name: nicla_sense_env_low_power_mode_example.ino + Purpose: This sketch demonstrates how to put the Nicla Sense Env + into deep sleep mode using the Arduino_NiclaSenseEnv library API. + + @author Arduino Product Experience Team + @version 1.0 31/05/24 +*/ + +// Include the NiclaSenseEnv library +#include "NiclaSenseEnv.h" + +// Global device object for Nicla Sense Env +NiclaSenseEnv device; + +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)); + + if (device.begin()) { + // Putting the device to sleep + Serial.println("- Going to deep sleep mode..."); + device.deepSleep(); + } else { + Serial.println("- Device could not be found. Please double-check the wiring!"); + } +} + +void loop() { + // Nothing to do here. The device is in deep sleep mode. +} +``` + +Here is a detailed breakdown of the example sketch shown before and the `Arduino_NiclaSenseEnv` library API functions used in the sketch: + +- `device.deepSleep()`: This function puts the Nicla Sense Env board into a deep sleep state, minimizing power consumption to the lowest possible level. + +After uploading the example sketch to the host board, you should see the following output in the Arduino IDE's Serial Monitor: + +![Example sketch output in the Arduino IDE's Serial Monitor](assets/user-manual-12.png) + +***Waking up a Nicla Sense Env board from deep sleep mode can only be done by a hardware reset.*** + +You can download the example sketch [here](assets/nicla_sense_env_low_power_mode_example.zip). + +## LEDs + +This section of the user manual explains how to control both the onboard orange and RGB and LEDs of the Nicla Sense Env board using the `Arduino_NiclaSenseEnv` library API. The LEDs can be used to provide visual feedback for various operations, such as indicating status, warnings, or sensor errors. This section covers the basic usage of both LEDs, including turning them on, changing colors, and adjusting its brightness. + +![The onboard LEDs of the Nicla Sense Env board](assets/user-manual-20.png) + +### Orange LED + +The onboard orange LED on the Nicla Sense Env board can be controlled using the `Arduino_NiclaSenseEnv` library. The example sketch shown below shows how to smoothly increase and decrease the brightness of the onboard orange LED. The LED pulses continuously in the `loop()` function. + +```arduino +/** + Orange LED Control Example for Nicla Sense Env + Name: nicla_sense_env_orange_led_control_example_smooth_brightness.ino + Purpose: This sketch demonstrates how to smoothly control the orange LED + by increasing and decreasing its brightness using the Arduino_NiclaSenseEnv library. + + @author Arduino Product Experience Team + @version 1.0 31/05/24 +*/ + +// Include the NiclaSenseEnv library +#include "Arduino_NiclaSenseEnv.h" + +// Global device object for Nicla Sense Env +NiclaSenseEnv device; + +// Initial brightness level +int brightness = 0; + +// Amount to increase/decrease the brightness by each loop +int fadeAmount = 5; + +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)); + + if (device.begin()) { + Serial.println("- Device successfully initialized!"); + } else { + Serial.println("- Failed to initialize the device. Please check the connection!"); + } +} + +void loop() { + // Get the orange LED object + auto orangeLED = device.orangeLED(); + + // Set the brightness level + orangeLED.setBrightness(brightness); + + // Change the brightness for next time through the loop + brightness += fadeAmount; + + // Reverse the direction of the fading at the ends of the fade (0 and 255) + if (brightness <= 0 || brightness >= 255) { + // Change the direction of the fade + fadeAmount = -fadeAmount; + } + + // Wait for a short time before updating the brightness again + delay(30); +} +``` + +Here is a detailed breakdown of the example sketch shown before and the `Arduino_NiclaSenseEnv` library API functions used in the sketch: + +- `device.begin()`: Initializes the Nicla Sense Env board, setting up communication with all onboard sensors and components, including the orange LED. +- `orangeLED.setBrightness(uint8_t brightness)`: Adjusts the brightness of the orange LED. The brightness ranges from `0` (off) to `255` (full brightness). In this sketch, the brightness gradually increases from `0` to `255` and then decreases back to 0, creating a smooth pulsing effect. +- `fadeAmount`: Controls the rate of change of brightness. When the brightness reaches either 0 or 255, the direction of change is reversed, making the LED brightness smoothly cycle up and down. + +After uploading the example sketch to the Nicla Sense Env board, you should see the orange LED smoothly increase and decrease in brightness, creating a continuous pulsing effect. + +![Orange LED of the Nicla Sense Env board](assets/user-manual-22.gif) + +You can download the example sketch [here](assets/nicla_sense_env_orange_led_control_example.zip). + +### RGB LED + +The onboard RGB LED on the Nicla Sense Env board can be controlled using the `Arduino_NiclaSenseEnv` library. The example sketch shown below shows how to turn on the LED with different colors and then turn it off using the `setColor()` and `setBrightness()` functions. The LED colors cycle continuously in the `loop()` function. + +```arduino +/** + RGB LED Control Example for Nicla Sense Env + Name: nicla_sense_env_rgb_led_control_example_brightness.ino + Purpose: This sketch demonstrates how to control the RGB LED by setting + different colors and ensuring brightness control using the Arduino_NiclaSenseEnv library. + + @author Arduino Product Experience Team + @version 1.0 31/05/24 +*/ + +// Include the NiclaSenseEnv library +#include "Arduino_NiclaSenseEnv.h" + +// Global device object for Nicla Sense Env +NiclaSenseEnv device; + +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)); + + if (device.begin()) { + Serial.println("- Device successfully initialized!"); + } else { + Serial.println("- Failed to initialize the device. Please check the connection!"); + } +} + +void loop() { + // Get the RGB LED object + auto rgbLED = device.rgbLED(); + + // Turn on the LED with red color + rgbLED.setColor(255, 0, 0); + // Ensure maximum brightness, wait for one second + rgbLED.setBrightness(255); + Serial.println("- RGB LED is now red!"); + delay(1000); + + // Turn on the LED with green color + rgbLED.setColor(0, 255, 0); + // Ensure maximum brightness, wait for one second + rgbLED.setBrightness(255); + Serial.println("- RGB LED is now green!"); + delay(1000); + + // Turn on the LED with blue color + rgbLED.setColor(0, 0, 255); + // Ensure maximum brightness, wait for one second + rgbLED.setBrightness(255); + Serial.println("- RGB LED is now blue!"); + delay(1000); + + // Set the LED color to black and brightness to 0 to turn it off + rgbLED.setColor(0, 0, 0); + // Ensure minimum brightness, wait for one second + rgbLED.setBrightness(0); + Serial.println("- RGB LED is now off!"); + delay(1000); +} +``` + +Here is a detailed breakdown of the example sketch shown before and the `Arduino_NiclaSenseEnv` library API functions used in the sketch: + +- `device.begin()`: Initializes the Nicla Sense Env board, setting up communication with all onboard sensors and components, including the RGB LED. +- `rgbLED.setColor(uint8_t red, uint8_t green, uint8_t blue)`: This function sets the RGB LED to a specific color by specifying the intensity of the red, green, and blue components. Each value can range from `0` (off) to `255` (full brightness). In the example, the RGB LED cycles through red (255, 0, 0), green (0, 255, 0), and blue (0, 0, 255). +- `rgbLED.setBrightness(uint8_t brightness)`: Adjusts the brightness of the RGB LED. The value ranges from `0` (off) to `255` (full brightness). In the sketch, the brightness is set to 255 (maximum) when the LED is on, and to 0 (off) when the LED is turned off. + +After uploading the example sketch to the Nicla Sense Env board, you should see the following output in the Arduino IDE's Serial Monitor: + +![Example sketch output in the Arduino IDE's Serial Monitor](assets/user-manual-19.png) + +You should also see the onboard RGB LED of your Nicla Sense Env board turn on red for one second, then green for one second, then blue for one second, and finally turn off, repeating this cycle. + +![RGB LED of the Nicla Sense Env board](assets/user-manual-21.gif) + +You can download the example sketch [here](assets/nicla_sense_env_rgb_led_control_example_brightness.zip). + +## Temperature and Humidity Sensor + +The Nicla Sense Env board has an onboard temperature and humidity sensor, the HS4001 from Renesas. The HS4001 is a highly accurate, ultra-low power, fully calibrated automotive-grade relative humidity and temperature sensor. Its high accuracy, fast measurement response time, and long-term stability make the HS4001 sensor ideal for many applications ranging from portable devices to products designed for harsh environments. + +![The HS4001 sensor of the Nicla Sense Env board](assets/user-manual-13.png) + +The example sketch below demonstrates how to read temperature and humidity data from the HS4001 sensor using the `Arduino_NiclaSenseEnv` library API. The sketch will report the temperature and humidity values to the Arduino IDE's Serial Monitor every 2.5 seconds. + +```arduino +/** + Temperature and Humidity Sensor Example for Nicla Sense Env + Name: nicla_sense_env_temp_humidity_example.ino + Purpose: This sketch demonstrates how to read temperature and humidity from + the HS4001 sensor on the Nicla Sense Env using the Arduino_NiclaSenseEnv library API. + + @author Arduino Product Experience Team + @version 1.0 31/05/24 +*/ + +// Include the NiclaSenseEnv library +#include "NiclaSenseEnv.h" + +// Global device object for Nicla Sense Env +NiclaSenseEnv device; + +/** + Displays temperature and humidity data from the HS4001 sensor. + @param sensor Reference to TemperatureHumiditySensor object controlling the sensor. +*/ +void displaySensorData(TemperatureHumiditySensor& sensor) { + if (sensor.enabled()) { + float temperature = sensor.temperature(); + if (isnan(temperature)) { + Serial.println("- Temperature: N/A"); + } else { + Serial.print("- Temperature: "); + Serial.print(temperature, 2); + Serial.println(" °C"); + } + Serial.print("- Relative humidity: "); + Serial.print(sensor.humidity(), 2); + Serial.println(" %"); + Serial.println(""); + } else { + Serial.println("- Temperature sensor is disabled!"); + } +} + +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)); + + if (device.begin()) { + Serial.println("- Device is connected!"); + } else { + Serial.println("- Device could not be found. Please double check the wiring!"); + } +} + +void loop() { + // Read data from the HS4001 sensor + // Wait for 2.5 seconds before reading again + auto temperatureSensor = device.temperatureHumiditySensor(); + displaySensorData(temperatureSensor); + delay(2500); +} +``` + +Here is a detailed breakdown of the example sketch shown before and the `Arduino_NiclaSenseEnv` library API functions used in the sketch: + +- `temperatureHumiditySensor()`: Retrieves the temperature and humidity sensor object from the Nicla Sense Env. +- `sensor.enabled()`: Checks if the sensor is currently enabled. +- `sensor.temperature()`: Reads the current temperature value from the sensor. The reading is unavailable if the value is not a number (NaN). +- `sensor.humidity()`: Reads the current relative humidity value from the sensor. + +After uploading the example sketch to the host board, you should see the following output in the Arduino IDE's Serial Monitor: + +![Example sketch output in the Arduino IDE's Serial Monitor](assets/user-manual-14.png) + +You can download the example sketch [here](assets/nicla_sense_env_temp_humidity_example.zip). + +## Indoor Air Quality Sensor + +The Nicla Sense Env board features an onboard air quality sensor, the ZMOD4410 from Renesas. The ZMOD4410 is a highly integrated digital gas sensor module for indoor air quality monitoring. It provides measurements of total volatile organic compounds (TVOCs), estimates CO₂ levels, and monitors indoor air quality (IAQ), making it suitable for applications such as smart home devices, air purifiers, and HVAC systems. Its compact size, low power consumption, and high sensitivity make this sensor an excellent choice for various air quality monitoring applications. + +![The ZMOD4410 sensor of the Nicla Sense Env board](assets/user-manual-15.png) + +***Every ZMOD sensor is electrically and chemically calibrated during Renesas production. The calibration data is stored in the non-volatile memory (NVM) of the sensor module and is used by the firmware routines during sensor initialization. ZMOD sensors are qualified for a 10-year lifetime (following the JEDEC JESD47 standard) without the need for recalibration.*** + +The example sketch below demonstrates how to read air quality data from the ZMOD4410 sensor using the `Arduino_NiclaSenseEnv` library API. The sketch reports indoor air quality values to the Arduino IDE's Serial Monitor every 5 seconds. + +**Important**: The ZMOD4410 supports several operation modes, each with specific sample rates and warm-up requirements. For IAQ measurements, the sensor can take a sample every three seconds but requires 60 warm-up samples, meaning a total warm-up time of 3 minutes. In ultra-low-power mode, the sensor can take samples every 90 seconds but requires only 10 warm-up samples, meaning it takes 15 minutes to fully warm-up. + +```arduino +/** + Indoor Air Quality Sensor Example for Nicla Sense Env + Name: nicla_sense_env_indoor_air_quality_example.ino + Purpose: This sketch demonstrates how to read air quality data from the + ZMOD4410 sensor on the Nicla Sense Env using the Arduino_NiclaSenseEnv library API. + + @author Arduino Product Experience Team + @version 1.0 31/05/24 +*/ + +// Include the NiclaSenseEnv library +#include "NiclaSenseEnv.h" + +// Global device object for Nicla Sense Env +NiclaSenseEnv device; + +/** + Displays air quality data from the ZMOD4410 sensor. + @param sensor Reference to IndoorAirQualitySensor object controlling the sensor. +*/ +void displaySensorData(IndoorAirQualitySensor& sensor) { + if (sensor.enabled()) { + Serial.print("- Indoor air quality value: "); + Serial.println(sensor.airQuality()); + Serial.print("- CO2 (ppm): "); + Serial.println(sensor.CO2()); + Serial.print("- TVOC (mg/m3): "); + Serial.println(sensor.TVOC()); + Serial.print("- Ethanol (ppm): "); + Serial.println(sensor.ethanol()); + Serial.println(""); + } else { + Serial.println("- Indoor air quality sensor is disabled!"); + } +} + +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)); + + if (device.begin()) { + Serial.println("- Device is connected!"); + auto airQualitySensor = device.indoorAirQualitySensor(); + + // Set the sensor mode to indoor air quality + airQualitySensor.setMode(IndoorAirQualitySensorMode::indoorAirQuality); + + // The ZMOD4410 can take a sample every 3 seconds in IAQ mode and requires 60 warm-up samples, + // meaning the sensor will take about 3 minutes to fully warm-up before accurate readings can + // be obtained. In this example, we allow 5 seconds for the sensor to start delivering data. + delay(5000); + } else { + Serial.println("- Device could not be found. Please double-check the wiring!"); + } +} + +void loop() { + // Read data from the ZMOD4410 sensor every 5 seconds + auto airQualitySensor = device.indoorAirQualitySensor(); + displaySensorData(airQualitySensor); + delay(5000); +} +``` + +Here is a detailed breakdown of the example sketch shown before and the `Arduino_NiclaSenseEnv` library API functions used in the sketch: + +- `indoorAirQualitySensor()`: Retrieves the air quality sensor object from the Nicla Sense Env. +- `sensor.enabled()`: Checks if the sensor is currently enabled. +- `sensor.airQuality()`: Reads the current air quality value from the sensor. +- `sensor.CO2()`: Reads the estimated CO₂ concentration from the sensor. +- `sensor.TVOC()`: Reads the sensor's total concentration of volatile organic compounds. +- `sensor.ethanol()`: Reads the ethanol concentration from the sensor. + +After uploading the example sketch to the host board, you should see the following output in the Arduino IDE's Serial Monitor: + +![Example sketch output in the Arduino IDE's Serial Monitor](assets/user-manual-16.png) + +You can download the example sketch [here](assets/nicla_sense_env_indoor_air_quality_example.zip). + +## Outdoor Air Quality Sensor + +The Nicla Sense Env board features an onboard outdoor air quality sensor, the ZMOD4510 from Renesas. The ZMOD4510 is a digital gas sensor module for outdoor air quality monitoring. It measures nitrogen dioxide (NO₂) and ozone (O₃) levels. It calculates an outdoor air quality index (AQI), making it suitable for air quality monitoring stations, wearable devices, and smart city infrastructure applications. Its robustness, low power consumption, and high sensitivity make this sensor an excellent choice for outdoor air quality monitoring applications. + +![The ZMOD4510 sensor of the Nicla Sense Env board](assets/user-manual-17.png) + +***Every ZMOD sensor is electrically and chemically calibrated during Renesas production. The calibration data is stored in the non-volatile memory (NVM) of the sensor module and is used by the firmware routines during sensor initialization. ZMOD sensors are qualified for a 10-year lifetime (following the JEDEC JESD47 standard) without the need for recalibration.*** + +The example sketch below demonstrates how to read air quality data from the ZMOD4510 sensor using the `Arduino_NiclaSenseEnv` library API. The sketch reports outdoor air quality values to the Arduino IDE's Serial Monitor every 5 seconds. + +**Important**: The ZMOD4510 supports several operation modes, each with specific sample rates and warm-up requirements. For NO₂/O₃ measurements, the sensor can take a sample every 6 seconds but requires 50 warm-up samples, meaning a total warm-up time of 5 minutes. In ultra-low-power O₃ mode, the sensor can take samples every two seconds, but it requires 900 warm-up samples before it is fully operational, meaning it takes 30 minutes to warm-up completely. + +```arduino +/** + Outdoor Air Quality Sensor Example for Nicla Sense Env + Name: nicla_sense_env_outdoor_air_quality_example.ino + Purpose: This sketch demonstrates how to read air quality data from the + ZMOD4510 sensor on the Nicla Sense Env using the Arduino_NiclaSenseEnv library API. + + @author Arduino Product Experience Team + @version 1.0 31/05/24 +*/ + +// Include the NiclaSenseEnv library +#include "NiclaSenseEnv.h" + +// Global device object for Nicla Sense Env +NiclaSenseEnv device; + +/** + Displays air quality data from the ZMOD4510 sensor. + @param sensor Reference to OutdoorAirQualitySensor object controlling the sensor. +*/ +void displaySensorData(OutdoorAirQualitySensor& sensor) { + if (sensor.enabled()) { + Serial.print("- Outdoor air quality value: "); + Serial.println(sensor.airQualityIndex()); + Serial.print("- NO2 (ppb): "); + Serial.println(sensor.NO2()); + Serial.print("- O3 (ppb): "); + Serial.println(sensor.O3()); + Serial.println(""); + } else { + Serial.println("- Outdoor air quality sensor is disabled!"); + } +} + +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)); + + if (device.begin()) { + Serial.println("- Device is connected!"); + auto outdoorAirQualitySensor = device.outdoorAirQualitySensor(); + + // Enable the outdoor air quality sensor + outdoorAirQualitySensor.setMode(OutdoorAirQualitySensorMode::outdoorAirQuality); + outdoorAirQualitySensor.setEnabled(true); + + // The ZMOD4510 takes a sample every 6 seconds in NO2/O3 mode and requires 50 warm-up samples, + // meaning the sensor will take about 5 minutes to fully warm-up before accurate readings + // can be obtained. In this example, we allow 6 seconds for the sensor to start delivering data. + delay(6000); + } else { + Serial.println("- Device could not be found. Please double-check the wiring!"); + } +} + +void loop() { + // Read data from the ZMOD4510 sensor every 5 seconds + auto outdoorAirQualitySensor = device.outdoorAirQualitySensor(); + displaySensorData(outdoorAirQualitySensor); + delay(6000); +} +``` + +Here is a detailed breakdown of the example sketch shown before and the `Arduino_NiclaSenseEnv` library API functions used in the sketch: + +- `outdoorAirQualitySensor()`: Retrieves the outdoor air quality sensor object from the Nicla Sense Env. +- `sensor.enabled()`: Checks if the sensor is currently enabled. +- `sensor.airQualityIndex()`: Reads the current outdoor air quality index value. +- `sensor.NO2()`: Reads the nitrogen dioxide concentration from the sensor. +- `sensor.O3()`: Reads the ozone concentration from the sensor. + +After uploading the example sketch to the host board, you should see the following output in the Arduino IDE's Serial Monitor: + +![Example sketch output in the Arduino IDE's Serial Monitor](assets/user-manual-18.png) + +You can download the example sketch [here](assets/nicla_sense_env_outdoor_air_quality_example.zip). + +## Communication + +The Nicla Sense Env board features a UART interface for data logging purposes. This allows the board to output sensor data in `CSV` format over UART, enabling easy data logging and monitoring in various applications. The UART interface is handy for scenarios where the board needs to communicate with other microcontrollers or systems without relying on USB connections. + +The example sketch below demonstrates how to read data from the UART port on the Nicla Sense Env board. The sketch assumes the Nicla Sense Env is powered through the board's `VCC` pin or the ESLOV connector of a host board and connected to another board through the UART pins. The example also requires enabling the UART output on the Nicla Sense Env. + +```arduino +/** + UART Communication Example for Nicla Sense Env + Name: nicla_sense_env_uart_communication_example.ino + Purpose: This sketch demonstrates how to read data from the UART port on the Nicla Sense Env board + and process the data in CSV format for logging and monitoring purposes. + + @author Sebastián Romero, modified by the Arduino Product Experience Team + @version 1.0 31/05/24 +*/ + +// Include necessary libraries +#include +#include +#include + +// Define the default delimiter for CSV +constexpr char DEFAULT_DELIMITER = ','; + +// Define a mapping of CSV fields +std::map> csvFieldMapping = { + {0, {"HS4001 sample counter", "uint32"}}, + {1, {"HS4001 temperature (degC)", "float"}}, + {2, {"HS4001 humidity (%RH)", "float"}}, + {3, {"ZMOD4510 status", "uint8"}}, + {4, {"ZMOD4510 sample counter", "uint32"}}, + {5, {"ZMOD4510 EPA AQI", "uint16"}}, + {6, {"ZMOD4510 Fast AQI", "uint16"}}, + {7, {"ZMOD4510 O3 (ppb)", "float"}}, + {8, {"ZMOD4510 NO2 (ppb)", "float"}}, + {9, {"ZMOD4510 Rmox[0]", "float"}}, + // ... more fields as needed ... +}; + +// Define a map to store parsed values +std::map parsedValuesMap; + +/** + Converts a string to a float, handling exponents + @param str The string to convert + @return The float value +*/ +float parseFloatWithExponent(const String &str) { + double value = str.toDouble(); + return static_cast(value); +} + +/** + Processes a CSV line and maps the fields to their corresponding names + @param data The CSV line as a string + @param delimiter The character used to separate fields in the CSV line + @param targetMap The map to store parsed values +*/ +void processCSVLine(String data, char delimiter, std::map &targetMap) { + if (data.startsWith("INFO:") || data.startsWith("WARNING:")) { + return; + } + + if (data.startsWith("ERROR:")) { + Serial.println(data); + return; + } + + std::vector fields; + size_t pos = 0; + while ((pos = data.indexOf(delimiter)) != -1) { + fields.push_back(data.substring(0, pos)); + data = data.substring(pos + 1); + } + fields.push_back(data); // Last field + + for (size_t i = 0; i < fields.size(); ++i) { + auto [name, type] = csvFieldMapping[i]; + String fieldValue = fields[i]; + + if (fieldValue == "") { + continue; + } + + if (type == "float") { + float floatValue = parseFloatWithExponent(fieldValue); + targetMap[name] = String(floatValue); + } else { + targetMap[name] = fieldValue; + } + } +} + +void setup(){ + Serial.begin(115200); + Serial1.begin(38400, SERIAL_8N1); + + while (!Serial || !Serial1) { + delay(100); + } + + Serial.println("Serial ports initialized"); +} + +void loop() { + if (!Serial1.available()) { + delay(100); + return; + } + + String csvLine = Serial1.readStringUntil('\n'); + processCSVLine(csvLine, DEFAULT_DELIMITER, parsedValuesMap); + + if (parsedValuesMap.empty()) { + Serial.println("No data to parse."); + return; + } + + for (const auto &entry : parsedValuesMap) { + Serial.print(entry.first + ": "); + Serial.println(entry.second); + } + + Serial.println(); + parsedValuesMap.clear(); +} +``` + +Here is a detailed breakdown of the example sketch shown before and the main functionalities of the UART communication on the Nicla Sense Env: + +- First, the Nicla Sense Env needs to have its UART output enabled. This can be done by connecting to the board over I²C to a host board and running `device.begin()` and `device.setUARTCSVOutputEnabled(true, true)`. +- `Serial1.begin(38400, SERIAL_8N1)`: Initializes the `Serial1` port for UART communication with the specified baud rate and configuration. +- `processCSVLine()`: A function that processes a CSV line, maps the fields to their corresponding names and stores them in a map for easy access. +- The `loop()` function reads data from the UART port, processes the CSV data, and prints the parsed values to the Serial Monitor. + +You can download the example sketch [here](assets/nicla_sense_env_uart_communication_example.zip). + +## Support + +If you encounter any issues or have questions while working with your Nicla Sense Env 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 Nicla family boards. The Help Center is designed to provide in-depth technical assistance and help you make the most of your device. + +- [Nicla family help center page](https://support.arduino.cc/hc/en-us/sections/4410176504978-Nicla-Family) + +### Forum + +Join our community forum to connect with other Nicla 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 Nicla Sense Env. + +- [Nicla Sense Env category in the Arduino Forum](https://forum.arduino.cc/c/hardware/nicla-family/nicla-family/169) + +### 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 Nicla family boards. + - [Contact us page](https://www.arduino.cc/en/contact-us/) \ No newline at end of file diff --git a/content/hardware/06.nicla/boards/nicla-vision/tech-specs.yml b/content/hardware/06.nicla/boards/nicla-vision/tech-specs.yml index 18bc511935..9727fc5a09 100644 --- a/content/hardware/06.nicla/boards/nicla-vision/tech-specs.yml +++ b/content/hardware/06.nicla/boards/nicla-vision/tech-specs.yml @@ -1,7 +1,7 @@ Board: Name: Arduino® Nicla Vision SKU: ABX00051 -Microcontroller: STM32H757AII6 Dual Arm® Cortex® M7/M4 +Microcontroller: STM32H747AII6 Dual Arm® Cortex® M7/M4 USB connector: Micro USB (USB-B) Pins: LED built-in: 1 RGB LED (I2C) diff --git a/content/hardware/06.nicla/boards/nicla-voice/tutorials/user-manual/assets/serial-g722.png b/content/hardware/06.nicla/boards/nicla-voice/tutorials/user-manual/assets/serial-g722.png new file mode 100644 index 0000000000..484b2b6b58 Binary files /dev/null and b/content/hardware/06.nicla/boards/nicla-voice/tutorials/user-manual/assets/serial-g722.png differ diff --git a/content/hardware/06.nicla/boards/nicla-voice/tutorials/user-manual/content.md b/content/hardware/06.nicla/boards/nicla-voice/tutorials/user-manual/content.md index 5b58ebba87..8bd234b2c5 100644 --- a/content/hardware/06.nicla/boards/nicla-voice/tutorials/user-manual/content.md +++ b/content/hardware/06.nicla/boards/nicla-voice/tutorials/user-manual/content.md @@ -441,26 +441,26 @@ The example code shown below captures audio from the onboard microphone of the N Keep in mind that this example code requires the following libraries: - [arduino-libg722](https://github.com/pschatzmann/arduino-libg722) -- [arduino-audio-tools](https://github.com/pschatzmann/arduino-audio-tools) +- [arduino-audio-tools __v0.9.6__](https://github.com/pschatzmann/arduino-audio-tools/releases/tag/v0.9.6) -***If you encounter compilation or build errors with the `Record_and_stream` example, please try using the [`arduino-audio-tools` library version __0.9.6__](https://github.com/pschatzmann/arduino-audio-tools/releases/tag/v0.9.6).*** +***__Important:__ This code requires `arduino-audio-tools` version __v0.9.6__ to compile.*** -Make sure to install these libraries in the Arduino IDE before uploading the code to your Nicla Voice board. +Make sure that you have updated the NDP120 firmware. See the steps [here](#ndp120-processor-firmware-update). ```arduino // Include necessary libraries for the Nicla Voice board, audio processing, and G722 codec support #include "Arduino.h" #include "NDP.h" + +#undef abs +#define USE_INT24_FROM_INT #include "AudioTools.h" #include "AudioCodecs/CodecG722.h" -// Create an instance of the G722Encoder class for handling audio encoding G722Encoder encoder; -// Declare a buffer to temporarily store audio data uint8_t data[2048]; -// Define a function to turn on the green LED for a short duration as an event indicator void ledGreenOn() { nicla::leds.begin(); nicla::leds.setColor(green); @@ -470,49 +470,37 @@ void ledGreenOn() { } void setup() { - // Start UART communication at 115200 baud - Serial.begin(115200); - // Initialize the Nicla Voice board, disable the LDO + Serial.begin(115200); nicla::begin(); nicla::disableLDO(); - - // Initialize the built-in RGB LED, set up as an event indicator nicla::leds.begin(); + NDP.onEvent(ledGreenOn); - // Set up the G722 encoder (1 channel, 16 kHz sample rate) AudioBaseInfo bi; bi.channels = 1; bi.sample_rate = 16000; + encoder.setOptions(0); encoder.begin(bi); - // Set the output stream for the encoder to the serial port encoder.setOutputStream(Serial); - // Load the required firmware packages for the NDP processor, turn on the onboard microphone NDP.begin("mcu_fw_120_v91.synpkg"); NDP.load("dsp_firmware_v91.synpkg"); NDP.load("alexa_334_NDP120_B0_v11_v91.synpkg"); NDP.turnOnMicrophone(); - - // Check the audio chunk size to ensure it doesn't exceed the buffer size int chunk_size = NDP.getAudioChunkSize(); if (chunk_size >= sizeof(data)) { for(;;); } } -// Continuously read audio data from the microphone, encode it using the G722 codec, send it to the serial port void loop() { - // Declare a variable to store the length of the extracted audio data unsigned int len = 0; - // Extract audio data from the NDP and store it in the data buffer NDP.extractData(data, &len); - - // Pass the extracted audio data to the G722 encoder and send it to the serial port encoder.write(data, len); } ``` @@ -541,17 +529,57 @@ In the `loop()` function: - The length of the extracted audio data is stored in the `len` variable. - The extracted audio data is passed to the G722 encoder, which compresses the audio and sends it to the serial port. -To extract the audio data on a **Linux computer**, you will need to set up the serial port as raw: +#### Linux Workflow + +To extract the audio data on a **Linux computer**, follow the steps below: + +- Set up the serial port as raw: ```bash stty -F /dev/ttyACM0 115200 raw ``` -Dump the data to a file (e.g., test.g722): +- Dump the data to a file (e.g., test.g722): ```bash cat /dev/ttyACM0 > test.g722 ``` -Then, you can open the file with a software like [Audacity](https://www.audacityteam.org/) to play back the audio. +- Install **ffmpeg** with `sudo apt install ffmpeg` to convert the `.g722` file to `.wav`: + +```bash +ffmpeg -f g722 -i test.g722 -ar 16000 test.wav +``` +Then you can open the `.wav` file with software like [Audacity](https://www.audacityteam.org/) to play it back. + + +#### Windows Workflow + +To extract the audio data on a **Windows computer**, follow the steps below: + +Download **PuTTY** for free [here](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html), install it and open it. + +1. Select "Serial" as the connection type + +2. Enter the serial port where your board is connected +3. Set the baud rate to `115200` +4. In the left menu, navigate to "Logging" +5. Select "All session output" +6. Define the directory to save the recorded file `.g722` +7. Click on "Open" to start recording audio + +![PuTTY steps](assets/serial-g722.png) + +- To stop recording, simply close the terminal window +- Navigate to your `.g722` file directory, and now it is time to convert it to `.wav` +- Download **FFmpeg** for Windows [here](https://www.gyan.dev/ffmpeg/builds/) +- From the Command Prompt (CMD), navigate to the download directory to use it, or add it to your system PATH +- Run the following command to convert the `.g722` file into `.wav` + + ```bash + ffmpeg -f g722 -i \test.g722 -ar 16000 test.wav + ``` +Then, you can open the `.wav` file with software like [Audacity](https://www.audacityteam.org/) or any media player to play back the audio. + + #### Machine Learning and Audio Analysis diff --git a/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-CERT_CE_IC.pdf b/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-CERT_CE_IC.pdf new file mode 100644 index 0000000000..33e4fc7468 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-CERT_CE_IC.pdf differ diff --git a/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-CERT_CE_RED.pdf b/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-CERT_CE_RED.pdf new file mode 100644 index 0000000000..7931950640 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-CERT_CE_RED.pdf differ diff --git a/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-CERT_FCC_DSS.pdf b/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-CERT_FCC_DSS.pdf new file mode 100644 index 0000000000..dd612308bf Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-CERT_FCC_DSS.pdf differ diff --git a/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-CERT_FCC_DTS.pdf b/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-CERT_FCC_DTS.pdf new file mode 100644 index 0000000000..c5ff483e5a Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-CERT_FCC_DTS.pdf differ diff --git a/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-CERT_MIC.pdf b/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-CERT_MIC.pdf new file mode 100644 index 0000000000..63366e407b Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-CERT_MIC.pdf differ diff --git a/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-CERT_RoHS.pdf b/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-CERT_RoHS.pdf new file mode 100644 index 0000000000..71cee580f1 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-CERT_RoHS.pdf differ diff --git a/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-CERT_UKCA.pdf b/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-CERT_UKCA.pdf new file mode 100644 index 0000000000..fee127f08d Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-CERT_UKCA.pdf differ diff --git a/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-DoC_CE.pdf b/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-DoC_CE.pdf new file mode 100644 index 0000000000..97ea0d696a Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-DoC_CE.pdf differ diff --git a/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-DoC_FCC.pdf b/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-DoC_FCC.pdf new file mode 100644 index 0000000000..ba2d61485b Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-DoC_FCC.pdf differ diff --git a/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-DoC_UKCA.pdf b/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-DoC_UKCA.pdf new file mode 100644 index 0000000000..e39353fb3f Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/certifications/Arduino_TPX00227-DoC_UKCA.pdf differ diff --git a/content/hardware/09.kits/maker/nesso-n1/compatibility.yml b/content/hardware/09.kits/maker/nesso-n1/compatibility.yml new file mode 100644 index 0000000000..f7e3920efd --- /dev/null +++ b/content/hardware/09.kits/maker/nesso-n1/compatibility.yml @@ -0,0 +1,18 @@ +software: + - arduino-ide + - arduino-cli + - cloud-editor +hardware: + boards: ~ + carriers: ~ + shields: ~ + accessories: + - modulino-buttons + - modulino-buzzer + - modulino-distance + - modulino-knob + - modulino-movement + - modulino-pixels + - modulino-thermo + + diff --git a/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/TPX00227-pinout.png b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/TPX00227-pinout.png new file mode 100644 index 0000000000..e631bd7f71 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/TPX00227-pinout.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/featured.png b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/featured.png new file mode 100644 index 0000000000..41a14eee33 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/featured.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/n1_display.png b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/n1_display.png new file mode 100644 index 0000000000..ea31dbc4a8 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/n1_display.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/n1_grove_qwiic.png b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/n1_grove_qwiic.png new file mode 100644 index 0000000000..19c57aa7b9 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/n1_grove_qwiic.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/n1_hat.png b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/n1_hat.png new file mode 100644 index 0000000000..56b70183be Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/n1_hat.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/n1_lora_antenna.png b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/n1_lora_antenna.png new file mode 100644 index 0000000000..4a21e124ab Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/n1_lora_antenna.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/n1_overview.png b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/n1_overview.png new file mode 100644 index 0000000000..a3f24861ff Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/n1_overview.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/n1_power_options.png b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/n1_power_options.png new file mode 100644 index 0000000000..6ca7839ea1 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/n1_power_options.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/n1_ui.png b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/n1_ui.png new file mode 100644 index 0000000000..79e75438f3 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/n1_ui.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/nesso_n1_antenna_md.svg b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/nesso_n1_antenna_md.svg new file mode 100644 index 0000000000..2943277c2e --- /dev/null +++ b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/nesso_n1_antenna_md.svg @@ -0,0 +1,3731 @@ + + + FreeCAD SVG Export + Drawing page: Page exported from FreeCAD document: n1_antenna_woStorage + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3.66 mm + + + + + + + + + + + + 0.96 mm + + + + + + + + + + + + 45.5 mm + + + + + + + + + + + + 4.87 mm + + + + + + + + + + + + 9.61 mm + + + + + + + + + + + + 1.02 mm + + + + + + + + + + + + 3x R3 mm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.2 mm + + + + + + + + + + + + 4.8 mm + + + + + + + + + + + + 2.95 mm + + + + + + + + + + + + 3.78 mm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10.8 mm + + + + + + + + + + + + 1 mm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 mm x 45° + + + + + + + diff --git a/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/nesso_n1_block_diagram.png b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/nesso_n1_block_diagram.png new file mode 100644 index 0000000000..f988b8535e Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/nesso_n1_block_diagram.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/nesso_n1_deviceStorage_md.svg b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/nesso_n1_deviceStorage_md.svg new file mode 100644 index 0000000000..f16e7dda3a --- /dev/null +++ b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/nesso_n1_deviceStorage_md.svg @@ -0,0 +1,4217 @@ + + + FreeCAD SVG Export + Drawing page: Page exported from FreeCAD document: n1_converted + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 6.39 mm + + + + + + + + + + + + 10 mm + + + + + + + + + + + + 29.28 mm + + + + + + + + + + + + 2x R1.15 mm + + + + + + + + + 4.85 mm + + + + + + + + + + + + 7 mm + + + + + + + + + + + + 4.47 mm + + + + + + + + + + + + 4x R3 mm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 48 mm + + + + + + + + + + + + 21.1 mm + + + + + + + + + + + + 7.1 mm + + + + + + + + + + + + 0.9 mm + + + + + + + + + + + + 1.8 mm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 24 mm + + + + + + + + + + + + 11.3 mm + + + + + + + + + + + + 0.9 mm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/nesso_n1_device_md.svg b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/nesso_n1_device_md.svg new file mode 100644 index 0000000000..b8ed8aa695 --- /dev/null +++ b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/nesso_n1_device_md.svg @@ -0,0 +1,4577 @@ + + + FreeCAD SVG Export + Drawing page: Page exported from FreeCAD document: n1_device + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 29.28 mm + + + + + + + + + + + + 4.85 mm + + + + + + + + + + + + 6.39 mm + + + + + + + + + + + + 10 mm + + + + + + + + + + + + 4x R3 mm + + + + + + + + + 7 mm + + + + + + + + + + + + 4.47 mm + + + + + + + + + + + + 2x R1.15 mm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 14 mm + + + + + + + + + + + + 1.8 mm + + + + + + + + + + + + 0.9 mm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 24 mm + + + + + + + + + + + + 11.3 mm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 48 mm + + + + + + + + + + + + 2x + + 2 mm + + + + + + + + + + + + + 12.2 mm + + + + + + + + + + + + 24 mm + + + + + + + + + + + + 3 mm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 mm x 45° + + + + + + + diff --git a/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/nesso_n1_power_tree.png b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/nesso_n1_power_tree.png new file mode 100644 index 0000000000..51051ad910 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/datasheet/assets/nesso_n1_power_tree.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/datasheet/datasheet.md b/content/hardware/09.kits/maker/nesso-n1/datasheet/datasheet.md new file mode 100644 index 0000000000..5c3fe8a683 --- /dev/null +++ b/content/hardware/09.kits/maker/nesso-n1/datasheet/datasheet.md @@ -0,0 +1,516 @@ +--- +identifier: TPX00227 +title: Arduino® Nesso N1 +type: maker +--- + +![Arduino Nesso N1](assets/featured.png) + +# Description + +

Arduino® Nesso N1 (hereafter Nesso N1) is a compact, all-in-one IoT development kit powered by the ESP32-C6 microcontroller, a single-core 32-bit RISC-V CPU running at up to 160 MHz. Designed for remote monitoring and automation applications, Nesso N1 combines multiple wireless protocols, such as Wi-Fi® 6, Bluetooth® 5.3, Thread®, and LoRa® into a sleek, portable form factor with an integrated 1.14" touch display and rechargeable 250 mAh battery. Built-in sensors include a 6-axis IMU, passive buzzer, and infrared transmitter, with expansion capabilities through Grove, Qwiic, and M5StickC HAT-compatible connectors.

+ +

Nesso N1 can be programmed using Arduino IDE, MicroPython, or UIFlow* (2.0), and integrates seamlessly with Arduino Cloud for remote device management and data visualization. With comprehensive documentation, ready-to-use examples, and compatibility with Arduino Modulino® nodes and third-party accessories, Nesso N1 accelerates the development of connected devices for smart homes, industrial automation, and environmental monitoring.

+ +
+ * UIFlow v2.0 Support: UIFlow support is not yet available. Support will be available by the end of Q4 2025. +
+ +# Target Areas + +Smart home automation, remote monitoring, Industrial IoT (IIoT), environmental sensing, wearables, prototyping, STEM + +
+ +# CONTENTS + +## Application Examples + +

Nesso N1 combines multi-protocol wireless connectivity (Wi-Fi® 6, Bluetooth® 5.3, Thread, LoRa®) with integrated sensors, a touch display, and battery operation, making it a versatile platform for IoT applications. Alongside expansion via Grove, Qwiic, and HAT connectors, it supports Arduino Modulino® nodes and third-party Qwiic, Grove, and M5StickC HAT accessories for diverse connected device projects.

+ +**Smart Home Hub:** Central control hub for smart home devices, integrating with platforms like Home Assistant via Wi-Fi®, Thread, or LoRa® connectivity. + +- **IR to IoT Gateway:** Transforms traditional infrared remote-controlled devices (TVs, air conditioners, fans) into smart, connected appliances controllable via Wi-Fi® or cloud platforms. + +- **Environmental Monitoring:** Remote weather stations and sensor nodes monitoring temperature, humidity, and air quality with external sensors, logging data to Arduino Cloud via LoRa®. + +- **Industrial IoT Edge Node:** Aggregates sensor data from factory equipment using multiple wireless protocols, transmitting real-time machine status and predictive maintenance alerts to cloud platforms. + +- **Asset Tracking:** Monitors equipment location and status in warehouses, construction sites, or logistics operations using integrated IMU and wireless connectivity. + +- **Agriculture Monitoring:** Connects soil moisture, weather, and irrigation sensors via LoRa® or Thread to optimize resource usage in precision agriculture applications. + +- **Education and Prototyping:** Hands-on learning platform for IoT protocols (Wi-Fi® 6, Bluetooth® 5.3, Thread, LoRa®) and rapid development of connected device proof-of-concepts with pre-configured hardware. + +- **Home Automation:** Custom automation systems including automated lighting, security systems, and environmental controls when combined with Modulino nodes or Grove sensors. + +
+ +## Features + +### General Specifications Overview + +![Nesso N1](assets/n1_overview.png) + +#### Processing and Memory + +| **Component** | **Details** | +|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Microcontroller | - ESP32-C6 RISC-V 32-bit single-core CPU @ 160 MHz
- Wi-Fi® 6 (802.11ax), Bluetooth® 5.3, 802.15.4 (Thread/Zigbee®)
- 16 MB external Flash (GD25Q128/W25Q128) | +| System Memory | - 1536 kB on-chip Flash
- 512 kB on-chip SRAM
- 16 MB external Flash for application storage | + +#### Connectivity and Wireless + +| **Component** | **Details** | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Wireless (ESP32-C6) | - 2.4 GHz Wi-Fi® 6 (802.11ax)
- Bluetooth® 5.3 LE
- 802.15.4 Thread/Zigbee®
- Dedicated FPC antenna | +| LoRa® Module | - SX1262 transceiver (850-960 MHz)
- Detachable external IPEX4 antenna
- FM8625H LNA for receive path
- SGM13005L4 amplifier for transmit path
- Antenna storage within enclosure | +| USB Interface | - USB-C connector
- 5V DC input for charging and programming
- USB 3.0 data interface | + +#### Display and User Interface + +| **Component** | **Details** | +|------------------|-------------------------------------------------------------------------------------------------------------------------| +| Display | - 1.14" IPS LCD
- ST7789P3 driver @ SPI communication
- Resolution: 135 × 240 pixels
- 262K colors (18-bit) | +| Touch Controller | - FT6336U capacitive touch controller
- I²C communication | +| User Buttons | - 2× programmable buttons (KEY1, KEY2)
- 1× power button (long-press reset function) | +| LEDs | - 1× green user programmable LED
- 1× blue power/status LED | +| Audio Feedback | - Passive buzzer (4 kHz)
- GPIO-controlled | +| Infrared | - IR LED transmitter
- Remote control and signal transmission capability | + +#### Sensors and Expansion + +| **Component** | **Details** | +|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------| +| IMU Sensor | - BMI270 6-axis IMU
- 3-axis accelerometer + 3-axis gyroscope
- I²C communication
- Motion and orientation detection | +| Expansion Ports | - Grove connector (HY2.0-4P): I²C, GPIO, power
- Qwiic connector (PH1.0-4P): I²C interface
- 8-pin HAT port: M5StickC HAT-compatible (GPIO, ADC, power) | + +#### Power System + +| **Component** | **Details** | +|--------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Battery | - 250 mAh lithium polymer battery (3.7 - 4.2 V)
- Integrated within enclosure | +| Power Management | - AW32001ECSR charge controller with power path management
- BQ27220YZFR battery fuel gauge (real-time capacity, voltage, current monitoring)
- Over-current and over-voltage protection | +| Voltage Regulation | - JW5712 DC-DC buck converter (battery to 3.3V system rail)
- SGM6603 boost converter (3.3V to 5V output for peripherals) | +| Input Voltage | - USB-C®: 5V DC input
- Battery nominal: 3.7 V (3.7 - 4.2 V range) | + +### Related Products + +- Arduino Modulino® Family +- Grove sensors and actuators (I²C, GPIO) +- Qwiic ecosystem modules +- M5StickC HAT accessories +- LoRa® antennas (850-960 MHz, IPEX4 connector) + +
+ +## Ratings + +### Input Power + +![Nesso N1 - Power Options](assets/n1_power_options.png) + +| **Source** | **Voltage Range** | **Maximum Current** | **Connector** | +|----------------|------------------:|--------------------:|------------------| +| USB-C® | 5 V | up to 1 A | USB-C® connector | +| Battery (LiPo) | 3.7 - 4.2 V | 250 mAh | Internal | + +

Nesso N1 is powered via a USB-C® connector accepting 5 V DC input for charging and operation, or through the integrated 250 mAh lithium polymer battery. The AW32001 power management IC handles charge control and power path management, allowing simultaneous charging and operation. Use a USB power source rated for at least 5 V at 1 A to ensure proper charging and operation during peak power consumption (e.g., Wi-Fi® transmission, display backlight at maximum, LoRa® transmission).

+ +Two main power functions are performed as follows: + +-

Battery charging: The AW32001 provides intelligent charge management with over-current and over-voltage protection. Charge current is automatically regulated based on input power availability and battery state.

+ +-

Battery monitoring: The BQ27220 fuel gauge continuously monitors battery voltage, current, and remaining capacity. Battery status data is accessible via I²C interface for real-time reporting.

+ +### Recommended Operating Conditions + +Use the limits below to define the operating environment, thermal margins, and power source specifications: + +| **Parameter** | **Symbol** | **Minimum** | **Typical** | **Maximum** | **Unit** | +|-----------------------|-----------------|:-----------:|:-----------:|:-----------:|:--------:| +| USB-C® input | `V_USB` | 4.75 | 5.0 | 5.25 | V | +| Battery voltage | `V_BAT` | 3.0 | 3.7 | 4.2 | V | +| 3.3V system rail | `V_SYS` | 3.1 | 3.3 | 3.5 | V | +| Operating temperature | `T_OP` | 0 | - | 40 | °C | + +
+

Operating Conditions: Minimum values represent the lowest continuous operating point. Brief drops below these levels may cause a brownout or reset. Typical represents nominal design conditions. Maximum must not be exceeded to prevent damage. For battery voltage, 3.0 V represents the low-battery cutoff threshold, and 4.2 V is the fully charged state. The operating temperature range refers to the ambient air temperature near the device.

+
+ +### On-Board Voltage Rails + +| **Voltage** | **Rail** | **Origin / Regulator** | +|------------:|--------------|-----------------------------------------------------------------------| +| 5.0 V | `V_USB` | USB-C® input | +| 3.7 - 4.2 V | `V_BAT` | Internal lithium polymer battery | +| 3.3 V | `SYS_3.3V` | JW5712 buck converter from battery (main system rail) | +| 5.0 V | `INT_5VOUT` | SGM6603 boost converter from 3.3V rail (for peripherals requiring 5V) | + +
+ +## Functional Overview + +### Pinout + +![Nesso N1 Pinout - Simplified Version](assets/TPX00227-pinout.png) + +### Block Diagram + +![Nesso N1 Block Diagram](assets/nesso_n1_block_diagram.png) + +
+ +### Power Supply + +

Nesso N1 uses a power management architecture optimized for battery-powered IoT applications. The system takes 5 V DC input via the USB-C® connector, which provides the AW32001ECSR power management IC. This IC manages charge control for the 250 mAh lithium polymer battery (3.7 - 4.2 V nominal) and provides power path management, allowing simultaneous charging and operation.

+ +

The JW5712 DC-DC buck converter steps down the battery voltage to generate the main 3.3 V system rail (SYS_3.3V), which powers the ESP32-C6 microcontroller, sensors, display controller, and most system peripherals. For peripherals requiring 5 V operation (such as certain HAT accessories), the SGM6603 boost converter steps up the 3.3 V rail to provide a regulated 5V output (INT_5VOUT).

+ +

The BQ27220YZFR fuel gauge IC continuously monitors battery voltage, current, and state of charge through dedicated sense connections to the battery. Real-time battery status information is accessible via the I²C interface. The system includes comprehensive protection circuitry against over-current, over-voltage, and reverse polarity conditions.

+ +

When USB power is disconnected, the device operates entirely from battery power. The power management system automatically transitions between power sources without disrupting operations.

+ +![Nesso N1 Power Tree](assets/nesso_n1_power_tree.png) + +

The integrated 250 mAh lithium polymer battery (3.7 - 4.2 V nominal) provides portable operation for remote and mobile applications. The BQ27220 fuel gauge continuously monitors battery voltage, current, and remaining capacity in real-time, with status data accessible via I²C interface for integration into user applications. Typical runtime varies based on wireless activity (Wi-Fi®, Bluetooth®, LoRa® transmission frequency), display brightness settings, and connected peripheral power consumption.

+ +

To maximize battery life, leverage the ESP32-C6's deep sleep modes when inactive, reducing power consumption to minimal levels. Display backlight brightness can be reduced or disabled entirely when visual feedback is not required. Unused wireless radios (Wi-Fi®, Bluetooth®, or LoRa®) should be disabled to conserve power.

+ +

The BMI270 IMU's interrupt outputs enable motion-triggered wake-up, allowing the system to remain in low-power mode until physical movement is detected. For LoRa® applications, Class A operation provides the lowest power consumption profile, which is ideal for battery-powered sensor nodes with infrequent uplink transmissions.

+ +**Power Button Behavior:** +- **Single press:** Turns on the device if powered down or resets if done while operating +- **Double press:** Turns off the device +- **Long press:** Enters Download/Bootloader mode while operating + +
+ +## UI & Indicators + +![Nesso N1 - UI & Indicators](assets/n1_ui.png) + +- **Green User LED (LED1):** Programmable user LED controlled by ESP32-C6 GPIO. Available for custom application feedback and status indication. + +- **Blue Power LED (LED3):** Indicates power status. Illuminated when the device is powered on (tied to VBUS rail via current-limiting resistor). + +- **Programmable Buttons:** + - **KEY1 (S1):** User-programmable button connected to I/O expander P0 + - **KEY2 (S2):** User-programmable button connected to I/O expander P1 + +- **Power Button (SW_PWR):** Controls device power state. Single-press turns on the device if powered down or resets if done while operating. Double-press turns off the device. + +- **Buzzer (BZ1):** 4 kHz passive buzzer driven by `GPIO11` through transistor driver circuit. Provides audio feedback for alarms, notifications, and user interactions. + +- **Infrared Transmitter (LED4):** IR LED driven by `GPIO9` through transistor driver circuit. Enables remote control of IR-compatible devices (TVs, air conditioners, etc.). + +## Microcontroller and Processing + +### ESP32-C6 Microcontroller + +

The ESP32-C6 is a single-core 32-bit RISC-V microcontroller running at up to 160 MHz, designed specifically for IoT applications requiring multiple wireless protocols. It integrates 2.4 GHz Wi-Fi® 6 (802.11ax), Bluetooth® 5.3 LE, and IEEE 802.15.4 (Thread/Zigbee®) radios on a single chip, reducing component count and system complexity.

+ +**Key specifications:** +- 32-bit RISC-V single-core processor @ 160 MHz maximum +- 1536 kB on-chip Flash, 512 kB on-chip SRAM +- 16 MB external Flash (GD25Q128 / W25Q128) via SPI interface for application storage +- Hardware cryptographic accelerators (AES, SHA, RSA) +- Low-power modes for battery-operated applications + +**Wireless capabilities:** +- **Wi-Fi® 6 (802.11ax):** 2.4 GHz band, supports target wake time (TWT) for power savings +- **Bluetooth® 5.3 LE:** Low energy mode for peripheral and beacon applications +- **802.15.4 (Thread/Zigbee®):** Mesh networking capability for smart home and industrial applications + +
+ Note: The Wi-Fi® and Bluetooth® connectivity uses a dedicated FPC antenna integrated into the device. Removing or modifying the FPC antenna may cause wireless connectivity to stop working. +
+ +**Peripheral interfaces:** +- Multiple GPIO pins with configurable functions +- I²C, SPI, UART communication interfaces +- PWM outputs for LED control, servo motors +- ADC inputs for analog sensor reading +- Touch sensor support on select GPIO + +
+ +### LoRa® Configuration + +

The SX1262 LoRa® transceiver provides long-range, low-power wireless connectivity in the 850–960 MHz frequency range. It connects to the ESP32-C6 via SPI interface and includes a dedicated low-noise amplifier (SGM13005L4) on the receive path and RF switch (FM8625H) for antenna path selection. The module supports both LoRa® and FSK modulation with a detachable IPEX4 antenna that can be stored within the device enclosure when not in use.

+ +| **Parameter** | **Specification** | +|---------------------|-----------------------------------------| +| Maximum TX power | +22 dBm | +| RX sensitivity | -147 dBm @ SF12 (low data rate mode) | +| Frequency range | 850-960 MHz (region-dependent) | +| Modulation | LoRa® and FSK | + +

To use the LoRa® module, connect the detachable antenna to the IPEX4 connector on the device. For compact storage when the antenna is not needed, it can be detached and inserted into the dedicated storage slot within the enclosure, maintaining the device's sleek form factor.

+ +![Nesso N1 - LoRa® Antenna](assets/n1_lora_antenna.png) + +
+ Important: Always attach the LoRa® antenna before transmitting. Operating the LoRa® transmitter without an antenna can damage the SX1262 module due to reflected RF power. +
+ +

The SX1262 operates in region-specific frequency bands: 868 MHz for Europe (863–870 MHz), 915 MHz for North America and Australia (902–928 MHz), and 923 MHz for Asia (920–925 MHz). Proper frequency configuration is required based on your deployment region to comply with local regulations.

+ +

For LoRa® network connectivity, configure the appropriate frequency, spreading factor (SF7–SF12), bandwidth, and coding rate based on your application requirements. Software libraries are available for configuring and using the LoRa® transceiver with the SX1262 module.

+ +### I/O Expansion + +

Two PI4IOE5V6408 I²C I/O expanders provide additional GPIO pins for the system. These devices operate on the shared I²C bus with configurable addresses, allowing control of a wider range of peripherals while keeping the ESP32-C6's native GPIO resources for other functions.

+ +

The first expander manages display control signals, status indicators, and power monitoring functions. The second expander handles user interface elements such as programmable buttons, manages LoRa® transceiver control signals, and provides GPIO for external expansion connectors. The I/O expanders also offer interrupt capability for event detection.

+ +
+ +## Peripherals + +### Grove Connector (J2) + +![Nesso N1 - Grove and Qwiic Connector](assets/n1_grove_qwiic.png) + +**Grove HY2.0-4P Connector** connects Grove ecosystem sensors and actuators with a custom pinout. + +| **Pin** | **Signal** | **Description** | +|--------:|------------|---------------------------------| +| 1 | GND | Ground | +| 2 | 5VOUT | 5 V output from boost converter | +| 3 | GROVE_IO_0 | GPIO 5 | +| 4 | GROVE_IO_1 | GPIO 4 | + +

The Grove connector provides both power (5V from boost converter) and signal connections. IO_0 and IO_1 are controlled through the GPIO 5 and 4, accessible via I²C commands. Use this connector for Grove modules requiring 5V operation or GPIO control.

+ +
+ Note: This connector uses a custom pinout that differs from standard Grove connectors. Verify pin compatibility before connecting standard Grove modules. +
+ +### Qwiic Connector (J3) + +**Qwiic PH1.0-4P Connector** provides standardized I²C connectivity for Qwiic/Stemma QT ecosystem modules and Arduino Modulino nodes. + +| **Pin** | **Signal** | **Description** | +|--------:|------------|------------------------------| +| 1 | GND | Ground | +| 2 | 3.3V | 3.3 V system power | +| 3 | SDA | I²C data (shared bus) | +| 4 | SCL | I²C clock (shared bus) | + +

The Qwiic connector shares the main I²C bus with internal peripherals (BMI270 IMU, BQ27220 fuel gauge, touch controller, I/O expander). I²C pull-up resistors are provided on the SDA and SCL lines. Maximum I²C bus speed is 400 kHz (Fast Mode).

+ +
+ I²C Bus Considerations: Multiple devices share the same I²C bus. Ensure connected modules use unique I²C addresses to avoid conflicts. The system I²C addresses include: BMI270 (0x68/0x69), BQ27220 (0x55), FT6336U (0x38), PI4IOE5V6408 (0x20/0x21 selectable). +
+ +### HAT Connector (J4) + +**8-Pin HAT Connector** compatible with M5StickC HAT accessory ecosystem. Provides GPIO, ADC, and power connections for stackable expansion modules. + +![Nesso N1 - HAT Connector](assets/n1_hat.png) + +| **Pin** | **Signal** | **Function** | +|--------:|------------|-----------------------------------------------------------| +| 1 | GND | Ground | +| 2 | 5VOUT | 5V boost converter output (INT_5VOUT) | +| 3 | D1 | GPIO7 (ADC capable, HAT_IO3) | +| 4 | D3 | GPIO6 (ADC capable, HAT_IO2) | +| 5 | D2 | GPIO2 (ADC capable, HAT_IO1) | +| 6 | VBAT | Battery voltage (SYS_VBAT) | +| 7 | 3V3 | 3.3V system power output (SYS_3.3V) | +| 8 | 5VIN | Input voltage from external source (SYS_VIN) | + +

The HAT connector provides access to battery voltage, regulated power rails, and GPIO/ADC capable pins for connecting M5StickC-compatible accessories. GPIO2, GPIO6, and GPIO7 are ESP32-C6 pins capable of analog-to-digital conversion for sensor applications.

+ +### Display and Touch Interface + +![Nesso N1 - Display and Touch Interface](assets/n1_display.png) + +

The integrated 1.14" IPS LCD features a 135 × 240 pixel resolution with 262K color depth (18-bit color), driven by the ST7789P3 controller. The display connects via SPI interface, which is shared with external Flash memory and the LoRa® module. Dedicated control signals include LCD_CS (chip select), LCD_RS (register select), and LCD_BL (backlight enable). The backlight is GPIO-controlled and supports PWM dimming for adjustable brightness levels.

+ +

The FT6336U capacitive touch controller allows single-point touch detection on the display. It communicates via the shared I²C bus alongside other internal peripherals. It provides an interrupt output (INT_LINE) for touch event notification, allowing power management through event-driven wake-up.

+ +
+ SPI Bus Sharing: The display controller shares the SPI bus with external Flash memory and LoRa® module. Chip select lines ensure only one device communicates at a time. Use appropriate delays and CS control in firmware to prevent bus conflicts. +
+ +### IMU Sensor + +

The BMI270 enables motion and orientation detection, gesture recognition, and activity tracking applications. Interrupt outputs can wake the ESP32-C6 from sleep mode when motion events occur, enabling ultra-low-power monitoring applications. Its characteristics are:

+ +- 3-axis accelerometer (±2 g, ±4 g, ±8 g, ±16 g ranges) +- 3-axis gyroscope (±125°/s to ±2000°/s ranges) +- I²C interface (address 0x68 or 0x69 selectable) +- Interrupt outputs (INT1, INT2) for motion detection, tap detection, orientation change +- Low-power modes for battery conservation +- Motion-triggered wake-up capability + +### Audio and Infrared + +

The onboard passive buzzer operates at 4 kHz and is GPIO-controlled via a transistor driver circuit. It provides audible feedback for notifications, alarms, and user interactions, allowing applications that require audio alerts or confirmation tones.

+ +

An infrared LED transmitter enables remote control applications for IR-compatible consumer devices such as TVs, air conditioners, and fans. The IR transmitter is GPIO-controlled via a transistor driver. It supports standard infrared remote control protocols, allowing the Nesso N1 to function as a universal remote or IoT gateway for traditional IR-based devices.

+ +
+ +### Programming Options + +Nesso N1 supports multiple programming methods: + +- **Arduino IDE** [1] +- **MicroPython** +- **UIFlow v2.0*** + +
+ * UIFlow v2.0 Support: UIFlow support is not yet available. UIFlow v2.0 support is on the way for Nesso N1, with availability expected by the end of Q4 2025. This will provide a visual programming interface for rapid prototyping and educational applications. +
+ +## Device Operation + +### Getting Started - IDE + +If you want to program your Nesso N1 while offline you need to install the Arduino® Desktop IDE **[1]**. To connect the Nesso N1 to your computer, you will need a Type-C® USB cable, which can also provide power to the board, as indicated by the green power LED (LED1). + +### Getting Started - Arduino Cloud + +All Arduino IoT enabled products are supported on Arduino Cloud **[2]** which allows you to log, graph and analyze sensor data, trigger events, and automate your home or business. + +### 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 existing projects on Arduino Project Hub **[4]**, the Arduino Library Reference **[5]**, and the online store **[6]**; where you will be able to complement your board with sensors, actuators and more. + +
+ +## Mechanical Information + +

Nesso N1 features a compact, ergonomic design optimized for portable IoT applications. The device measures 48 mm × 24 mm × 14 mm (without antenna storage) or 48 mm × 24 mm × 21.1 mm (with antenna stored in integrated slot). The pre-assembled enclosure eliminates the need for additional mechanical design, allowing immediate deployment in prototypes and final products.

+ +**Device Dimensions (without antenna storage):** +- Length: 48 mm +- Width: 24 mm +- Height: 14 mm + +![Nesso N1](assets/nesso_n1_device_md.svg) + +
+ +**Device Dimensions (with antenna storage):** +- Length: 48 mm +- Width: 24 mm +- Height: 21.1 mm + +![Nesso N1 - with Antenna Storage](assets/nesso_n1_deviceStorage_md.svg) + +
+ +**LoRa® Antenna Dimensions (detachable):** +- Length: 45.5 mm +- Width: 10.8 mm +- Height: 4.8 mm +- Connector: IPEX4 standard + +![Nesso N1 - LoRa® Antenna](assets/nesso_n1_antenna_md.svg) + +
+ +## Certifications + +### Declaration of Conformity CE DoC (EU) + +English: 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). + +French: Nous déclarons sous notre seule responsabilité que les produits indiqués ci-dessus sont conformes aux exigences essentielles des directives de l'Union européenne mentionnées ci-après, et qu'ils remplissent à ce titre les conditions permettant la libre circulation sur les marchés de l'Union européenne (UE) et de l'Espace économique européen (EEE). + +### Declaration of Conformity to EU RoHS & REACH + +

Arduino boards are in compliance with Directive 2011/65/EU of the European Parliament and 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)** | +|----------------------------------------|-------------------------| +| Lead (Pb) | 1000 | +| Cadmium (Cd) | 100 | +| Mercury (Hg) | 1000 | +| Hexavalent Chromium (Cr6+) | 1000 | +| Poly Brominated Biphenyls (PBB) | 1000 | +| Poly Brominated Diphenyl ethers (PBDE) | 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), 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.

+ +## 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. + +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 + +(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. + +2. This equipment complies with RF radiation exposure limits set forth for an uncontrolled environment. + +3. This equipment should be installed and operated with a minimum distance of 20 cm between the radiator & your body. + +English: +

User manuals for licence-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 licence-exempt RSS standard(s). Operation is subject to the following two conditions:

+ +(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 ne doit 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. + +**IC SAR Warning:** + +English: +This equipment should be installed and operated with a minimum distance of 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. + +**Important:** The operating temperature of the EUT can't exceed 40°C and shouldn't be lower than 0°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. + +## Company Information + +| Company name | Arduino S.r.l. | +|--------------|--------------------------------------------| +| Address | Via Andrea Appiani 25, 20900 Monza (Italy) | + +## Documentation Reference + +| No. | Reference | Link | +|:---:|--------------------------------|------------------------------------------------------------------------------------------| +| 1 | Arduino IDE (Desktop) | [https://www.arduino.cc/en/Main/Software](https://www.arduino.cc/en/Main/Software) | +| 2 | Arduino Cloud | [https://cloud.arduino.cc/](https://cloud.arduino.cc/) | +| 3 | Arduino Nesso N1 Documentation | [https://docs.arduino.cc/hardware/nesso-n1/](https://docs.arduino.cc/hardware/nesso-n1/) | +| 4 | Project Hub | [https://create.arduino.cc/projecthub](https://create.arduino.cc/projecthub) | +| 5 | Library Reference | [https://github.com/arduino-libraries/](https://github.com/arduino-libraries/) | +| 6 | Arduino Store | [https://store.arduino.cc/](https://store.arduino.cc/) | + +## Document Revision History + +| **Date** | **Revision** | **Changes** | +|:----------:|:------------:|---------------------------------------| +| 20/11/2025 | 1.1 | Added UIFlow v2.0 support information | +| 14/10/2025 | 1 | First release | \ No newline at end of file diff --git a/content/hardware/09.kits/maker/nesso-n1/downloads/TPX00227-full-pinout.pdf b/content/hardware/09.kits/maker/nesso-n1/downloads/TPX00227-full-pinout.pdf new file mode 100644 index 0000000000..2d96b85570 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/downloads/TPX00227-full-pinout.pdf differ diff --git a/content/hardware/09.kits/maker/nesso-n1/essentials.md b/content/hardware/09.kits/maker/nesso-n1/essentials.md new file mode 100644 index 0000000000..f90f481cc1 --- /dev/null +++ b/content/hardware/09.kits/maker/nesso-n1/essentials.md @@ -0,0 +1,23 @@ +--- +productsLibrariesMap: + - m5gfx + - nimble-arduino + - arduino-modulino + - radiolib + - wire + - arduino_bmi270_bmm150 + - irremote +--- + + + + + A simple interface to control the Arduino Modulino family of products via the Qwiic connector. + + + + The standard library for communicating with I2C devices connected via the Grove or Qwiic ports. + + + + diff --git a/content/hardware/09.kits/maker/nesso-n1/features.md b/content/hardware/09.kits/maker/nesso-n1/features.md new file mode 100644 index 0000000000..517cafeb6e --- /dev/null +++ b/content/hardware/09.kits/maker/nesso-n1/features.md @@ -0,0 +1,45 @@ + + +Powered by M5Stack, this sleek, compact device delivers power, versatility, and ease of use. Its ESP32-C6 core allows seamless, long-range connectivity for smart home devices, industrial automation tools, and wearables. Enjoy instant interaction with its touch display, programmable buttons, and built-in sensors, and expand possibilities with Grove, Qwiic, and M5StickC HAT-compatible connectors. + + + + + + +Seamlessly connect your projects with multiple protocols, including Wi-Fi® 6, Bluetooth® LE 5.3, 802.15.4 (Thread/Zigbee®), and LoRa®, enabling versatile and reliable communication for any IoT application. + + + +The detachable LoRa® antenna can be securely stored within the device enclosure when not in use, maintaining a portable form factor for on-the-go projects. + + + +The onboard 1.14-inch color touchscreen provides a clear and intuitive way to display data and create user interfaces directly on your device. + + + +Easily integrate a wide range of sensors and peripherals from the Arduino Modulino family and third-party modules using the built-in Grove, Qwiic, and 8-pin HAT connectors for plug-and-play expansion. + + + +The integrated BMI270 Inertial Measurement Unit (IMU) offers precise motion and posture detection, perfect for wearables, gesture control, and orientation-aware projects. + + + +A built-in 250 mAh LiPo battery and advanced power management chip provide portability and real-time monitoring of battery status, with over-current and over-voltage protection. + + + +The Nesso N1 features a modern USB-C® connector for streamlined power delivery, battery charging, and data transfer. + + + +Transform traditional appliances into smart devices using the onboard infrared (IR) transmitter to create custom remote controls and IoT gateways. + + + +Three programmable buttons and an onboard buzzer offer flexible control and audible feedback for your applications. + + + \ No newline at end of file diff --git a/content/hardware/09.kits/maker/nesso-n1/image.svg b/content/hardware/09.kits/maker/nesso-n1/image.svg new file mode 100644 index 0000000000..a0c676fdbb --- /dev/null +++ b/content/hardware/09.kits/maker/nesso-n1/image.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/content/hardware/09.kits/maker/nesso-n1/interactive/TPX00227-pinout.png b/content/hardware/09.kits/maker/nesso-n1/interactive/TPX00227-pinout.png new file mode 100644 index 0000000000..3bc3167580 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/interactive/TPX00227-pinout.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/product.md b/content/hardware/09.kits/maker/nesso-n1/product.md new file mode 100644 index 0000000000..a28d50c517 --- /dev/null +++ b/content/hardware/09.kits/maker/nesso-n1/product.md @@ -0,0 +1,12 @@ +--- +title: Nesso N1 +url_shop: https://store.arduino.cc/products/nesso-n1 +primary_button_url: /tutorials/nesso-n1/user-manual +primary_button_title: User Manual +core: RISC-V +forumCategorySlug: '/hardware/kits/nesso-n1' +sku: [TPX00227] +productCode: '230' +--- + +The **Arduino Nesso N1** is a high-performance, all-in-one development board for remote monitoring and automation. Powered by an **ESP32-C6** SoC, it integrates **Wi-Fi® 6**, **Bluetooth® LE 5.3**, **Thread/Zigbee®**, and **LoRa®** communication protocols. Featuring a **1.14" color touchscreen**, built-in **IMU sensor**, **programmable buttons**, and a rechargeable **battery**, the Nesso N1 is the ultimate tool for developing sophisticated IoT solutions. diff --git a/content/hardware/09.kits/maker/nesso-n1/suggestions.md b/content/hardware/09.kits/maker/nesso-n1/suggestions.md new file mode 100644 index 0000000000..4ad7321884 --- /dev/null +++ b/content/hardware/09.kits/maker/nesso-n1/suggestions.md @@ -0,0 +1,18 @@ + + + + Get started with the Arduino Cloud + + + + + + Built-in Examples are sketches included in the Arduino IDE and demonstrate all basic Arduino commands. + + + Discover interesting articles, principles and techniques related to the Arduino ecosystem. + + + Arduino programming language can be divided in three main parts: functions, values (variables and constants), and structure. + + diff --git a/content/hardware/09.kits/maker/nesso-n1/tech-specs.md b/content/hardware/09.kits/maker/nesso-n1/tech-specs.md new file mode 100644 index 0000000000..8c20c1eef4 --- /dev/null +++ b/content/hardware/09.kits/maker/nesso-n1/tech-specs.md @@ -0,0 +1,5 @@ +Here you will find the technical specifications for the Arduino Nesso N1. + +**Note on Connectors:** The Qwiic, and 8-pin expansion port connectors operate at **3.3 V**. Connecting modules or devices that use higher logic levels, such as 5 V, may permanently damage the board. + +**Note on GPIO Current:** Be mindful of the current limits for the GPIO pins. Exceeding the specifications in the ESP32-C6 datasheet may damage the pin or the board. diff --git a/content/hardware/09.kits/maker/nesso-n1/tech-specs.yml b/content/hardware/09.kits/maker/nesso-n1/tech-specs.yml new file mode 100644 index 0000000000..06c07a46e1 --- /dev/null +++ b/content/hardware/09.kits/maker/nesso-n1/tech-specs.yml @@ -0,0 +1,60 @@ +Board: + Name: Arduino Nesso N1 + SKU: TPX00227 + +Microcontroller: + SoC: ESP32-C6 + Architecture: Single-core 32-bit RISC-V CPU + Clock Speed: up to 160 MHz + +Wireless Communication: + Wi-Fi: 2.4 GHz Wi-Fi® 6 + Bluetooth: Bluetooth® LE 5.3 + 802.15.4: Thread / Zigbee® (Supports Matter Thread endpoint devices) + LoRa®: SX1262 module (850–960 MHz) + +Memory: + Flash: 16 MB external + SRAM: 512 kB (Internal) + +Power: + Input Voltage: 5 V (via USB-C®) + Power Source: USB DC-5V input or built-in battery power + Battery: 250 mAh LiPo (rechargeable) + Power Management: AW32001 (power path management, charge control, and over-current & over-voltage protection) + Battery Monitoring: BQ27220 (real-time monitoring of battery capacity, voltage, and current) + +Interfaces: + USB: 1× USB-C® (Programming / Power) + Grove: 1× Standard Grove interface + Qwiic: 1× Qwiic interface standard + Expansion Port: 1× 8-pin (M5StickC HAT compatible) + +Onboard Peripherals: + Display: 1.14" IPS LCD touchscreen (135×240 px, 262K colors, ST7789P3 driver, FT6336U capacitive touch) + IMU: BMI270 (6-axis) + Infrared: 1× IR transmitter (IR LED, connected to GPIO9 pin) + Audio: 1× Buzzer (connected to GPIO11 pin) + User Buttons: 2× programmable (KEY1/KEY2) + 1× Power/Reset/Bootloader button + User LEDs: 1× Green programmable (LED_BUILTIN) + 1× Blue (status indications) + +Operating Temperature: 0–40 °C + +Antennas: + ESP32-C6: on-board FPC antenna (dedicated) + LoRa®: detachable external antenna + +Dimensions (Device without antenna storage): + Width: 24 mm + Length: 48 mm + Height: 14 mm + +Dimensions (Device with antenna storage): + Width: 24 mm + Length: 48 mm + Height: 21.1 mm + +Dimensions (LoRa® antenna): + Width: 10.8 mm + Length: 45.5 mm + Height: 4.8 mm diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/anomaly-detection.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/anomaly-detection.png new file mode 100644 index 0000000000..f32ed8b463 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/anomaly-detection.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/anomaly-explorer.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/anomaly-explorer.png new file mode 100644 index 0000000000..25aab650ee Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/anomaly-explorer.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/classifier.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/classifier.png new file mode 100644 index 0000000000..e0b13b0d51 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/classifier.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/daemon-version.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/daemon-version.png new file mode 100644 index 0000000000..8bec712940 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/daemon-version.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/dashboard.gif b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/dashboard.gif new file mode 100644 index 0000000000..b81e05bb5f Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/dashboard.gif differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/data-collection.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/data-collection.png new file mode 100644 index 0000000000..862d24f5bf Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/data-collection.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/data-forwarder-configuration.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/data-forwarder-configuration.png new file mode 100644 index 0000000000..8f14f6fdde Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/data-forwarder-configuration.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/device-verification.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/device-verification.png new file mode 100644 index 0000000000..ec1e100c9f Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/device-verification.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/download-button.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/download-button.png new file mode 100644 index 0000000000..4ff5d7f9e6 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/download-button.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/example-sketch-output-1.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/example-sketch-output-1.png new file mode 100644 index 0000000000..1a4cdd9c56 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/example-sketch-output-1.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/example-sketch-output-display-1.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/example-sketch-output-display-1.png new file mode 100644 index 0000000000..a0439c3721 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/example-sketch-output-display-1.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/feature-explorer.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/feature-explorer.png new file mode 100644 index 0000000000..d2ff7d9758 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/feature-explorer.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/hardware-setup-nesso.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/hardware-setup-nesso.png new file mode 100644 index 0000000000..070cd4770a Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/hardware-setup-nesso.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/hero-banner.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/hero-banner.png new file mode 100644 index 0000000000..dd0f3c72e8 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/hero-banner.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/impulse-design.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/impulse-design.png new file mode 100644 index 0000000000..21402ea4a2 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/impulse-design.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/model-deployment.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/model-deployment.png new file mode 100644 index 0000000000..21f537d645 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/model-deployment.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/model-validation.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/model-validation.png new file mode 100644 index 0000000000..715ed8cb73 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/model-validation.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/motor_anomaly_detection_cloud.zip b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/motor_anomaly_detection_cloud.zip new file mode 100644 index 0000000000..b8d33c5aa4 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/motor_anomaly_detection_cloud.zip differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/motor_anomaly_detection_nesso.zip b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/motor_anomaly_detection_nesso.zip new file mode 100644 index 0000000000..ee7bb06bf4 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/motor_anomaly_detection_nesso.zip differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/motor_vibration_collector.zip b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/motor_vibration_collector.zip new file mode 100644 index 0000000000..bbab3c0dcd Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/motor_vibration_collector.zip differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/new-project.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/new-project.png new file mode 100644 index 0000000000..12115a269f Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/new-project.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/spectral-features.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/spectral-features.png new file mode 100644 index 0000000000..342f563803 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/spectral-features.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/visual-indication-cloud.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/visual-indication-cloud.png new file mode 100644 index 0000000000..2e7dba110e Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/visual-indication-cloud.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/visual-indication.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/visual-indication.png new file mode 100644 index 0000000000..66ac822b21 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/assets/visual-indication.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/content.md b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/content.md new file mode 100644 index 0000000000..918b484328 --- /dev/null +++ b/content/hardware/09.kits/maker/nesso-n1/tutorials/anomaly-detection-application-note/content.md @@ -0,0 +1,1888 @@ +--- +title: 'Motor Anomaly Detection with the Nesso N1' +description: "This application note describes how to implement a motor anomaly detection system using the Nesso N1 development kit, its built-in IMU sensor, and Edge Impulse." +difficulty: intermediate +compatible-products: [nesso-n1] +tags: + - Motor monitoring + - Anomaly detection + - Classification + - Application note + - Machine learning + - Edge Impulse + - IMU + - Nesso N1 + - LoRaWAN + - Wi-Fi +author: 'José Bagur' +hardware: + - hardware/09.kits/maker/nesso-n1 +software: + - ide-v2 + - edge-impulse +--- + +## Introduction + +Motor condition monitoring is crucial in industrial settings, where unexpected equipment failures can lead to significant downtime and high maintenance costs. This application note demonstrates how to construct a motor anomaly detection system utilizing the Nesso N1 development kit, its onboard 6-axis Inertial Measurement Unit (IMU), and Edge Impulse®. + + +![ ](assets/hero-banner.png) + +The developed system monitors vibration patterns in real-time to identify unusual operating conditions that may signal mechanical problems, wear, or potential failures. The system utilizes machine learning to identify vibration patterns that deviate from regular motor operation, enabling predictive maintenance. The Nesso N1's multiple connectivity options (Wi-Fi® 6, LoRa®, Thread, and Bluetooth® 5.3) enable flexible deployment in various industrial environments, ranging from local monitoring to long-range remote sensing applications. + + +## Goals + +This application note will help you to: + +- Build a motor anomaly detection system that monitors vibration patterns in real-time using the Nesso N1's built-in 6-axis IMU sensor. +- Collect and analyze vibration data from motors to create baseline patterns and detect changes. +- Train a machine learning model using Edge Impulse to detect anomalies based on vibration data. +- Deploy the trained model directly to the Nesso N1 development kit for real-time anomaly detection without needing cloud connectivity. +- Set up visual and audio feedback through the kit's built-in RGB LED, touch display, and buzzer to show detected anomalies and system status. +- Leverage the Nesso N1's multiple connectivity protocols (Wi-Fi® 6, LoRa®, Thread, Bluetooth® 5.3) to transmit alerts and data to remote monitoring systems. + +- Create industrial predictive maintenance solutions using cost-effective embedded intelligence in a compact, pre-assembled enclosure. + +## Hardware and Software Requirements + +### Hardware Requirements + +- [Arduino Nesso N1 development kit](https://store.arduino.cc/products/nesso-n1) (x1) +- [USB-C® cable](https://store.arduino.cc/products/usb-cable2in1-type-c) (x1) +- Motor or rotating equipment for testing (for example, a small DC motor or fan) (x1) +- Power supply for the motor (if needed) (x1) +- Mounting accessories or adhesive tape to secure the Nesso N1 to the motor (x1 set) + +### Software Requirements + +- [Arduino IDE 2.0+](https://www.arduino.cc/en/software) or [Arduino Web Editor](https://create.arduino.cc/editor) +- [ESP32 Arduino Core](https://github.com/espressif/arduino-esp32) (needed for the Nesso N1 ESP32-C6 processor) +- [Edge Impulse account](https://studio.edgeimpulse.com/) (free tier available) +- [Edge Impulse CLI tools](https://docs.edgeimpulse.com/docs/cli-installation) for data collection + +***The Nesso N1 development kit features a powerful ESP32-C6 processor with a single-core 32-bit RISC-V CPU running at up to 160 MHz, 16 MB NOR Flash memory and 512 KB SRAM for machine learning tasks. The onboard 6-axis IMU (BMI270) eliminates the need for external accelerometer connections. For complete hardware specifications, see the [Nesso N1 documentation](https://docs.arduino.cc/hardware/nesso-n1/).*** + +## Hardware Setup Overview + +The electrical connections for the motor anomaly detection system are simplified with the Nesso N1 development kit, as all its essential components are integrated into a single, compact device. + +![The motor anomaly detection system hardware setup with the Nesso N1](assets/hardware-setup-nesso.png) + +This diagram shows the system components using the Nesso N1 development kit. **The Nesso N1 acts as an all-in-one solution**, combining the kit's microcontroller (ESP32-C6), onboard IMU (BMI270), wireless connectivity, display, and battery in a single enclosed unit. **The onboard 6-axis IMU collects vibration data** from the motor through direct physical coupling when the device is mounted on the motor housing. + +The Nesso N1 operates from its built-in rechargeable lithium-polymer battery or can be powered via the USB-C connector with a +5 VDC supply. The compact form factor (18 mm x 45 mm) and integrated enclosure make it ideal for direct mounting on motor equipment without the need for additional protective housing. + +***__Important note__: This power setup is for testing and demonstration purposes only. In real industrial environments, proper power system design should include electrical isolation, noise filtering, surge protection, and compliance with industrial safety standards for your specific application.*** + +### Physical Mounting Considerations + +Proper mounting of the Nesso N1 is essential for effective vibration monitoring. The development kit must be securely attached to the motor housing or equipment using appropriate mechanical fasteners or industrial-grade adhesive. A good mechanical connection between the mounting surface and the device guaranteess accurate vibration transmission from the motor to the onboard IMU. + +The Nesso N1's enclosed design provides basic protection against dust and minor vibrations, making it suitable for many industrial environments. However, additional protective measures may be needed in extreme conditions. + +***For this application note, we will use a computer cooling fan to simulate motor operation and demonstrate the anomaly detection system. The Nesso N1 can be mounted directly on top of the fan using double-sided adhesive tape or a custom 3D-printed mounting bracket, providing a stable and consistent mounting solution for testing.*** + +## Understanding Motor Vibration Analysis + +Motor vibrations contain valuable information about the mechanical condition of the equipment. Regular motor operation produces characteristic vibration patterns that stay relatively consistent during healthy operation. Abnormal conditions manifest as changes in vibration amplitude, frequency content, or timing patterns. + +### Common Motor Faults + +Common motor faults that can be detected through vibration analysis include: + +- **Bearing wear**: Creates higher frequency components and increased vibration levels across all axes +- **Misalignment**: Produces specific frequency patterns related to rotational speed, typically appearing in radial directions +- **Imbalance**: Results in increased vibration at the main rotational frequency, primarily in radial directions +- **Looseness**: Causes widespread increases in vibration across multiple frequencies and directions +- **Electrical issues**: May create vibrations at twice the line frequency due to magnetic field changes + +### The Role of the IMU in Vibration Monitoring + +The Nesso N1's onboard BMI270 6-axis IMU combines a 3-axis accelerometer and 3-axis gyroscope, providing complete motion sensing capabilities for vibration analysis. The accelerometer measures linear acceleration along the X, Y, and Z axes, capturing the intensity and direction of vibrations. The gyroscope complements this by detecting rotational movements, which can indicate wobbling or angular vibrations in the motor. + +The BMI270 offers several advantages for industrial vibration monitoring: + +- High sensitivity and low noise for detecting subtle vibration changes +- Programmable measurement ranges (±2g to ±16g for accelerometer) +- High sampling rates up to 1.6 kHz for capturing fast vibration events +- Built-in digital filters to reduce noise and improve signal quality +- Low power consumption, extending battery life in the Nesso N1 + +This integrated sensor approach eliminates the need for external accelerometer wiring, ensuring consistent and reliable measurements. The digital I²C interface between the BMI270 and the ESP32-C6 microcontroller enables noise-immune data transmission, which is important to have in electrically noisy industrial environments. + +### Data Collection Strategy + +The Nesso N1 collects vibration data at regular intervals to build a complete picture of the motor's behavior. The system samples the IMU at 100 Hz, providing sufficient resolution to capture vibration patterns up to 50 Hz, as per the Nyquist theorem. This sampling rate covers most mechanical vibration frequencies found in typical motor applications. + +Each data collection window consists of 200 samples (2 seconds of data), providing enough information for the machine learning model to identify patterns while keeping computational requirements manageable. The Nesso N1's 512 KB SRAM provides ample buffer space for storing multiple windows of vibration data during processing. + +## Simple Vibration Monitor Example Sketch + +Now that we have covered the hardware components and vibration analysis basics, let's look at the software that enables vibration data collection. Before implementing intelligent anomaly detection, we need to collect training data representing normal motor operation for Edge Impulse, a platform that simplifies embedded AI development. + +Edge Impulse needs training data in a specific format to build effective anomaly detection models. Our data collection sketch formats the IMU readings so Edge Impulse can analyze normal operation patterns and create a model that identifies when new data differs from these patterns. + +This section breaks down the example sketch and guides you through its functionality. We will explore how the IMU is initialized, how vibration data is collected at consistent intervals, and how the results are formatted for Edge Impulse data collection and model training. + +The complete example sketch is shown below. + +```arduino +/** + Motor Vibration Data Collection for Edge Impulse + Name: motor_vibration_collector.ino + Purpose: This sketch reads 6-axis IMU data from the onboard BMI270 sensor + of the Nesso N1 development kit. The data is formatted for Edge Impulse + data collection and training, with real-time display visualization. + + @version 1.0 01/11/25 + @author Arduino Product Experience Team +*/ + +#include +#include + +// Display instance +M5GFX display; + +// Sampling parameters +const int sampleRate = 100; // 100 Hz +const unsigned long sampleTime = 1000 / sampleRate; // 10ms between samples + +// Data collection variables +unsigned long lastSample = 0; + +void setup() { + // Initialize USB serial communication at 115200 baud + Serial.begin(115200); + for (auto startNow = millis() + 2500; !Serial && millis() < startNow; delay(500)); + + // Initialize display + display.begin(); + display.setRotation(1); // Landscape mode + display.setTextColor(TFT_WHITE, TFT_BLACK); + display.fillScreen(TFT_BLACK); + display.setTextSize(1.5); + display.setTextDatum(MC_DATUM); + display.drawString("- Initializing IMU...", display.width() / 2, display.height() / 2); + + // Initialize IMU + if (!IMU.begin()) { + Serial.println("- Failed to initialize BMI270 IMU!"); + display.fillScreen(TFT_BLACK); + display.setTextColor(TFT_RED, TFT_BLACK); + display.drawString("- IMU Failed!", display.width() / 2, display.height() / 2); + while (1); + } + + Serial.println("- Motor Vibration Data Collector (BMI270)"); + Serial.println("- 6-axis sensor initialized!"); + + // Display sensor information + Serial.print("- Accelerometer sample rate: "); + Serial.print(IMU.accelerationSampleRate()); + Serial.println(" Hz"); + + // Wait for sensor stabilization + delay(500); + + // Test initial reading + float testX, testY, testZ; + if (IMU.accelerationAvailable()) { + IMU.readAcceleration(testX, testY, testZ); + + Serial.print("- Initial readings (g): X="); + Serial.print(testX, 3); + Serial.print(", Y="); + Serial.print(testY, 3); + Serial.print(", Z="); + Serial.println(testZ, 3); + + Serial.println("- Sensor ready (values already in g units)"); + } + + Serial.println("- Streaming continuous data for Edge Impulse!"); + Serial.println("- Data format: X_accel,Y_accel,Z_accel"); + + // Setup display for live data + display.fillScreen(TFT_BLACK); + display.setTextSize(1.5); + display.setTextDatum(TL_DATUM); + display.drawString("- Motor Vibration Data:", 5, 5); + display.drawString("- X:", 5, 30); + display.drawString("- Y:", 5, 45); + display.drawString("- Z:", 5, 60); + display.drawString("g", 100, 30); + display.drawString("g", 100, 45); + display.drawString("g", 100, 60); + + delay(1000); +} + +void loop() { + unsigned long currentTime = millis(); + + if (currentTime - lastSample >= sampleTime) { + float xAccel, yAccel, zAccel; + bool dataValid = false; + + // Read new acceleration data from the IMU + if (IMU.accelerationAvailable()) { + IMU.readAcceleration(xAccel, yAccel, zAccel); + dataValid = true; + } + + // Output CSV format for Edge Impulse + if (dataValid) { + Serial.print(xAccel, 4); + Serial.print(","); + Serial.print(yAccel, 4); + Serial.print(","); + Serial.println(zAccel, 4); + + // Update display with current values + display.fillRect(45, 30, 50, 45, TFT_BLACK); + display.setTextColor(TFT_GREEN, TFT_BLACK); + display.setTextSize(1.5); + display.setCursor(40, 30); + display.printf("%+.3f", xAccel); + display.setCursor(40, 45); + display.printf("%+.3f", yAccel); + display.setCursor(40, 60); + display.printf("%+.3f", zAccel); + } + + lastSample = currentTime; + } +} +``` + +The following sections will help you understand the main components of the example sketch, which can be divided into the following areas: + +- Sensor selection and initialization +- Hardware configuration and calibration +- Data collection timing and control +- Signal processing and conversion +- Edge Impulse data formatting + +### Sensor Selection and Initialization + +The sketch begins by including the necessary libraries for the Nesso N1's integrated components: +```arduino +#include +#include + +// Display instance +M5GFX display; +``` + +In this code: + +- The `Arduino_BMI270_BMM150` library provides access to the onboard 6-axis IMU of the Nesso N1 +- The `M5GFX` library controls the 1.14" touch display + +### Hardware Configuration and Calibration + +Before we can collect vibration data, we need to configure the Nesso N1 development kit to interface with its onboard BMI270 IMU. + +**BMI270 Configuration** + +For the Nesso N1, the configuration is simplified as the BMI270 is factory-calibrated and internally connected: + +```arduino +// Initialize IMU +if (!IMU.begin()) { + Serial.println("- Failed to initialize BMI270 IMU!"); + while (1); +} + +Serial.println("- Motor Vibration Data Collector (BMI270)"); +Serial.println("- 6-axis sensor initialized!"); + +// Display sensor information +Serial.print("- Accelerometer sample rate: "); +Serial.print(IMU.accelerationSampleRate()); +Serial.println(" Hz"); +``` + +In this code: + +- The IMU is initialized with its default settings +- No pin assignments are needed as the IMU is internally connected via I²C + +### Data Collection Timing and Control + +To guarantees accurate vibration analysis and successful machine learning training, we need consistent data collection timing. These parameters control how data is gathered: + +```arduino +// Sampling parameters +const int sampleRate = 100; // 100 Hz +const unsigned long sampleTime = 1000 / sampleRate; // 10 ms between samples +``` + +In this code: + +- Sample rate of 100 Hz captures enough frequency response for detecting most motor faults +- Sample time calculation determines the precise timing needed between measurements + +### Signal Processing and Conversion + +Once we have the sensor readings, the BMI270 IMU provides pre-processed digital values ready for use. + +**BMI270 Signal Processing** + +For the onboard BMI270 IMU, the data is already processed and calibrated: + +```arduino +// Read new acceleration data from the IMU +if (IMU.accelerationAvailable()) { + IMU.readAcceleration(xAccel, yAccel, zAccel); + dataValid = true; +} +``` + +In this code: + +- `IMU.accelerationAvailable()` checks if new data is ready from the IMU +- The acceleration values are returned directly in **g** units + +### Edge Impulse Data Formatting + +The final step formats our acceleration data so it can be used with Edge Impulse data collection tools: + +```arduino +// Output CSV format for Edge Impulse +if (dataValid) { + Serial.print(xAccel, 4); + Serial.print(","); + Serial.print(yAccel, 4); + Serial.print(","); + Serial.println(zAccel, 4); +} +``` + +In this code: + +- CSV format with four decimal places gives us the precision needed for machine learning training +- Single-line output per sample makes it easy to integrate with the Edge Impulse data forwarder +- Comma separation follows standard CSV format that most data processing tools expect +- The display provides real-time visual feedback of the acceleration values + +After uploading the example sketch to the Nesso N1 development kit, you should see the following output in the Arduino IDE's Serial Monitor: + +![Example sketch output showing vibration data collection on the Arduino IDE Serial Monitor](assets/example-sketch-output-1.png) + +### Optional: Display Visualization + +The Nesso N1's built-in 1.14" touch display provides real-time visual feedback during data collection, which is particularly useful for verifying proper sensor mounting and monitoring vibration levels without needing a serial connection. + +**Display Setup** + +The display initialization configures the screen orientation and text properties: + +```arduino +// Initialize display +display.begin(); +display.setRotation(1); // Landscape mode for better data layout +display.setTextColor(TFT_WHITE, TFT_BLACK); +display.fillScreen(TFT_BLACK); +display.setTextSize(1.5); // Readable size for the small screen +``` + +**Real-time Data Visualization** + +The display updates with each new sensor reading, showing the acceleration values for all three axes: + +```arduino +// Update display with current values +display.fillRect(45, 30, 50, 45, TFT_BLACK); // Clear previous values only +display.setTextColor(TFT_GREEN, TFT_BLACK); +display.setTextSize(1.5); +display.setCursor(40, 30); +display.printf("%+.3f", xAccel); // Format with sign and 3 decimals +display.setCursor(40, 45); +display.printf("%+.3f", yAccel); +display.setCursor(40, 60); +display.printf("%+.3f", zAccel); +``` + +In this code: + +- The `fillRect()` function clears only the area where values are displayed, preserving the labels +- Green text color provides good contrast against the black background +- The `printf()` format guarantees consistent display with sign (+/-) and three decimal places +- Values update at 100 Hz + +This visual feedback helps during setup by: + +- Confirming the IMU is responding to vibrations +- Verifying proper mounting (values should change when motor runs) +- Monitoring data quality without a computer connection +- Providing immediate indication of sensor saturation or disconnection + +After uploading the example sketch to the Nesso N1 development kit, you should see the following output in the Nesso N1's built-in 1.14" touch display: + +![Example sketch output showing vibration data collection on the Nesso N1's built-in touch display](assets/example-sketch-output-display-1.png) + +### Complete Example Sketch + +Download the complete data collection example sketch [here](assets/motor_vibration_collector.zip). + +[![ ](assets/download-button.png)](assets/motor_vibration_collector.zip) + +## Connecting the Vibration Monitor to Edge Impulse + +As vibration-based condition monitoring becomes more important for predictive maintenance, connecting our data collection system to Edge Impulse enables the development of intelligent anomaly detection models. Edge Impulse provides a complete platform for embedded machine learning, allowing us to transform raw vibration data into useful insights about motor health. + +In this section, we will connect the vibration monitor to Edge Impulse platform to collect training data, develop machine learning models and deploy intelligent anomaly detection directly to the Nesso N1 development kit. This connection transforms our simple vibration monitor into an intelligent system that can detect motor anomalies without needing cloud connectivity. + +***If you are new to Edge Impulse, please check out [this tutorial](https://docs.edgeimpulse.com/docs/tutorials/end-to-end-tutorials/time-series/continuous-motion-recognition/) for an introduction to the platform.*** + +### Setting up Edge Impulse Account and Project + +The first step involves creating an Edge Impulse account and setting up a new project for motor anomaly detection. These steps establish the foundation for machine learning model development: + +**(1) Create Account**: Register for a free Edge Impulse account at [studio.edgeimpulse.com](https://studio.edgeimpulse.com/) + +**(2) New Project**: Create a new project with the following settings: + +- Enter a project name (for example, "`nesso-n1-anomaly-detection`") +- Choose project type: Personal (free tier with 60 min job limit, 4 GB data limit) +- Choose project setting: Private (recommended for this application) + +![Creating a new project on Edge Impulse](assets/new-project.png) + +**(3) Project Configuration**: Once created, the project will be ready for data collection. Sampling frequency and window settings will be configured later during impulse design. + +### Data Collection with Edge Impulse CLI + +The Edge Impulse CLI provides tools for streaming data directly from the Nesso N1 to the Edge Impulse platform. This eliminates manual file transfers and enables efficient data collection. + +#### Installing Edge Impulse CLI + +Before you can collect data from the Nesso N1, you need to install the Edge Impulse CLI tools on your computer. The installation process varies depending on your operating system. + +Prerequisites: + +- [Node.js](https://nodejs.org/en) 14 or higher +- [Python 3](https://www.python.org/downloads/) + +For detailed installation instructions specific to your operating system, follow the [official Edge Impulse CLI installation guide](https://docs.edgeimpulse.com/docs/tools/edge-impulse-cli/cli-installation). + +Verify the installation with the following command: + +```bash +edge-impulse-daemon --version +``` + +![Edge Impulse Daemon version](assets/daemon-version.png) + +#### Setting up Data Forwarding + +Now that you have the CLI installed, you can set up data forwarding to stream vibration data directly from your Nesso N1 to Edge Impulse. + +Connect your Nesso N1 to your computer via USB-C cable and upload the data collection sketch. Then open a terminal and run the following command: + +```bash +edge-impulse-data-forwarder +``` + +The tool will guide you through the setup process: + +1. **Login**: Enter your Edge Impulse username/email and password when prompted +2. **Select Device**: Choose the correct serial port for your Nesso N1 development kit (for example, `COM10`) +3. **Data Detection**: The tool will automatically detect the data frequency (100 Hz) and number of sensor axes (3) +4. **Name Axes**: When asked "What do you want to call them?", enter: `X`,`Y`,`Z` +5. **Device Name**: Give your device a name (for example, `nesso-n1`) +6. **Project Connection**: If you have multiple projects, the tool will ask which Edge Impulse project you want to connect the device to. Select your motor anomaly detection project. + +![Setting up the data forwarder tool](assets/data-forwarder-configuration.png) + +Once configured, the forwarder will stream data from your Nesso N1 board to Edge Impulse. You can verify the device connection by checking the "Devices" tab in Edge Impulse Studio. You can then start collecting training data for your machine learning model. + +![Device connection verification to Edge Impulse Studio](assets/device-verification.png) + +#### Data Collection Process + +With the data forwarder running, you can now collect training data for your anomaly detection model. For effective anomaly detection, you need high-quality data representing normal motor operation in different states. + +Start by mounting the accelerometer securely to the motor housing. You will collect two types of normal operation data: + +1. **Idle data collection**: With the motor turned off, **collect 2 to 5 minutes of "idle" operation** data through multiple two second windows. This captures the baseline vibration environment without motor operation. Label all data as `idle` in Edge Impulse Studio. + +2. **Nominal data collection**: With the motor running under normal operating conditions, **collect 2 to 5 minutes of "nominal" operation** data through multiple two second windows. Vary motor load conditions slightly to capture different normal operating scenarios. Label all data as `nominal` in Edge Impulse Studio. + +Edge Impulse can automatically split your collected data into **training (80%) and testing (20%) sets**. The 4 to 10 minutes total of data guarantees you have enough samples for both training the model and validating its performance on unseen data. + +![Data collection on Edge Impulse Studio](assets/data-collection.png) + +After data collection, review the collected samples in Edge Impulse Studio for consistency. Check for proper amplitude ranges and no clipping, verify sample rate consistency and timing accuracy and remove any corrupted or unusual samples from the training set. + +***__Important note__: The anomaly detection model learns what "normal" looks like from both idle and nominal data. Any future vibration patterns that significantly differ from these learned patterns will be flagged as anomalies. This approach allows the system to detect unknown fault conditions without needing examples of actual motor failures.*** + +### Training the Anomaly Detection Model + +Once you have collected sufficient `idle` and `nominal` operation data, the next step involves configuring and training the machine learning model for anomaly detection. + +#### Impulse Design Configuration + +Within Edge Impulse Studio, configure the impulse design with appropriate processing and learning blocks. Navigate to the "Impulse design" tab and set up the following blocks: + +1. **Input Block**: Configure time series data with window size of 1000 ms, window increase of 100 ms, and frequency of 100 Hz to match your data collection sampling rate. +2. **Processing Block**: Add "Spectral Analysis" block for frequency domain feature extraction +3. **Classification Learning Block**: Add "Classification (Keras)" to distinguish between `idle` and `nominal` operating states. +4. **Learning Block**: Select "Anomaly Detection (K-means)" for unsupervised learning approach + +![Impulse design on Edge Impulse Studio](assets/impulse-design.png) + +This dual approach provides a more robust monitoring system where the classifier identifies the current operating state (`idle` vs `nominal`) while the anomaly detector flags unusual patterns that don't fit either normal category. + +#### Feature Extraction Configuration + +The spectral analysis block extracts relevant features from the raw vibration signals. Configure the following parameters optimized for the Nesso N1's BMI270 IMU: + +- **Type**: None (no filter) to preserve all frequency information from the IMU +- **Cut-off frequency**: Not applicable when filter type is None +- **Order**: Not applicable when filter type is None +- **FFT length**: 64 points for efficient processing on the ESP32-C6 +- **Take log of spectrum**: Disable this option for more linear response with the BMI270 +- **Overlap FFT frames**: Enable this option to increase the number of features extracted from each window + +![Spectral features on Edge Impulse Studio](assets/spectral-features.png) + +***__Important note__: The BMI270 IMU in the Nesso N1 provides very clean digital data, so heavy filtering is not necessary. Using no filter with a smaller FFT length (64 points) provides better discrimination between `idle` and `nominal` states while reducing computational load on the ESP32-C6 processor.*** + +#### Model Training Process + +Follow these steps to train the anomaly detection model using the collected idle and nominal operation data: + +**(1) Generate Features**: Before clicking "Generate features", enable "Calculate feature importance" to identify which frequency bands are most relevant for distinguishing between idle and nominal states. Then click "Generate features" to extract spectral features from all training data. Edge Impulse will process your data and create the feature vectors needed for training. + +**(2) Feature Explorer**: Review the feature explorer visualization to verify data quality and feature separation between your idle and nominal classes. + +![Feature explorer on Edge Impulse Studio](assets/feature-explorer.png) + +**(3) Train Classification Model**: Navigate to the "Classifier" tab and configure the neural network with the following simplified settings optimized for the Nesso N1: + +- Number of training cycles: 50 (increased for better convergence) +- Learning rate: 0.001 (slightly higher for faster training) +- Neural network architecture: Configure dense layers with 20 neurons (first layer) and 10 neurons (second layer) to provide efficient pattern recognition without overfitting +- Validation set size: 20% + +Start training and monitor the accuracy metrics. + +![Classifier on Edge Impulse Studio](assets/classifier.png) + +**(4) Train Anomaly Detection Model**: Navigate to the "Anomaly detection" tab and configure K-means clustering with reduced complexity: + +- **Cluster count**: 12 clusters (reduced from 32) for more stable anomaly scores +- **Axes selection**: Use "Select suggested axes" to automatically choose the most relevant spectral features +- Click "Start training" to train the anomaly detection model + +![Anomaly detection on Edge Impulse Studio](assets/anomaly-detection.png) + +***__Important note__: Using 12 clusters instead of 32 produces more reasonable anomaly scores (typically in the 0 to 5 range) that are easier to threshold in your application. The BMI270's high sensitivity means fewer clusters are needed to map normal operation patterns effectively.*** + +![Anomaly explorer on Edge Impulse Studio](assets/anomaly-explorer.png) + +#### Special Considerations for the Nesso N1 + +The Nesso N1's integrated BMI270 IMU has high sensitivity and low noise, which requires some adjustments to the typical training approach: + +1. **Gravity Compensation**: The BMI270 always measures 1g acceleration due to gravity. Make sure your training data includes the device in its intended mounting orientation. + +2. **Micro-vibration Sensitivity**: The IMU can detect very small vibrations. Collect `idle` data in a truly vibration-free environment, or the model may struggle to distinguish idle from nominal states. + +3. **Data Collection Duration**: Due to the sensor's stability, you may need only 5 to 10 minutes each of idle and nominal data rather than the 10 to 15 minutes suggested for analog sensors. + +4. **Threshold Calibration**: After deployment, expect to adjust the anomaly threshold based on your specific motor and environment. Start with a threshold of 2.0 and adjust based on false positive/negative rates. + +***__Important note__: If the model consistently misclassifies idle as nominal, the IMU may be detecting ambient vibrations or electrical noise. Consider adding a magnitude-based override in your Arduino code to force `idle` classification when vibration levels are below a certain threshold (typically 0.02g variation from baseline).*** + +#### Model Validation and Testing + +After training completion, validate both model performances using the following methods: + +- **Live Classification**: Use the "Live classification" feature with data collected directly from the Nesso N1 +- **Classification Performance**: Verify >95% accuracy for `idle`/`nominal` distinction +- **Anomaly Score Range**: Confirm anomaly scores stay below 2.0 for normal operation +- **Edge Cases**: Test with motor at different speeds and loads +- **Environmental Testing**: Verify performance with ambient vibrations present + +![Model validation on Edge Impulse Studio](assets/model-validation.png) + +### Model Deployment + +After successful training and validation, deploy the model as an Arduino library: + +1. **Deployment Section**: Navigate to the "Deployment" tab in Edge Impulse Studio +2. **Arduino Library**: Select "Arduino library" as the deployment target +3. **Optimization Settings**: Choose `int8` quantization for memory efficiency on the ESP32-C6 +4. **EON Compiler**: Enable "Enable EON Compiler" for optimized performance +5. **Download Library**: Download the generated Arduino library ZIP file +6. **Library Installation**: Install in Arduino IDE using "Sketch > Include Library > Add .ZIP Library" + +![Model deployment on Edge Impulse Studio](assets/model-deployment.png) + +The generated library is optimized for the Nesso N1's ESP32-C6 processor, providing efficient real-time inference with typical processing times under 20ms for both classification and anomaly detection. + +## Improving the Vibration Monitor with Machine Learning + +Now that we have trained our machine learning models, we can create a smart vibration monitor that automatically detects motor problems in real-time. + +The enhanced system does two things: it identifies whether the motor is running (nominal) or stopped (idle), and it alerts you when it detects unusual vibration patterns that might indicate a problem. This all happens directly on the Nesso N1 development kit without needing an internet connection. + +The smart monitoring system can do the following: + +- Tell if the motor is running (nominal) or stopped (idle) +- Detect unusual vibrations that might indicate problems +- Provide full-screen color-coded visual feedback for immediate status recognition +- Work continuously without needing internet or cloud services + +The complete enhanced example sketch is shown below: + +```arduino +/** + Intelligent Motor Anomaly Detection System + Name: motor_anomaly_detection_nesso.ino + Purpose: This sketch implements real-time motor anomaly detection using + the Nesso N1's integrated BMI270 IMU and Edge Impulse machine learning + model with full-screen visual feedback for predictive maintenance. + + @version 5.0 01/11/25 + @author Arduino Product Experience Team +*/ + +// Include the Edge Impulse library (name will match your project name) +#include + +// Include libraries for Nesso's IMU and display control +#include +#include + +// Display instance for the 1.14" touch screen +M5GFX display; + +// Data buffers for model inference +static float buffer[EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE] = { 0 }; +static float inference_buffer[EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE]; + +// Maximum accepted acceleration range (±2g) +#define MAX_ACCEPTED_RANGE 2.0f + +// Detection parameters +const float ANOMALY_THRESHOLD = 3.0f; // Threshold for anomaly detection +const float WARNING_THRESHOLD = 1.5f; // Warning zone threshold +const float IDLE_THRESHOLD = 0.02f; // Vibration threshold for idle detection + +// System status variables +int totalInferences = 0; +int anomalyCount = 0; +unsigned long lastInferenceTime = 0; +const unsigned long INFERENCE_INTERVAL = 2000; // Inference interval in milliseconds + +// Buffer management variables +bool bufferFilled = false; +int sampleCount = 0; + +// Current state tracking +String currentState = "INITIALIZING"; +bool currentAnomaly = false; + +// Function declarations +float ei_get_sign(float number); +int raw_feature_get_data(size_t offset, size_t length, float *out_ptr); +void runInference(); +void updateFullScreenDisplay(String state, bool anomaly); +float calculateVibrationLevel(); +void processResults(ei_impulse_result_t result, float vibration); + +/** + Initializes the IMU, display, and machine learning system. + Configures the Nesso N1 for optimal performance with the + Edge Impulse model and prepares for real-time anomaly detection. +*/ +void setup() { + // Initialize serial communication at 115200 baud + Serial.begin(115200); + while (!Serial && millis() < 3000); + + Serial.println("- Nesso N1 Motor Anomaly Monitor"); + + // Initialize the 1.14" touch display + display.begin(); + display.setRotation(1); // Set to landscape orientation + display.fillScreen(TFT_BLACK); + display.setTextSize(2); + display.setTextColor(TFT_WHITE, TFT_BLACK); + display.setTextDatum(MC_DATUM); + display.drawString("INITIALIZING...", display.width() / 2, display.height() / 2); + + // Initialize BMI270 IMU sensor + if (!IMU.begin()) { + Serial.println("- ERROR: Failed to initialize IMU!"); + display.fillScreen(TFT_RED); + display.setTextColor(TFT_WHITE, TFT_RED); + display.drawString("IMU FAILED!", display.width() / 2, display.height() / 2); + while (1); // Halt execution on IMU failure + } + + Serial.println("- BMI270 IMU initialized!"); + Serial.print("- Sample rate: "); + Serial.print(IMU.accelerationSampleRate()); + Serial.println(" Hz"); + + // Verify Edge Impulse model configuration + if (EI_CLASSIFIER_RAW_SAMPLES_PER_FRAME != 3) { + Serial.println("ERROR: EI_CLASSIFIER_RAW_SAMPLES_PER_FRAME should be 3"); + while (1); // Halt execution on configuration error + } + + Serial.println("\n- Edge Impulse Model loaded!"); + Serial.print("- Project: "); + Serial.println(EI_CLASSIFIER_PROJECT_NAME); + + Serial.println("\n- Filling buffer..."); + + // Display starting message while buffer fills + display.fillScreen(TFT_DARKGREY); + display.setTextColor(TFT_WHITE, TFT_DARKGREY); + display.drawString("STARTING...", display.width() / 2, display.height() / 2); + + delay(1000); +} + +/** + Main loop that continuously collects vibration data and performs + real-time classification and anomaly detection using the embedded + machine learning models. +*/ +void loop() { + // Calculate the next sampling tick for precise timing + uint64_t next_tick = micros() + (EI_CLASSIFIER_INTERVAL_MS * 1000); + + // Shift the buffer by 3 samples to create a rolling window + numpy::roll(buffer, EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE, -3); + + // Wait for new acceleration data from the IMU + float x, y, z; + while (!IMU.accelerationAvailable()) { + delayMicroseconds(10); + } + + // Read acceleration values (already in g units) + IMU.readAcceleration(x, y, z); + + // Store new data at the end of the buffer + buffer[EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE - 3] = x; + buffer[EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE - 2] = y; + buffer[EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE - 1] = z; + + // Clip acceleration values to the maximum accepted range + for (int i = 0; i < 3; i++) { + float* val = &buffer[EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE - 3 + i]; + if (fabs(*val) > MAX_ACCEPTED_RANGE) { + *val = ei_get_sign(*val) * MAX_ACCEPTED_RANGE; + } + } + + // Track buffer filling progress during initialization + if (!bufferFilled) { + sampleCount++; + if (sampleCount >= EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE / 3) { + bufferFilled = true; + Serial.println("- Buffer filled, starting monitoring...\n"); + } + } + + // Maintain precise sampling rate + uint64_t time_to_wait = next_tick - micros(); + if (time_to_wait > 0 && time_to_wait < 1000000) { + delayMicroseconds(time_to_wait); + } + + // Execute inference at the specified interval + if (bufferFilled && (millis() - lastInferenceTime >= INFERENCE_INTERVAL)) { + lastInferenceTime = millis(); + runInference(); + } +} + +/** + Executes the Edge Impulse inference on collected vibration data. + Processes the data through both classification and anomaly detection + models to determine motor state and detect unusual patterns. +*/ +void runInference() { + // Copy the current buffer for inference processing + memcpy(inference_buffer, buffer, EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE * sizeof(float)); + + // Calculate vibration level for additional state verification + float vibration = calculateVibrationLevel(); + + // Create signal structure for Edge Impulse + signal_t signal; + signal.total_length = EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE; + signal.get_data = &raw_feature_get_data; + + // Run the Edge Impulse classifier + ei_impulse_result_t result = { 0 }; + EI_IMPULSE_ERROR res = run_classifier(&signal, &result, false); + + if (res != EI_IMPULSE_OK) { + Serial.printf("- ERROR: Failed to run classifier (%d)!\n", res); + return; + } + + // Override classification if vibration indicates clear idle state + if (vibration < IDLE_THRESHOLD) { + for (size_t ix = 0; ix < EI_CLASSIFIER_LABEL_COUNT; ix++) { + if (strcmp(ei_classifier_inferencing_categories[ix], "idle") == 0) { + result.classification[ix].value = 0.99f; + } else { + result.classification[ix].value = 0.01f; + } + } + } + + // Process and display the inference results + processResults(result, vibration); +} + +/** + Processes inference results and updates the full-screen display. + Analyzes classification confidence and anomaly scores to determine + the current motor state and trigger appropriate visual feedback. +*/ +void processResults(ei_impulse_result_t result, float vibration) { + totalInferences++; + + // Find the classification with highest confidence + String bestLabel = "unknown"; + float bestValue = 0; + + Serial.printf("- Inference #%d\n", totalInferences); + + for (size_t ix = 0; ix < EI_CLASSIFIER_LABEL_COUNT; ix++) { + if (result.classification[ix].value > bestValue) { + bestValue = result.classification[ix].value; + bestLabel = String(ei_classifier_inferencing_categories[ix]); + } + } + + Serial.printf("- State: %s (%.0f%% confidence)\n", bestLabel.c_str(), bestValue * 100); + Serial.printf("- Vibration: %.4f g\n", vibration); + + // Evaluate anomaly detection results + bool isAnomaly = false; + +#if EI_CLASSIFIER_HAS_ANOMALY + float anomalyScore = result.anomaly; + Serial.printf("- Anomaly score: %.3f", anomalyScore); + + if (anomalyScore < WARNING_THRESHOLD) { + Serial.println(" [NORMAL]"); + } else if (anomalyScore < ANOMALY_THRESHOLD) { + Serial.println(" [WARNING]"); + } else { + Serial.println(" [ANOMALY!]"); + isAnomaly = true; + anomalyCount++; + } +#endif + + // Update display only when state or anomaly status changes + if (bestLabel != currentState || isAnomaly != currentAnomaly) { + currentState = bestLabel; + currentAnomaly = isAnomaly; + updateFullScreenDisplay(currentState, currentAnomaly); + } + + Serial.printf("- Timing: DSP %d ms, Classification %d ms\n\n", + result.timing.dsp, result.timing.classification); +} + +/** + Updates the full-screen display with color-coded motor status. + Provides immediate visual feedback using background colors: + Blue for idle, Green for nominal operation, Red for anomalies. +*/ +void updateFullScreenDisplay(String state, bool anomaly) { + uint16_t bgColor; + uint16_t textColor; + String displayText; + + if (anomaly) { + // Anomaly detected - Display red background with white text + bgColor = TFT_RED; + textColor = TFT_WHITE; + displayText = "ANOMALY"; + Serial.println(">>> Display: RED - ANOMALY"); + } else if (state == "idle") { + // Motor idle - Display blue background with white text + bgColor = TFT_BLUE; + textColor = TFT_WHITE; + displayText = "IDLE"; + Serial.println(">>> Display: BLUE - IDLE"); + } else if (state == "nominal") { + // Normal operation - Display green background with black text + bgColor = TFT_GREEN; + textColor = TFT_BLACK; + displayText = "NOMINAL"; + Serial.println(">>> Display: GREEN - NOMINAL"); + } else { + // Unknown state - Display grey background with white text + bgColor = TFT_DARKGREY; + textColor = TFT_WHITE; + displayText = "UNKNOWN"; + Serial.println(">>> Display: GREY - UNKNOWN"); + } + + // Fill entire screen with the status color + display.fillScreen(bgColor); + + // Configure text properties for centered display + display.setTextColor(textColor, bgColor); + display.setTextSize(3); + display.setTextDatum(MC_DATUM); + + // Draw the status text in the center of the screen + display.drawString(displayText, display.width() / 2, display.height() / 2); +} + +/** + Calculates the vibration level from collected acceleration data. + Removes gravity component and computes the average magnitude + of vibration across multiple samples. +*/ +float calculateVibrationLevel() { + float sum = 0; + int samples = min(30, EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE / 3); + + // Calculate vibration magnitude for each sample + for (int i = 0; i < samples; i++) { + float x = buffer[i * 3]; + float y = buffer[i * 3 + 1]; + float z = buffer[i * 3 + 2] - 1.0f; // Remove gravity component + sum += sqrt(x*x + y*y + z*z); + } + + return sum / samples; +} + +/** + Returns the sign of a number. + Used for clipping acceleration values to the maximum range. +*/ +float ei_get_sign(float number) { + return (number >= 0.0) ? 1.0 : -1.0; +} + +/** + Callback function for Edge Impulse library to access feature data. + Provides the machine learning model with vibration data in the + required format for inference processing. +*/ +int raw_feature_get_data(size_t offset, size_t length, float *out_ptr) { + memcpy(out_ptr, inference_buffer + offset, length * sizeof(float)); + return 0; +} +``` + +The following sections will help you understand the main components of the enhanced example sketch, which can be divided into the following areas: + +- Edge Impulse library integration +- Real-time data collection using the integrated IMU +- Machine learning inference execution +- Visual feedback system with full-screen color coding + +### Edge Impulse Library Integration and IMU Setup + +The enhanced sketch starts by including the Edge Impulse library and configuring the integrated BMI270 IMU sensor. + +```arduino +// Include the Edge Impulse library (name will match your project name) +#include + +// Include libraries for IMU and display control +#include +#include + +// Detection parameters +const float ANOMALY_THRESHOLD = 3.0f; // Adjusted for K-means clustering +const float IDLE_THRESHOLD = 0.02f; // Vibration threshold for idle detection + +// Data buffers for the models +static float buffer[EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE] = { 0 }; +static float inference_buffer[EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE]; +``` + +The library contains both the classification model (to identify if the motor is idle or running) and the anomaly detection model (to spot unusual vibrations). The integrated BMI270 IMU provides calibrated digital acceleration data directly in g units, eliminating the need for analog-to-digital conversion or manual calibration. + +### Machine Learning Inference Execution + +The system analyzes the collected vibration data using both machine learning models to determine motor state and detect anomalies. + +```arduino +/** + Executes the Edge Impulse inference on collected vibration data. + Processes the data through both classification and anomaly detection + models to determine motor state and detect unusual patterns. +*/ +void runInference() { + // Copy the current buffer for inference processing + memcpy(inference_buffer, buffer, EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE * sizeof(float)); + + // Calculate vibration level for additional state verification + float vibration = calculateVibrationLevel(); + + // Create signal structure for Edge Impulse + signal_t signal; + signal.total_length = EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE; + signal.get_data = &raw_feature_get_data; + + // Run the Edge Impulse classifier + ei_impulse_result_t result = { 0 }; + EI_IMPULSE_ERROR res = run_classifier(&signal, &result, false); + + if (res != EI_IMPULSE_OK) { + Serial.printf("- ERROR: Failed to run classifier (%d)!\n", res); + return; + } + + // Override classification if vibration indicates clear idle state + if (vibration < IDLE_THRESHOLD) { + for (size_t ix = 0; ix < EI_CLASSIFIER_LABEL_COUNT; ix++) { + if (strcmp(ei_classifier_inferencing_categories[ix], "idle") == 0) { + result.classification[ix].value = 0.99f; + } else { + result.classification[ix].value = 0.01f; + } + } + } + + // Process and display the inference results + processResults(result, vibration); +} +``` + +This function performs the complete inference pipeline. It first copies the rolling buffer data, calculates the current vibration level, and then runs the Edge Impulse classifier. If the vibration level is very low (below 0.02g), it overrides the classification to force an "idle" state, which helps compensate for the high sensitivity of the BMI270 IMU. + +### Processing Results and Anomaly Detection + +After inference, the system processes the results to determine the motor state and check for anomalies: + +```arduino +/** + Processes inference results and updates the full-screen display. + Analyzes classification confidence and anomaly scores to determine + the current motor state and trigger appropriate visual feedback. +*/ +void processResults(ei_impulse_result_t result, float vibration) { + totalInferences++; + + // Find the classification with highest confidence + String bestLabel = "unknown"; + float bestValue = 0; + + for (size_t ix = 0; ix < EI_CLASSIFIER_LABEL_COUNT; ix++) { + if (result.classification[ix].value > bestValue) { + bestValue = result.classification[ix].value; + bestLabel = String(ei_classifier_inferencing_categories[ix]); + } + } + + // Evaluate anomaly detection results + bool isAnomaly = false; + +#if EI_CLASSIFIER_HAS_ANOMALY + float anomalyScore = result.anomaly; + + if (anomalyScore > ANOMALY_THRESHOLD) { + isAnomaly = true; + anomalyCount++; + } +#endif + + // Update display only when state changes + if (bestLabel != currentState || isAnomaly != currentAnomaly) { + currentState = bestLabel; + currentAnomaly = isAnomaly; + updateFullScreenDisplay(currentState, currentAnomaly); + } +} +``` + +This function analyzes the inference results to find the most likely motor state (idle or nominal) and checks if the anomaly score exceeds the threshold. It only updates the display when the state actually changes, avoiding unnecessary screen refreshes. + +### Visual Feedback System + +The Nesso N1's display provides immediate visual feedback using full-screen color coding: + +```arduino +/** + Updates the full-screen display with color-coded motor status. + Provides immediate visual feedback using background colors: + Blue for idle, Green for nominal operation, Red for anomalies. +*/ +void updateFullScreenDisplay(String state, bool anomaly) { + uint16_t bgColor; + uint16_t textColor; + String displayText; + + if (anomaly) { + bgColor = TFT_RED; + textColor = TFT_WHITE; + displayText = "ANOMALY"; + } else if (state == "idle") { + bgColor = TFT_BLUE; + textColor = TFT_WHITE; + displayText = "IDLE"; + } else if (state == "nominal") { + bgColor = TFT_GREEN; + textColor = TFT_BLACK; + displayText = "NOMINAL"; + } + + display.fillScreen(bgColor); + display.setTextColor(textColor, bgColor); + display.setTextSize(3); + display.setTextDatum(MC_DATUM); + display.drawString(displayText, display.width() / 2, display.height() / 2); +} +``` + +This function creates a clear, unmistakable visual indication of the motor status that can be seen from across a room. After uploading the enhanced sketch to the Nesso N1 development kit, the display will show real-time motor status with color-coded feedback: + +- **Blue screen with "IDLE"**: Motor is stopped +- **Green screen with "NOMINAL"**: Motor is running normally +- **Red screen with "ANOMALY"**: Unusual vibration pattern detected + +![Visual indication of the motor status on the Nesso N1's display](assets/visual-indication.png) + +The IDE's Serial Monitor also provides detailed information including classification confidence, anomaly scores, and timing metrics for debugging and performance monitoring. + +### Complete Enhanced Example Sketch + +The complete intelligent motor anomaly detection sketch can be downloaded [here](assets/motor_anomaly_detection_nesso.zip). + +[![ ](assets/download-button.png)](assets/motor_anomaly_detection_nesso.zip) + +### System Integration Considerations + +When deploying the intelligent anomaly detection system in industrial environments, consider the following factors based on your sensor choice: + +- **Environmental Protection**: Protect the Nano R4 board and accelerometer from dust, moisture and temperature extremes using appropriate enclosures rated for the operating environment. +- **Mounting Stability**: Make sure secure mechanical mounting of both the accelerometer sensor and the Nano R4 enclosure to prevent sensor movement that could affect measurement accuracy. +- **Power Management**: Implement appropriate power supply filtering and protection circuits, especially in electrically noisy industrial environments with motor drives and switching equipment. +- **Calibration Procedures**: Establish baseline measurements for each motor installation to account for mounting variations and motor-specific characteristics that may affect anomaly thresholds. +- **Maintenance Integration**: Plan integration with existing maintenance management systems through data logging interfaces or communication protocols for complete predictive maintenance programs. + +## Arduino IoT Cloud Integration + +The motor anomaly detection system can be extended with remote monitoring capabilities through [Arduino Cloud](https://cloud.arduino.cc/), enabling real-time status visualization from anywhere with internet connectivity. This integration maintains all local functionality while adding cloud-based dashboard indicators for remote monitoring. + +***__Important Note__: The Arduino Cloud integration requires the `ArduinoIoTCloud` library and the ESP32 boards core. Install the ESP32 boards core through the Arduino IDE Boards Manager by searching for and installing "esp32" by Espressif Systems. For the `ArduinoIoTCloud` library, use the IDE's Library Manager to search and install `ArduinoIoTCloud` by Arduino, accepting all dependencies when prompted.*** + +### Cloud Architecture Overview + +The cloud integration implements a three-state monitoring system using `boolean` variables that mirror the local display states. Each state (`idle`, `nominal`, and `anomaly`) is represented by an exclusive boolean indicator on the Arduino Cloud dashboard, guaranteeing clear and immediate visual feedback for remote operators. + +The system maintains bidirectional synchronization between the Nesso N1 development kit and the Arduino Cloud platform, updating dashboard widgets in real-time as motor conditions change. This architecture complement remote monitoring capabilities rather than replace local visualization, providing redundancy and flexibility in deployment scenarios. + +### Setting Up Arduino Cloud Components + +**A. Create Device** + +Begin by establishing the device identity in the Arduino Cloud platform: + +1. Navigate to the [Arduino Cloud "**Devices**" page](https://app.arduino.cc/devices) +2. Click the **+ CREATE** button in the top right corner +3. Select "**Any device**" from the Setup Device dialog +4. Click **CONTINUE** to generate device credentials +5. Adjust the device name if desired (for example, "Nesso-Motor-Monitor") +6. Save the generated Device ID and Secret Key securely +7. Confirm credential storage and click "**CONTINUE**" + +**B. Create Thing** + +Configure the Thing to represent your motor monitoring system: + +1. Open the [Arduino Cloud "**Things**" page](https://app.arduino.cc/things) +2. Click "**+ THING**" to create a new Thing +3. Rename the Thing to "Motor_Anomaly_Monitor" using the dropdown menu +4. Add three Cloud Variables with the specifications shown below +5. Associate the Thing with your previously created Device using the "**Select Device**" button + +**Cloud variables to add:** + +| **Variable Name** | **Type** | **Permission** | **Update Policy** | +|:-----------------:|:--------:|:--------------:|:-----------------:| +| `idle` | Boolean | Read Only | On Change | +| `nominal` | Boolean | Read Only | On Change | +| `anomaly` | Boolean | Read Only | On Change | + +**C. Create Dashboard** + +Design the visual interface for remote monitoring: + +1. Access the [Arduino Cloud Dashboards page](https://app.arduino.cc/dashboards) +2. Click "**+ DASHBOARD**" to create a new dashboard +3. Rename the dashboard to "Motor Status Monitor" +4. Enter Edit mode and click "**ADD**" to add widgets +5. Select the "**THINGS**" tab and choose your Motor_Anomaly_Monitor Thing +6. Configure three STATUS widgets (idle in blue, nominal inn green, and anomaly in red) +7. Arrange widgets horizontally for optimal visibility +8. Click DONE to save the dashboard configuration + +### Complete Cloud-Enabled Sketch + +The complete enhanced example sketch with Arduino Cloud integration is shown below: + +```arduino +/** + Intelligent Motor Anomaly Detection System - Arduino Cloud Edition + Name: motor_anomaly_detection_cloud.ino + Purpose: This sketch implements real-time motor anomaly detection using + the Nesso N1's integrated BMI270 IMU and Edge Impulse machine learning + model with Arduino IoT Cloud integration for remote monitoring through + three boolean state indicators. + + @version 6.0 01/11/25 + @author Arduino Product Experience Team +*/ + +// Include Arduino Cloud configuration and connection handler +#include "thingProperties.h" + +// Include the Edge Impulse library (name will match your project name) +#include + +// Include libraries for Nesso's IMU and display control +#include +#include + +// Display instance for the 1.14" touch screen +M5GFX display; + +// Data buffers for model inference +static float buffer[EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE] = { 0 }; +static float inference_buffer[EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE]; + +// Maximum accepted acceleration range (±2g) +#define MAX_ACCEPTED_RANGE 2.0f + +// Detection parameters +const float ANOMALY_THRESHOLD = 3.0f; // Threshold for anomaly detection +const float WARNING_THRESHOLD = 1.5f; // Warning zone threshold +const float IDLE_THRESHOLD = 0.02f; // Vibration threshold for idle detection + +// System status variables +int totalInferences = 0; +int anomalyCount = 0; +unsigned long lastInferenceTime = 0; +const unsigned long INFERENCE_INTERVAL = 2000; // Inference interval in milliseconds + +// Buffer management variables +bool bufferFilled = false; +int sampleCount = 0; + +// Current state tracking +String currentState = "INITIALIZING"; +bool currentAnomaly = false; + +// Cloud connection status +bool cloudConnected = false; + +// Function declarations +float ei_get_sign(float number); +int raw_feature_get_data(size_t offset, size_t length, float *out_ptr); +void runInference(); +void updateFullScreenDisplay(String state, bool anomaly); +float calculateVibrationLevel(); +void processResults(ei_impulse_result_t result, float vibration); +void updateCloudStates(String state, bool isAnomaly); +void onCloudConnect(); +void onCloudDisconnect(); + +/** + Initializes the IMU, display, machine learning system, and Arduino Cloud. + Configures the Nesso N1 for optimal performance with the Edge Impulse model + and establishes connection to Arduino IoT Cloud for remote monitoring. +*/ +void setup() { + // Initialize serial communication at 115200 baud + Serial.begin(115200); + // Don't wait too long for Serial in case running standalone + unsigned long serialStart = millis(); + while (!Serial && millis() - serialStart < 3000); + + Serial.println("- Nesso N1 Motor Anomaly Monitor with Cloud"); + Serial.println("- Version 6.0 - Arduino IoT Cloud Integration"); + + // Initialize the 1.14" touch display + display.begin(); + display.setRotation(1); // Set to landscape orientation + display.fillScreen(TFT_BLACK); + display.setTextSize(2); + display.setTextColor(TFT_WHITE, TFT_BLACK); + display.setTextDatum(MC_DATUM); + display.drawString("CLOUD CONNECT", display.width() / 2, display.height() / 2); + + // Initialize Arduino Cloud properties defined in thingProperties.h + initProperties(); + + // Connect to Arduino IoT Cloud with preferred connection method + ArduinoCloud.begin(ArduinoIoTPreferredConnection); + ArduinoCloud.addCallback(ArduinoIoTCloudEvent::CONNECT, onCloudConnect); + ArduinoCloud.addCallback(ArduinoIoTCloudEvent::DISCONNECT, onCloudDisconnect); + + // Set debug message level for cloud connection troubleshooting + setDebugMessageLevel(2); + ArduinoCloud.printDebugInfo(); + + Serial.println("- Connecting to Arduino IoT Cloud..."); + + // Attempt cloud connection with 30 second timeout + unsigned long cloudStart = millis(); + while (!ArduinoCloud.connected() && millis() - cloudStart < 30000) { + ArduinoCloud.update(); + delay(100); + } + + if (ArduinoCloud.connected()) { + Serial.println("- Connected to Arduino IoT Cloud!"); + cloudConnected = true; + } else { + Serial.println("- Cloud connection timeout - continuing offline"); + cloudConnected = false; + } + + // Initialize all cloud state variables to false + idle = false; + nominal = false; + anomaly = false; + + // Update display for IMU initialization phase + display.fillScreen(TFT_BLACK); + display.drawString("INITIALIZING...", display.width() / 2, display.height() / 2); + + // Initialize BMI270 IMU sensor + if (!IMU.begin()) { + Serial.println("- ERROR: Failed to initialize IMU!"); + display.fillScreen(TFT_RED); + display.setTextColor(TFT_WHITE, TFT_RED); + display.drawString("IMU FAILED!", display.width() / 2, display.height() / 2); + while (1) { + ArduinoCloud.update(); // Keep cloud connection alive during error + delay(100); + } + } + + Serial.println("- BMI270 IMU initialized!"); + Serial.print("- Sample rate: "); + Serial.print(IMU.accelerationSampleRate()); + Serial.println(" Hz"); + + // Verify Edge Impulse model configuration + if (EI_CLASSIFIER_RAW_SAMPLES_PER_FRAME != 3) { + Serial.println("ERROR: EI_CLASSIFIER_RAW_SAMPLES_PER_FRAME should be 3"); + while (1) { + ArduinoCloud.update(); + delay(100); + } + } + + Serial.println("\n- Edge Impulse Model loaded!"); + Serial.print("- Project: "); + Serial.println(EI_CLASSIFIER_PROJECT_NAME); + + Serial.println("\n- Filling buffer..."); + + // Display starting message while buffer fills + display.fillScreen(TFT_DARKGREY); + display.setTextColor(TFT_WHITE, TFT_DARKGREY); + display.drawString("STARTING...", display.width() / 2, display.height() / 2); + + delay(1000); +} + +/** + Main loop that continuously collects vibration data, performs real-time + classification and anomaly detection, and updates both local display + and Arduino Cloud dashboard indicators. +*/ +void loop() { + // Update Arduino Cloud connection and synchronize variables + ArduinoCloud.update(); + + // Calculate the next sampling tick for precise timing + uint64_t next_tick = micros() + (EI_CLASSIFIER_INTERVAL_MS * 1000); + + // Shift the buffer by 3 samples to create a rolling window + numpy::roll(buffer, EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE, -3); + + // Wait for new acceleration data from the IMU + float x, y, z; + while (!IMU.accelerationAvailable()) { + delayMicroseconds(10); + } + + // Read acceleration values (already in g units) + IMU.readAcceleration(x, y, z); + + // Store new data at the end of the buffer + buffer[EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE - 3] = x; + buffer[EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE - 2] = y; + buffer[EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE - 1] = z; + + // Clip acceleration values to the maximum accepted range + for (int i = 0; i < 3; i++) { + float* val = &buffer[EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE - 3 + i]; + if (fabs(*val) > MAX_ACCEPTED_RANGE) { + *val = ei_get_sign(*val) * MAX_ACCEPTED_RANGE; + } + } + + // Track buffer filling progress during initialization + if (!bufferFilled) { + sampleCount++; + if (sampleCount >= EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE / 3) { + bufferFilled = true; + Serial.println("- Buffer filled, starting monitoring...\n"); + } + } + + // Maintain precise sampling rate + uint64_t time_to_wait = next_tick - micros(); + if (time_to_wait > 0 && time_to_wait < 1000000) { + delayMicroseconds(time_to_wait); + } + + // Execute inference at the specified interval + if (bufferFilled && (millis() - lastInferenceTime >= INFERENCE_INTERVAL)) { + lastInferenceTime = millis(); + runInference(); + } +} + +/** + Executes the Edge Impulse inference on collected vibration data. + Processes the data through both classification and anomaly detection + models to determine motor state and detect unusual patterns. +*/ +void runInference() { + // Copy the current buffer for inference processing + memcpy(inference_buffer, buffer, EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE * sizeof(float)); + + // Calculate vibration level for additional state verification + float vibration = calculateVibrationLevel(); + + // Create signal structure for Edge Impulse + signal_t signal; + signal.total_length = EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE; + signal.get_data = &raw_feature_get_data; + + // Run the Edge Impulse classifier + ei_impulse_result_t result = { 0 }; + EI_IMPULSE_ERROR res = run_classifier(&signal, &result, false); + + if (res != EI_IMPULSE_OK) { + Serial.printf("- ERROR: Failed to run classifier (%d)!\n", res); + return; + } + + // Override classification if vibration indicates clear idle state + if (vibration < IDLE_THRESHOLD) { + for (size_t ix = 0; ix < EI_CLASSIFIER_LABEL_COUNT; ix++) { + if (strcmp(ei_classifier_inferencing_categories[ix], "idle") == 0) { + result.classification[ix].value = 0.99f; + } else { + result.classification[ix].value = 0.01f; + } + } + } + + // Process and display the inference results + processResults(result, vibration); +} + +/** + Processes inference results and updates both the full-screen display + and Arduino Cloud dashboard. Analyzes classification confidence and + anomaly scores to determine the current motor state and trigger + appropriate visual feedback locally and remotely. +*/ +void processResults(ei_impulse_result_t result, float vibration) { + totalInferences++; + + // Find the classification with highest confidence + String bestLabel = "unknown"; + float bestValue = 0; + + Serial.printf("- Inference #%d", totalInferences); + if (cloudConnected) { + Serial.println(" [Cloud: Connected]"); + } else { + Serial.println(" [Cloud: Offline]"); + } + + for (size_t ix = 0; ix < EI_CLASSIFIER_LABEL_COUNT; ix++) { + if (result.classification[ix].value > bestValue) { + bestValue = result.classification[ix].value; + bestLabel = String(ei_classifier_inferencing_categories[ix]); + } + } + + Serial.printf("- State: %s (%.0f%% confidence)\n", bestLabel.c_str(), bestValue * 100); + Serial.printf("- Vibration: %.4f g\n", vibration); + + // Evaluate anomaly detection results + bool isAnomaly = false; + +#if EI_CLASSIFIER_HAS_ANOMALY + float anomalyScore = result.anomaly; + Serial.printf("- Anomaly score: %.3f", anomalyScore); + + if (anomalyScore < WARNING_THRESHOLD) { + Serial.println(" [NORMAL]"); + } else if (anomalyScore < ANOMALY_THRESHOLD) { + Serial.println(" [WARNING]"); + } else { + Serial.println(" [ANOMALY!]"); + isAnomaly = true; + anomalyCount++; + } +#endif + + // Update display and cloud only when state or anomaly status changes + if (bestLabel != currentState || isAnomaly != currentAnomaly) { + currentState = bestLabel; + currentAnomaly = isAnomaly; + updateFullScreenDisplay(currentState, currentAnomaly); + updateCloudStates(currentState, currentAnomaly); + } + + Serial.printf("- Timing: DSP %d ms, Classification %d ms\n\n", + result.timing.dsp, result.timing.classification); +} + +/** + Updates Arduino Cloud dashboard variables based on motor state. + Sets one of three boolean indicators (idle, nominal, anomaly) to true + while ensuring the others are false, providing exclusive state indication + for remote monitoring through the IoT Cloud dashboard. +*/ +void updateCloudStates(String state, bool isAnomaly) { + // Reset all state indicators to false + idle = false; + nominal = false; + anomaly = false; + + // Set the appropriate state indicator based on current condition + if (isAnomaly) { + anomaly = true; + Serial.println(">>> Cloud Update: ANOMALY = true"); + } else if (state == "idle") { + idle = true; + Serial.println(">>> Cloud Update: IDLE = true"); + } else if (state == "nominal") { + nominal = true; + Serial.println(">>> Cloud Update: NOMINAL = true"); + } + + // Force immediate cloud variable synchronization + ArduinoCloud.update(); +} + +/** + Updates the full-screen display with color-coded motor status. + Provides immediate visual feedback using background colors: + Blue for idle, Green for nominal operation, Red for anomalies. + Also displays cloud connection status in the corner. +*/ +void updateFullScreenDisplay(String state, bool isAnomaly) { + uint16_t bgColor; + uint16_t textColor; + String displayText; + + if (isAnomaly) { + // Anomaly detected - Display red background with white text + bgColor = TFT_RED; + textColor = TFT_WHITE; + displayText = "ANOMALY"; + Serial.println(">>> Display: RED - ANOMALY"); + } else if (state == "idle") { + // Motor idle - Display blue background with white text + bgColor = TFT_BLUE; + textColor = TFT_WHITE; + displayText = "IDLE"; + Serial.println(">>> Display: BLUE - IDLE"); + } else if (state == "nominal") { + // Normal operation - Display green background with black text + bgColor = TFT_GREEN; + textColor = TFT_BLACK; + displayText = "NOMINAL"; + Serial.println(">>> Display: GREEN - NOMINAL"); + } else { + // Unknown state - Display grey background with white text + bgColor = TFT_DARKGREY; + textColor = TFT_WHITE; + displayText = "UNKNOWN"; + Serial.println(">>> Display: GREY - UNKNOWN"); + } + + // Fill entire screen with the status color + display.fillScreen(bgColor); + + // Configure text properties for centered display + display.setTextColor(textColor, bgColor); + display.setTextSize(3); + display.setTextDatum(MC_DATUM); + + // Draw the status text in the center of the screen + display.drawString(displayText, display.width() / 2, display.height() / 2); + + // Add cloud connection status indicator in top-left corner + display.setTextSize(1); + display.setTextDatum(TL_DATUM); + if (cloudConnected) { + display.drawString("CLOUD: ON", 5, 5); + } else { + display.drawString("CLOUD: OFF", 5, 5); + } +} + +/** + Calculates the vibration level from collected acceleration data. + Removes gravity component and computes the average magnitude + of vibration across multiple samples for accurate state detection. +*/ +float calculateVibrationLevel() { + float sum = 0; + int samples = min(30, EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE / 3); + + // Calculate vibration magnitude for each sample + for (int i = 0; i < samples; i++) { + float x = buffer[i * 3]; + float y = buffer[i * 3 + 1]; + float z = buffer[i * 3 + 2] - 1.0f; // Remove gravity component + sum += sqrt(x*x + y*y + z*z); + } + + return sum / samples; +} + +/** + Callback function triggered when Arduino Cloud connection is established. + Updates the cloud connection status and synchronizes the current motor + state with the cloud dashboard for immediate remote visibility. +*/ +void onCloudConnect() { + cloudConnected = true; + Serial.println(">>> Arduino IoT Cloud CONNECTED"); + + // Synchronize current state with cloud dashboard on connection + updateCloudStates(currentState, currentAnomaly); +} + +/** + Callback function triggered when Arduino Cloud connection is lost. + Updates the connection status to allow the system to continue + operating in offline mode while attempting reconnection. +*/ +void onCloudDisconnect() { + cloudConnected = false; + Serial.println(">>> Arduino IoT Cloud DISCONNECTED"); +} + +/** + Returns the sign of a number. + Used for clipping acceleration values to the maximum range. +*/ +float ei_get_sign(float number) { + return (number >= 0.0) ? 1.0 : -1.0; +} + +/** + Callback function for Edge Impulse library to access feature data. + Provides the machine learning model with vibration data in the + required format for inference processing. +*/ +int raw_feature_get_data(size_t offset, size_t length, float *out_ptr) { + memcpy(out_ptr, inference_buffer + offset, length * sizeof(float)); + return 0; +} +``` + +The cloud-enabled sketch extends the original motor anomaly detection code with Arduino Cloud integration. The implementation requires two primary files: the main sketch and two supporting configuration files. + +### Supporting Configuration Files + +#### Thing Properties Configuration + +Create a `thingProperties.h` file in the Arduino IDE in a new tab (Ctrl + Shift + N) to define cloud variables and connection parameters: + +```arduino +/** + Arduino IoT Cloud Thing Properties Configuration + Defines cloud variables and connection settings for remote monitoring +*/ + +#include +#include "arduino_secrets.h" + +// Cloud dashboard state indicators +bool idle; // Motor in idle state +bool nominal; // Normal operation +bool anomaly; // Anomaly detected + +void initProperties() { + // Register state variables + ArduinoCloud.addProperty(idle, READ, ON_CHANGE, NULL); + ArduinoCloud.addProperty(nominal, READ, ON_CHANGE, NULL); + ArduinoCloud.addProperty(anomaly, READ, ON_CHANGE, NULL); + + ArduinoCloud.setBoardId(SECRET_DEVICE_ID); + ArduinoCloud.setSecretDeviceKey(SECRET_DEVICE_KEY); +} + +// Network connection handler +WiFiConnectionHandler ArduinoIoTPreferredConnection(SECRET_WIFI_SSID, SECRET_WIFI_PASS); +``` + +#### Arduino Secrets Configuration + +Create an `arduino_secrets.h` file in the Arduino IDE in a new tab (Ctrl + Shift + N) to store sensitive credentials (created and stored before): + +```arduino +// Credentials for your Wi-Fi access point. +#define SECRET_WIFI_SSID "your-wifi-network-name" +#define SECRET_WIFI_PASS "your-wifi-password" + +// Device ID is not actually secret, but is defined alongside the secret key for convenience. +#define SECRET_DEVICE_ID "your-device-secret-id" +#define SECRET_DEVICE_KEY "your-device-secret-key" +``` + +### Cloud Integration Implementation + +The cloud-enabled sketch version maintains all original functionality while adding remote monitoring capabilities. Key modifications include the following: + +#### Initialization Enhancements + +The setup function now initializes cloud connectivity before starting motor monitoring: + +```arduino +void setup() { + // Initialize display with cloud connection status + display.drawString("CLOUD CONNECT", display.width() / 2, display.height() / 2); + + // Initialize Arduino Cloud + initProperties(); + ArduinoCloud.begin(ArduinoIoTPreferredConnection); + ArduinoCloud.addCallback(ArduinoIoTCloudEvent::CONNECT, onCloudConnect); + ArduinoCloud.addCallback(ArduinoIoTCloudEvent::DISCONNECT, onCloudDisconnect); + + // Attempt connection with timeout + unsigned long cloudStart = millis(); + while (!ArduinoCloud.connected() && millis() - cloudStart < 30000) { + ArduinoCloud.update(); + delay(100); + } + + // Continue with IMU and model initialization... +} +``` + +#### State Synchronization + +The system updates cloud variables whenever the motor state changes: + +```arduino +void updateCloudStates(String state, bool isAnomaly) { + // Reset all indicators + idle = false; + nominal = false; + anomaly = false; + + // Set appropriate state + if (isAnomaly) { + anomaly = true; + } else if (state == "idle") { + idle = true; + } else if (state == "nominal") { + nominal = true; + } + + // Force cloud synchronization + ArduinoCloud.update(); +} +``` + +#### Connection Management + +Callback functions handle cloud connection events: + +```arduino +void onCloudConnect() { + cloudConnected = true; + Serial.println(">>> Arduino IoT Cloud CONNECTED"); + updateCloudStates(currentState, currentAnomaly); +} + +void onCloudDisconnect() { + cloudConnected = false; + Serial.println(">>> Arduino IoT Cloud DISCONNECTED"); +} +``` + +#### Monitoring and Operation + +Once deployed, the system provides dual monitoring capabilities: + +**Local Display**: + +The Nesso N1's display continues to show real-time status with color-coded backgrounds: +- **Blue**: Motor idle (no vibration detected) +- **Green**: Nominal operation (normal vibration patterns) +- **Red**: Anomaly detected (abnormal vibration patterns) + +Also, a small indicator in the corner of the Nesso N1's display shows cloud connection status ("CLOUD: ON" or "CLOUD: OFF"). + +![Visual indication of the motor status on the Nesso N1's display with Arduino Cloud Integration](assets/visual-indication-cloud.png) + +**Remote Dashboard**: + +The Arduino Cloud dashboard displays three STATUS widgets that mirror the local display state. Only one STATUS wiget is active at any time, providing clear status indication for remote monitoring. The system maintains full offline functionality, automatically reconnecting to the cloud when network connectivity is restored. + +![Arduino Cloud dashboard for the Nesso N1 motor anomaly detection monitor](assets/dashboard.gif) + +This cloud integration transforms the motor anomaly detection system into an EdgeAIoT solution, enabling predictive maintenance teams to monitor multiple motors remotely while maintaining the reliability and responsiveness of local edge computing. + +### Complete Enhanced Example Sketch + +The complete intelligent motor anomaly detection sketch with Arduino Cloud integration can be downloaded [here](assets/motor_anomaly_detection_cloud.zip). + +[![ ](assets/download-button.png)](assets/motor_anomaly_detection_cloud.zip) + +## Conclusions + +This application note demonstrates how to implement motor anomaly detection using the Nesso N1 development kit, combining Edge Impulse machine learning with Arduino Cloud for industrial predictive maintenance applications. + +The solution uses the Nesso N1's ESP32-S3 dual-core processor to perform real-time anomaly detection directly on-device with inference times under 20 milliseconds, while Arduino Cloud integration enables remote monitoring without compromising edge processing performance. +The unsupervised K-means clustering approach requires only normal operation data for training, making it practical for industrial deployment where fault data may be scarce. This methodology effectively detects previously unseen fault conditions that deviate from established normal patterns. + +The dual-mode architecture, featuring edge processing with cloud connectivity, provides system resilience through continued operation during network interruptions, while also offering remote monitoring capabilities when connected. Visual feedback through both local display and cloud dashboard widgets delivers intuitive status indication for operators and remote maintenance teams.s + + +## Next Steps + +Building upon this foundation, several enhancements can further improve the motor anomaly detection system: + +- **Multi-Sensor Fusion**: Integrate additional sensors such as temperature, current or acoustic sensors to provide a more complete view of motor health and improve detection accuracy. The onboard IMU's built-in gyroscope can provide additional motion analysis capabilities. +- **Wireless Communication**: Add wireless connectivity using the onboard LoRa module to enable remote monitoring and integration with existing plant systems. +- **Advanced Analysis**: Implement data logging for trend analysis, industrial protocol integration for SCADA systems or multi-class fault classification to distinguish between different types of motor problems. + +The foundation provided in this application note enables rapid development of custom motor monitoring solutions tailored to specific industrial requirements, with the flexibility to choose the sensor option that best fits your application needs. \ No newline at end of file diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/antenna-mounted.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/antenna-mounted.png new file mode 100644 index 0000000000..a086921df4 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/antenna-mounted.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/antenna-storage-removable.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/antenna-storage-removable.png new file mode 100644 index 0000000000..ab8fe6db1b Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/antenna-storage-removable.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/bmi_accel.gif b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/bmi_accel.gif new file mode 100644 index 0000000000..203c259812 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/bmi_accel.gif differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/bmi_gyro.gif b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/bmi_gyro.gif new file mode 100644 index 0000000000..2e5803dde7 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/bmi_gyro.gif differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/board-manager.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/board-manager.png new file mode 100644 index 0000000000..7b206d2647 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/board-manager.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/built-in-led.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/built-in-led.png new file mode 100644 index 0000000000..27923062c9 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/built-in-led.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/display-example-1.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/display-example-1.png new file mode 100644 index 0000000000..a96c5d7d2c Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/display-example-1.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/display-example-2.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/display-example-2.png new file mode 100644 index 0000000000..7b8bf3484b Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/display-example-2.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/display-example-3.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/display-example-3.png new file mode 100644 index 0000000000..89d5db3ebd Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/display-example-3.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/expansion-port.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/expansion-port.png new file mode 100644 index 0000000000..3bd0e2775f Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/expansion-port.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/grove-connector.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/grove-connector.png new file mode 100644 index 0000000000..1ecc9768ca Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/grove-connector.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/hero-banner.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/hero-banner.png new file mode 100644 index 0000000000..b8d86041ec Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/hero-banner.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/lora-antenna.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/lora-antenna.png new file mode 100644 index 0000000000..a5376bcc3e Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/lora-antenna.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/modulino.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/modulino.png new file mode 100644 index 0000000000..f916c80d89 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/modulino.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/power-button.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/power-button.png new file mode 100644 index 0000000000..fcf8922c0a Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/power-button.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/programmable-buttons.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/programmable-buttons.png new file mode 100644 index 0000000000..e38a71702c Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/programmable-buttons.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/qwiic-connector.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/qwiic-connector.png new file mode 100644 index 0000000000..5a5caabd87 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/qwiic-connector.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/simple-pinout.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/simple-pinout.png new file mode 100644 index 0000000000..3ae3dcbbb8 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/simple-pinout.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/unboxing.png b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/unboxing.png new file mode 100644 index 0000000000..3dfcc627e1 Binary files /dev/null and b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/assets/unboxing.png differ diff --git a/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/content.md b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/content.md new file mode 100644 index 0000000000..19f2957677 --- /dev/null +++ b/content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/content.md @@ -0,0 +1,1484 @@ +--- +title: 'Nesso N1 User Manual' +difficulty: beginner +compatible-products: [nesso-n1] +description: 'Learn how to set up and use the Arduino Nesso N1, a ready to use IoT development board.' +tags: + - User Manual + - Cheat sheet + - ESP32-C6 + - Bluetooth® + - Wi-Fi® 6 + - LoRa® + - Thread + - Zigbee® + - Matter +author: 'Ernesto Voltaggio' +hardware: + - hardware/09.kits/maker/nesso-n1 +software: + - ide-v1 + - ide-v2 + - iot-cloud +--- + +The **Arduino® Nesso N1** is an all-in-one enclosed development board. Based on the ESP32-C6 System on Chip (SoC), it integrates a suite of communication protocols, including 2.4 GHz Wi-Fi® 6, Bluetooth® 5.3 LE, 802.15.4 (Thread/Zigbee®), and long-range LoRa®. It also includes a 1.14" color touchscreen, buttons, and a built-in LiPo battery for immediate user interaction in portable applications. + +This document serves as a comprehensive user manual for the Nesso N1, providing technical specifications, set up guides, and detailed explanations of its features to help you bring your projects to life. + +![ ](assets/hero-banner.png) + +## Hardware and Software Requirements + +### Hardware Requirements + +- [Nesso N1](https://store.arduino.cc/products/nesso-n1) (x1) +- [USB-C® cable](https://store.arduino.cc/products/usb-cable2in1-type-c) (x1) + +### Software Requirements + +- [Arduino IDE](https://www.arduino.cc/en/software) (v2.0 or higher recommended) +- [ESP32 Boards core by Espressif](https://github.com/espressif/arduino-esp32) (v3.3.3 or higher) + +*Note: Safe battery management requires version 3.3.5 or higher (pending release).* + +## Product Overview + +The Nesso N1 packs a rich set of features into a compact and portable form factor. It includes an integrated color touchscreen, multiple sensors, programmable buttons, and extensive expansion options, all powered by a rechargeable LiPo battery with power management. + +### Product Architecture + +- **ESP32-C6 SoC**: A powerful single-core RISC-V microcontroller with integrated Wi-Fi® 6, Bluetooth® 5.3 LE, and an 802.15.4 radio supporting Thread and Zigbee® for low-power mesh networking. +- **SX1262 LoRa® Module**: A long-range, low-power LoRa® transceiver for communication in remote or challenging environments. +- **1.14" Color Touchscreen**: An intuitive IPS display for user interaction and data visualization. +- **BMI270 IMU**: A 6-axis Inertial Measurement Unit for precise motion and orientation sensing. +- **Rechargeable Battery**: A built-in 250 mAh LiPo battery with a sophisticated power management system for portable applications. +- **Expansion Connectors**: Standard Grove and Qwiic interfaces, plus an 8-pin port compatible with the M5StickC HAT series for easy hardware expansion. +- **Onboard Peripherals**: Includes an infrared (IR) transmitter, a buzzer for audio feedback, a built-in LED, and two programmable user buttons. + +### Pinout + +![Arduino Nesso N1 Pinout](assets/simple-pinout.png) + +The full pinout is available and downloadable as a PDF from the link below: + +- [Nesso N1 pinout](../../downloads/TPX00227-full-pinout.pdf) + +### Datasheet + +The full datasheet is available as a downloadable PDF from the link below: + +- [Nesso N1 datasheet](/resources/datasheets/TPX00227-datasheet.pdf) + + +## Installation + +The Nesso N1 is programmed using the desktop Arduino IDE. To get started, you will need to install the appropriate board package. + +### Arduino IDE + +To use the board in the Arduino IDE, you must install the latest version of the **esp32 by Espressif Systems** package. Support for the Nesso N1 requires version **3.3.3** or newer. + +1. Open the Arduino IDE. +2. Navigate to **Boards Manager** (**Tools > Board > Boards Manager...**). +3. Search for **"esp32"** and find the package by **Espressif Systems**. +4. Click the **Install** (or **Update**) button. +5. Once installed, select **Arduino Nesso N1** from the **Tools > Board > esp32** menu. + +![Installing the esp32 Boards core in the Arduino IDE](assets/board-manager.png) + +### Arduino Cloud Editor + +Direct support for the Nesso N1 in the **Arduino Cloud Editor** (the online web IDE) is coming soon. Currently, the Cloud Editor does not support the specific ESP32 core version required for this board. + +Please use the **Arduino IDE** (desktop version) to compile and upload code to the Nesso N1. + +## Arduino IoT Cloud + +Although the Nesso N1 cannot yet be programmed directly via the Cloud Editor, you can still use it with **Arduino IoT Cloud** dashboards and variables. This is done by configuring it as a "Manual Device" and uploading the sketch from your desktop IDE. + +Follow these steps to connect your Nesso N1 to the Cloud. + +### 1. Create a Manual Device + +1. Go to the [Arduino IoT Cloud Devices page](https://app.arduino.cc/devices). +2. Click **+ DEVICE**. +3. Select **Any Device** (under Manual Setup). +4. Click **Continue**. +5. Name your device (e.g., "MyNessoN1") and confirm. +6. **Important:** A screen will appear with your **Device ID** and **Secret Key**. Save these credentials in a secure place immediately; you will not be able to view the Secret Key again. +7. **Check the box** confirming you have saved your credentials and click **Continue**. + +### 2. Create a Thing + +1. Go to the [Things page](https://app.arduino.cc/things). +2. Click **+ THING** to create a new Thing. +3. Click **Select Device** and associate it with the "Manual Device" you just created. +4. Click **ADD** in Cloud Variables section to create a test variable: **Name**: `led`, **Type**: Boolean, **Permission**: Read & Write, **Update Policy**: On Change. +5. Click **Add Variable** to confirm. + +### 3. Create a Dashboard + +1. Go to the [Dashboards page](https://app.arduino.cc/dashboards). +2. Click **+ DASHBOARD** and click **EDIT**. +3. Click **ADD** and select the **Things** tab. +4. Select your Thing and create a widget for the `led` variable (a Switch widget is recommended). +5. Click **DONE**. + +### 4. Program the Board via Desktop IDE + +Because "Manual Devices" do not automatically generate a downloadable sketch, you must create one manually. + +1. Open the **Arduino IDE** on your computer. +2. Install the **ArduinoIoTCloud** library via the Library Manager (**Tools > Manage Libraries...**). +3. Create a new sketch (**File > New Sketch**). +4. To keep your credentials secure, create a new tab named `arduino_secrets.h` (click the 3-dot icon near the tab bar > **New Tab**). +5. Paste the following code into `arduino_secrets.h` and fill in your details: + + ```cpp + #define SECRET_WIFI_SSID "YOUR_WIFI_SSID" + #define SECRET_WIFI_PASS "YOUR_WIFI_PASSWORD" + #define SECRET_DEVICE_ID "YOUR_DEVICE_ID" // From Step 1 + #define SECRET_DEVICE_KEY "YOUR_SECRET_KEY" // From Step 1 + ``` + +6. Create another new tab named `thingProperties.h` and paste the following configuration code: + + ```cpp + #include + #include + #include "arduino_secrets.h" + + void onLedChange(); + + bool led; + + WiFiConnectionHandler ArduinoIoTPreferredConnection(SECRET_WIFI_SSID, SECRET_WIFI_PASS); + + void initProperties(){ + ArduinoCloud.addProperty(led, Permission::ReadWrite).onUpdate(onLedChange); + + ArduinoCloud.setBoardId(SECRET_DEVICE_ID); + ArduinoCloud.setSecretDeviceKey(SECRET_DEVICE_KEY); + } + ``` + +7. Finally, paste the main application code into your `.ino` file: + + ```cpp + #include "thingProperties.h" + + void setup() { + Serial.begin(115200); + delay(1500); // Wait for Serial Monitor + + // Initialize the Nesso N1 built-in LED + pinMode(LED_BUILTIN, OUTPUT); + + // Initialize Cloud properties and connection + initProperties(); + ArduinoCloud.begin(ArduinoIoTPreferredConnection); + + // Set debug level to see connection status in Serial Monitor + setDebugMessageLevel(2); + ArduinoCloud.printDebugInfo(); + } + + void loop() { + ArduinoCloud.update(); + } + + // This function is called whenever the 'led' variable changes in the Cloud + void onLedChange() { + // The Nesso N1 LED uses inverted logic (LOW is ON) + if (led) { + digitalWrite(LED_BUILTIN, LOW); + } else { + digitalWrite(LED_BUILTIN, HIGH); + } + } + ``` + +8. Select **Arduino Nesso N1** as your board and upload the sketch. +9. Open the **Serial Monitor** to verify the connection. Once connected, you can toggle the switch on your Cloud Dashboard to control the LED on the board. + +## First Use + +### Unboxing the Product + +When opening the Nesso N1 box, you will find the device and a hexagon key. The device comes pre-assembled in a sleek enclosure. + +![Nesso N1 form factor](assets/unboxing.png) + +The detachable LoRa® antenna is conveniently stored in a compartment on the back of the device. You can slide it out to connect it to the MMCX connector for long-range communication. + +![Nesso N1 LoRa® antenna](assets/lora-antenna.png) + +For projects where a slimmer profile is desired, the included hexagon key can be used to remove the antenna storage compartment, making the device thinner. + +![Removable Antenna Storage](assets/antenna-storage-removable.png) + +***The Nesso N1 does not include a USB-C® cable, which is required to connect the board to your computer. A compatible cable is [available separately here](https://store.arduino.cc/products/usb-cable2in1-type-c).*** + +## Power Supply + +The Nesso N1 can be powered in three ways: + +- **USB-C® Connector**: Provide a regulated 5 V DC supply through the USB-C® port. This method also charges the internal battery. +- **Built-in Battery**: The onboard 250 mAh LiPo battery allows the device to operate untethered. **(Note: Please see the Battery section below for critical safety information regarding battery usage with the current software version.)** +- **VIN Pin**: You can use the `VIN` pin on the 8-pin expansion header to power the board from an external 5 V DC source. + +***WARNING: Handle the internal LiPo battery with care. Do not puncture, short-circuit, or expose it to high temperatures.*** + +## Battery Management + +The board incorporates a power management system featuring the **AW32001** power path management chip and the **BQ27220** battery monitoring chip. + +### ⚠️ CRITICAL WARNING: Battery Software Support Pending + +Full support for the Nesso N1 battery management system (BMS) requires the **esp32** board package version **3.3.5** (or newer), which is currently pending release. + +**Do not attempt to enable battery charging with the current board package (version 3.3.4 or older).** + +Allowing the battery to fully deplete while using the current software may cause the device to become unresponsive and fail to power on, even when connected to USB. + +**Recommendation:** +* **Power the device exclusively via USB-C** until the software update is available. +* **Do not** call `battery.enableCharge()` in your sketches. + +Once the updated board package is released, this manual will be updated with instructions for safe battery management. + +## Microcontroller (ESP32-C6) + +At the core of the Nesso N1 is the **ESP32-C6**, a highly integrated SoC from Espressif. + +### Key Features + +- **CPU**: Single-core 32-bit RISC-V, up to 160 MHz. +- **Memory (on-chip)**: 512 kB SRAM. +- **Memory (external)**: 16 MB Flash. + +The ESP32-C6 features a comprehensive set of connectivity options: + +- 2.4 GHz Wi-Fi® 6 (802.11ax). +- Bluetooth® 5.3 Low Energy. +- 802.15.4 radio for Thread and Zigbee® protocols. +- Support for the Matter protocol. + +***WARNING: All GPIO pins are 3.3 V logic only and are not 5 V tolerant.*** + +## Pins + +The Nesso N1 exposes a variety of pins for interacting with internal and external hardware. Some pins are connected directly to the ESP32-C6, while others are managed by two PI4IOE5V6408 I/O expanders to provide additional functionality. + +### Direct ESP32-C6 Pins + +These pins are directly controlled by the main microcontroller. + +| Pin Name | GPIO | Function | +| :----------- | :--- | :----------------------------------------- | +| `SDA` | 10 | I2C Data | +| `SCL` | 8 | I2C Clock | +| `MOSI` | 21 | SPI Master Out Slave In | +| `MISO` | 22 | SPI Master In Slave Out | +| `SCK` | 20 | SPI Serial Clock | +| `IR_TX_PIN` | 9 | Infrared Transmitter Output | +| `BEEP_PIN` | 11 | Buzzer Output | +| `GROVE_IO_0` | 5 | Grove Connector I/O | +| `GROVE_IO_1` | 4 | Grove Connector I/O | +| `LORA_IRQ` | 15 | LoRa® Module Interrupt Request | +| `LORA_CS` | 23 | LoRa® Module Chip Select (SPI) | +| `LORA_BUSY` | 19 | LoRa® Module Busy Indicator | +| `SYS_IRQ` | 3 | System Interrupt (from IMU & I/O expander) | +| `LCD_CS` | 17 | LCD Chip Select (SPI) | +| `LCD_RS` | 16 | LCD Register Select | +| `D1` | 7 | 8-pin Header Digital I/O | +| `D2` | 2 | 8-pin Header Digital I/O | +| `D3` | 6 | 8-pin Header Digital I/O | + +### I/O Expander Pins + +The Nesso N1 uses two PI4IOE5V6408 I/O expanders (addresses `0x43` and `0x44`) to manage additional pins over the I2C bus. These pins are accessed in code using special `ExpanderPin` objects, which are pre-defined as part of the Nesso N1 board package. You do not need to include any extra libraries to use them. + +| Pin Object | Expander Port | Function | +| :-------------------- | :------------ | :------------------------------- | +| `KEY1` | E0.P0 | Programmable Button 1 | +| `KEY2` | E0.P1 | Programmable Button 2 | +| `LORA_LNA_ENABLE` | E0.P5 | LoRa® Low-Noise Amplifier Enable | +| `LORA_ANTENNA_SWITCH` | E0.P6 | LoRa® RF Antenna Switch Control | +| `LORA_ENABLE` | E0.P7 | LoRa® Module Reset/Enable | +| `POWEROFF` | E1.P0 | System Power Off Control | +| `LCD_RESET` | E1.P1 | LCD Reset | +| `GROVE_POWER_EN` | E1.P2 | Grove Connector Power Enable | +| `VIN_DETECT` | E1.P5 | External Power (VIN) Detection | +| `LCD_BACKLIGHT` | E1.P6 | LCD Backlight Control | +| `LED_BUILTIN` | E1.P7 | Onboard Status LED (Green) | + + +The configuration of a digital pin is done in the `setup()` function with the `pinMode()` function: + +```arduino +// Pin configured as an input +pinMode(D1, INPUT); + +// Pin configured as an output +pinMode(D1, OUTPUT); + +// Pin configured as an input with internal pull-up resistor enabled +pinMode(D1, INPUT_PULLUP); +``` + +The state of a digital pin configured as an input can be read using `digitalRead()`: + +```arduino +// Read pin state and store it in a variable +int buttonState = digitalRead(KEY1); +``` + +The state of a digital pin configured as an output can be changed using `digitalWrite()`: + +```arduino +// Set pin HIGH +digitalWrite(D1, HIGH); + +// Set pin LOW +digitalWrite(D1, LOW); +``` + +### PWM Pins + +The Nesso N1 has three PWM (Pulse Width Modulation) capable pins, accessible via the **8-pin expansion header**: + +| Pin Name | GPIO | Function | +| :------- | :--- | :---------------- | +| `D1` | 7 | Digital I/O / PWM | +| `D2` | 2 | Digital I/O / PWM | +| `D3` | 6 | Digital I/O / PWM | + +This functionality can be used with the built-in `analogWrite()` function. By default, the resolution is 8-bit (value 0-255), but it can be configured up to 16-bit using `analogWriteResolution()`. + +```arduino +// Set PWM resolution to 10-bit (0-1023) +analogWriteResolution(10); + +// Set pin D1 to a 50% duty cycle +analogWrite(D1, 512); +``` + +### Analog Pins (ADC) + +The Nesso N1 provides access to two analog input pins through its onboard **Grove connector**. These pins, `GROVE_IO_0` (GPIO5) and `GROVE_IO_1` (GPIO4), are connected to the ESP32-C6's 12-bit Analog-to-Digital Converter (ADC). + +***Please note that these analog inputs are not available on the standard pin headers and must be accessed using a Grove-compatible cable.*** + +The `analogRead()` function will return a value between 0 and 4095, corresponding to an input voltage range of 0 V to 3.3 V. + +```arduino +// Read the analog value from the Grove connector pin +int sensorValue = analogRead(GROVE_IO_0); +``` + +## Communication + +The Nesso N1 supports several wired communication protocols for interfacing with sensors, displays, and other devices. + +### I2C + +The Nesso N1 supports I2C communication, which allows data transmission between the board and other I2C-compatible devices. The pins used for the I2C communication protocol are the following: + +| Microcontroller Pin | Arduino Pin Mapping | +| :------------------ | :------------------ | +| GPIO8 | `SCL` | +| GPIO10 | `SDA` | + +To use I2C communication, include the `Wire` library at the top of your sketch. The `Wire` library provides functions for I2C communication: + +```cpp +#include +``` + +In the `setup()` function, initialize the I2C library. On the Nesso N1, all I2C communication, including the Qwiic connector, is handled by the primary `Wire` object. + +```cpp +// Initialize the primary I2C bus +Wire.begin(); +``` + +To scan for connected I2C devices and verify their addresses, you can use the following example sketch. This is a useful utility to ensure your hardware is connected and recognized correctly. + +```cpp +#include + +void setup() { + // Initialize the I2C bus + Wire.begin(); + + // Initialize Serial for printing the results + Serial.begin(115200); + while (!Serial); // Wait for Serial to be ready + + Serial.println("\nI2C Scanner"); + Serial.println("Scanning for I2C devices..."); +} + +void loop() { + byte error, address; + int nDevices; + + nDevices = 0; + for (address = 1; address < 127; address++) { + // The i2c_scanner uses the return value of + // the Write.endTransmisstion to see if + // a device did acknowledge to the 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.println(address, HEX); + nDevices++; + } else if (error == 4) { + Serial.print("Unknown error at address 0x"); + if (address < 16) { + Serial.print("0"); + } + Serial.println(address, HEX); + } + } + if (nDevices == 0) { + Serial.println("No I2C devices found\n"); + } else { + Serial.println("Scan complete.\n"); + } + + delay(5000); // Wait 5 seconds before scanning again +} +``` + + +### SPI + +The board features one Serial Peripheral Interface (SPI) bus, which is used internally to communicate with the LoRa® module and the color display. + +- **MOSI**: GPIO21 +- **MISO**: GPIO22 +- **SCK**: GPIO20 + +While these pins are primarily used by onboard components, they can be shared with external SPI devices if you use a separate, available digital pin as a Chip Select (CS). + +### UART + +The Nesso N1 has two hardware UART (Serial) ports. + +- **`Serial`**: This object corresponds to the primary UART, which is connected to the USB-C® port. It is used for programming the board and for communication with the Arduino IDE's Serial Monitor. It is not connected to any external pins. + +- **`Serial1`**: This is a secondary hardware UART that can be mapped to any available GPIO pins. This allows you to establish serial communication with external devices like GPS modules or other microcontrollers using pins on the **8-pin expansion header** or the **Grove connector**. + +To use `Serial1`, you must specify the RX and TX pins in the `Serial1.begin()` function. The following example shows how to set up a UART on pins `D1` (TX) and `D2` (RX). + +```arduino +// D1 (GPIO7) will be TX1 +// D2 (GPIO2) will be RX1 + +void setup() { + // Initialize USB Serial for debugging + Serial.begin(115200); + + // Initialize Serial1 on D1 and D2 + // Format: Serial1.begin(baudrate, config, rxPin, txPin); + Serial1.begin(9600, SERIAL_8N1, D2, D1); + + Serial.println("UART communication example started."); + Serial.println("Anything you type here will be sent from D1."); +} + +void loop() { + // If data is available from USB Serial, send it to Serial1 (D1) + if (Serial.available()) { + char c = Serial.read(); + Serial1.print(c); + } + + // If data is available from Serial1 (D2), send it to USB Serial + if (Serial1.available()) { + char c = Serial1.read(); + Serial.print(c); + } +} +``` + + +## Buttons and LED + +The Nesso N1 features several physical controls for user interaction. + +### Power Button + +The Nesso N1 has a multi-function button for power control: + +- **Click (from off state)**: Power on. +- **Click (from on state)**: Reset the device. +- **Double-click (from on state)**: Power off. +- **Press and hold (from on state)**: Enter Download/Bootloader mode. + +![Power Button](assets/power-button.png) + + +Additionally, the `POWEROFF` expander pin allows you to shut down the device programmatically. + + +### User Buttons + +The board has two physical buttons, **KEY1** and **KEY2**, that are connected to the I/O expander. These can be read using `digitalRead()`. + +![User Buttons](assets/programmable-buttons.png) + +```arduino +void setup() { + Serial.begin(115200); + pinMode(KEY1, INPUT_PULLUP); + pinMode(KEY2, INPUT_PULLUP); +} + +void loop() { + if (digitalRead(KEY1) == LOW) { + Serial.println("Button 1 pressed!"); + delay(200); // Simple debounce + } + if (digitalRead(KEY2) == LOW) { + Serial.println("Button 2 pressed!"); + delay(200); // Simple debounce + } +} +``` + +### Built-in Programmable LED + +The board has an onboard green LED that can be controlled using the `LED_BUILTIN` object. It is visible on the side of the board through the power button gaps. + +![Built-in LED](assets/built-in-led.png) + +```arduino +void setup() { + // Configure the built-in LED as an output + pinMode(LED_BUILTIN, OUTPUT); +} + +void loop() { + // Blink the LED + digitalWrite(LED_BUILTIN, LOW); // Turn LED ON + delay(500); + digitalWrite(LED_BUILTIN, HIGH); // Turn LED OFF + delay(500); +} +``` + +***Please note that `LED_BUILTIN` uses inverted logic. Writing `LOW` to the pin turns the LED on, while writing `HIGH` turns it off.*** + + +## Display & Touchscreen + +The Nesso N1 features a 1.14-inch IPS color touchscreen with a resolution of 135 x 240 pixels, providing a vibrant and intuitive interface for your projects. + +- **Display Controller**: ST7789, controlled via SPI. +- **Touch Controller**: FT6336U, controlled via I2C. + +The display can be programmed using the [**M5GFX**](https://github.com/m5stack/M5GFX) library, which is a powerful graphics library that simplifies drawing text, shapes, and images. You can install it from the Arduino IDE Library Manager by searching for "M5GFX". + +### Basic Text Display + +The following example initializes the display and prints a simple text string. + +![Display Touch Coordinates](assets/display-example-1.png) + +```arduino +#include + +M5GFX display; // Create a display instance + +void setup() { + display.begin(); + display.setRotation(1); // Set to landscape mode + + // Set text properties + display.setTextDatum(MC_DATUM); // Middle-Center datum for text alignment + display.setTextColor(TFT_WHITE, TFT_BLACK); // White text, black background + display.setTextSize(2); + + // Clear the screen and draw the string + display.fillScreen(TFT_BLACK); + display.drawString("Hello, Nesso N1!", display.width() / 2, display.height() / 2); +} + +void loop() { + // Nothing to do in the loop +} +``` + +### Drawing Shapes and Colors + +The M5GFX library includes functions for drawing basic geometric shapes. You can use predefined color constants (e.g., `TFT_RED`, `TFT_GREEN`, `TFT_BLUE`) or specify 16-bit RGB565 color values. + +![Display Touch Coordinates](assets/display-example-2.png) + +```arduino +#include + +M5GFX display; + +void setup() { + display.begin(); + display.setRotation(1); + display.fillScreen(TFT_BLACK); + + // Draw a red rectangle outline + display.drawRect(10, 10, 100, 50, TFT_RED); + + // Draw a filled green circle + display.fillCircle(180, 60, 30, TFT_GREEN); + + // Draw a blue diagonal line + display.drawLine(0, 0, display.width(), display.height(), TFT_BLUE); +} + +void loop() { +} +``` + +### Handling Touch Input + +This example demonstrates how to read touch coordinates. It displays an initial message in the center of the screen. When you touch the screen, a "cursor" (a small circle) will appear at the point of contact, and the X/Y coordinates will be displayed in a fixed position at the center of the screen, updating in real-time as you move your finger. + +![Display Touch Coordinates](assets/display-example-3.png) + +```arduino +#include + +M5GFX display; + +void setup() { + display.begin(); + display.setRotation(1); // Set to landscape mode + display.fillScreen(TFT_BLACK); + + // Set text properties that will be used for all text in this sketch + display.setTextDatum(MC_DATUM); // Middle-Center datum for text alignment + display.setTextColor(TFT_WHITE); + display.setTextSize(2); + + // Display the initial message centered on the screen + display.drawString("Touch the screen", display.width() / 2, display.height() / 2); +} + +void loop() { + // Create a structure to hold touch data + lgfx::touch_point_t tp; + + // Check if the screen is being touched + if (display.getTouch(&tp)) { + // Clear the screen to update both the circle and the text + display.fillScreen(TFT_BLACK); + + // Draw a white circle at the current touch coordinates + display.fillCircle(tp.x, tp.y, 5, TFT_WHITE); + + // Create a string with the updated coordinates + String coords = "X:" + String(tp.x) + " Y:" + String(tp.y); + + // Draw the coordinates string at the FIXED center of the screen + display.drawString(coords, display.width() / 2, display.height() / 2); + } + + delay(20); // Small delay for responsiveness +} +``` + + +#### Finding More Examples + +The M5GFX library is incredibly versatile and supports advanced features like displaying images (JPG/PNG), using custom fonts, and creating complex animations with sprites. The best way to learn these techniques is by exploring the official examples provided with the library. + +You can find a comprehensive collection of examples covering all major features in the [**M5GFX GitHub repository**](https://github.com/m5stack/M5GFX/tree/master/examples/Basic). These examples can be opened directly in the Arduino IDE after you have installed the library. + + +## Connectivity + +The Nesso N1 is a versatile IoT device, equipped with a comprehensive suite of wireless protocols to suit a wide range of applications, from local device communication to long-range data transmission. + +### Wi-Fi® + +The ESP32-C6 features **Wi-Fi® 6 (802.11ax)**, offering higher efficiency, lower latency, and improved performance in dense wireless environments compared to older standards. This makes it ideal for applications requiring a reliable and fast connection to a local network or the internet. + +#### Wi-Fi® Connection Example + +This example demonstrates the most basic Wi-Fi® functionality: connecting to a network. It initializes the Wi-Fi® module, attempts to connect to a specified network, and prints the assigned IP address to the Serial Monitor once connected. + +```arduino +#include + +// Replace with your network credentials +const char* ssid = "YOUR_SSID"; +const char* password = "YOUR_PASSWORD"; + +void setup() { + Serial.begin(115200); + delay(1000); // Give serial a moment to initialize + + Serial.println("Connecting to Wi-Fi..."); + + // Start Wi-Fi connection + WiFi.begin(ssid, password); + + // Wait until the connection is established + while (WiFi.status() != WL_CONNECTED) { + delay(500); + Serial.print("."); + } + + Serial.println("\nConnected!"); + Serial.print("IP address: "); + Serial.println(WiFi.localIP()); +} + +void loop() { + // Nothing to do in the loop for this basic example + delay(1000); +} +``` + +### Bluetooth® Low Energy + +The Nesso N1 supports **Bluetooth® 5.3 Low Energy (LE)**, enabling efficient, short-range communication with smartphones, sensors, and other BLE-enabled devices. + +***WARNING: The ESP32 board package includes its own library for Bluetooth® that conflicts with the standard `ArduinoBLE` library. If you have the `ArduinoBLE` library installed in your IDE, you may encounter compilation errors. To resolve this, you must uninstall the `ArduinoBLE` library from the Library Manager before compiling sketches for the Nesso N1.*** + +#### Simple BLE Server Example + +This basic example turns your Nesso N1 into a simple Bluetooth® peripheral. It creates a BLE server that advertises a specific name ("Nesso N1 BLE Server"). You can use a free BLE scanner app on your phone to verify that your Nesso N1 appears in the list of nearby devices. + +```arduino +#include +#include +#include + +// See https://www.uuidgenerator.net/ to create your own unique UUIDs +#define SERVICE_UUID "4fafc201-1fb5-459e-8fcc-c5c9c331914b" + +void setup() { + Serial.begin(115200); + Serial.println("Starting BLE Server..."); + + // 1. Initialize the BLE device and set its name + BLEDevice::init("Nesso N1 BLE Server"); + + // 2. Create the BLE Server + BLEServer *pServer = BLEDevice::createServer(); + + // 3. Create a BLE Service using the UUID + BLEService *pService = pServer->createService(SERVICE_UUID); + + // 4. Start the service. A service must be started before it can be advertised. + pService->start(); + + // 5. Get the advertising object and add the service UUID to the advertisement + BLEAdvertising *pAdvertising = BLEDevice::getAdvertising(); + pAdvertising->addServiceUUID(SERVICE_UUID); + + // 6. Start advertising + BLEDevice::startAdvertising(); + + Serial.println("Device is now advertising. Check for 'Nesso N1 BLE Server' on your phone."); +} + +void loop() { + // The main work is done in the setup; the loop can be empty for this example. + delay(2000); +} +``` + +### Thread + +**Thread** is a low-power, secure, and self-healing mesh networking protocol based on IPv6. Two Nesso N1 boards can form a minimal Thread network on their own, without needing an external border router. One device will automatically become the "Router" for the network, and the other will join as a "Child". + +This test is performed by interacting directly with the OpenThread Command Line Interface (CLI) via the Serial Monitor. + +#### Thread CLI Sketch (Upload to Both Boards) + +This sketch simply starts the OpenThread stack and opens a console on the Serial Monitor, giving you direct access to the CLI. Upload this exact same sketch to **both** of your Nesso N1 boards. + +```arduino +#include "OThreadCLI.h" +void setup() { + Serial.begin(115200); + // Initialize the OpenThread stack but do not autostart the network interface. + // This gives us manual control via the CLI. + OThreadCLI.begin(false); + Serial.println("OpenThread CLI started. Type 'help' for a list of commands."); + // Start the console to pass Serial input directly to the CLI + OThreadCLI.startConsole(Serial); +} +void loop() { + // The console handles all the work. The loop can be empty. +} +``` + +#### How to Test Manually via CLI + +You will need two separate Serial Monitor windows, one for each Nesso N1. + +1. **Prepare:** Upload the sketch above to both boards. Connect both boards to your computer and open a Serial Monitor for each one. + +2. **Form a Network (Board 1):** In the Serial Monitor for your first board, create a new Thread network. + + ``` + dataset init new + ``` + + The board should respond with `Done`. Then, commit the new network settings: + + ``` + dataset commit active + ``` + + It will respond with `Done`. + +3. **Get the Network Key (Board 1):** Get the key for the network you just created. + + ``` + networkkey + ``` + + It will print a 32-character hexadecimal string. **Copy this key.** + +4. **Start the Network (Board 1):** Enable the radio and start the Thread protocol. + + ``` + ifconfig up + thread start + ``` + + After a few seconds, this board will become the network leader. You can verify this by typing `state`, which should return `leader`. + +5. **Join the Network (Board 2):** In the Serial Monitor for your second board, use the key you copied from Board 1. + + ``` + dataset networkkey + ``` + + Replace `` with the key. It should respond with `Done`. Then, commit the settings: + + ``` + dataset commit active + ``` + +6. **Start the Network (Board 2):** Enable the radio and start the Thread protocol. + + ``` + ifconfig up + thread start + ``` + + After a few seconds, this board will join the network. You can verify this by typing `state`, which should return `child`. + +7. **Set up the Server (Board 1):** In the Serial Monitor for your first board, set up a UDP listener on port `1234`. + + ``` + udp open + udp bind :: 1234 + ``` + + Both commands should respond with `Done`. This board is now listening for messages. + +8. **Send a Message (Board 2):** In the Serial Monitor for your second board, you must also open a UDP socket before you can send. + + ``` + udp open + ``` + + Once it responds with `Done`, send a UDP message to all devices on the Thread network. + + ``` + udp send ff03::1 1234 Hello! + ``` + + `ff03::1` is a multicast address that means "all Thread devices here.". + +9. **Verify Communication:** + + The Serial Monitor for **Board 2** (the client) should respond with `Done`. + + The Serial Monitor for **Board 1** (the server) should print a message showing it received the packet, for example: `8 bytes from fdde:ad00:beef:0:35e3:3c2f:273f:9442 Hello!`. + +You have now successfully sent and received a message over a peer-to-peer Thread network. + +### Zigbee® + +The Nesso N1's 802.15.4 radio allows it to act as a **Zigbee® End Device**, enabling it to join existing Zigbee® mesh networks. This is ideal for creating low-power devices like sensors or light controllers that integrate with popular smart home hubs. + +To compile this example, you must configure the following settings in the Arduino IDE: +- Navigate to **Tools > Zigbee Mode** and select **End device**. +- Navigate to **Tools > Partition Scheme** and select **Zigbee SPIFF 4MB**. + +#### Zigbee® Light Bulb Example + +This example configures the Nesso N1 to act as a simple Zigbee® On/Off light bulb. It cannot be tested with a second Nesso N1 running the same code. Instead, it is designed to be added to an existing Zigbee® network controlled by a central hub. + +```arduino +#ifndef ZIGBEE_MODE_ED +#error "Zigbee end device mode is not selected in Tools->Zigbee mode" +#endif + +#include "Zigbee.h" + +// Define the Zigbee endpoint for the light +#define ZIGBEE_LIGHT_ENDPOINT 10 + +// Create a ZigbeeLight object +ZigbeeLight zbLight = ZigbeeLight(ZIGBEE_LIGHT_ENDPOINT); + +// Callback function to control the LED +void setLED(bool value) { + // The built-in LED is active-low, so we invert the logic + digitalWrite(LED_BUILTIN, !value); +} + +void setup() { + Serial.begin(115200); + + // Initialize the built-in LED + pinMode(LED_BUILTIN, OUTPUT); + digitalWrite(LED_BUILTIN, HIGH); // Start with LED OFF + + // Set a manufacturer and model name for the Zigbee device + zbLight.setManufacturerAndModel("Arduino", "Nesso-Light"); + + // Set the callback function that gets called when a command is received + zbLight.onLightChange(setLED); + + // Add the light endpoint to the Zigbee core + Zigbee.addEndpoint(&zbLight); + + // Start the Zigbee stack + if (!Zigbee.begin()) { + Serial.println("Zigbee failed to start! Rebooting..."); + ESP.restart(); + } + + Serial.println("Zigbee started. Waiting to connect to a network..."); +} + +void loop() { + // The Zigbee stack runs in the background. + // The main loop can be used for other tasks or left empty. + delay(1000); +} +``` + +#### How to Test + +1. Upload the sketch to your Nesso N1. +2. You will need a **Zigbee® Hub/Coordinator**. Many popular smart home devices have this functionality built-in, such as the Amazon Echo (4th Gen, Plus, Studio, Show 10), Philips Hue Bridge, or Samsung SmartThings Hub. +3. Open the companion app for your hub (e.g., Amazon Alexa app, Philips Hue app). +4. Put your hub into pairing or "discover devices" mode. +5. The hub should discover a new light bulb named "Arduino Nesso-Light". +6. Once paired, you can add the device to a room and control the Nesso N1's built-in LED by toggling the light on and off in the app. + +### Matter + +**Matter** is a smart home connectivity standard that aims to unify the ecosystem, allowing devices from different brands to work together seamlessly. The Nesso N1 supports Matter communication over both **Wi-Fi®** and **Thread**. + +The choice of transport is determined by **compile-time definitions** you add at the top of your sketch. + +#### Matter On/Off Light Example + +This example turns your Nesso N1 into a simple On/Off light bulb. The same code works for both Matter over Wi-Fi® and Matter over Thread. After commissioning, you can control the Nesso N1's built-in LED from your smart home app. + +```arduino +#include +// Include WiFi.h only if you plan to use Matter over Wi-Fi +#include + +// --- Transport Layer Configuration --- +// To use Matter over Thread, include the three defines below. +// To use Matter over Wi-Fi, comment out or remove these three defines. +#define CONFIG_ENABLE_CHIPOBLE 1 // Enables BLE for commissioning +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD 1 // Enables the Thread stack +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI 0 // CRITICAL: Disables the Wi-Fi stack +// ------------------------------------- + +// --- For Matter over Wi-Fi only --- +const char* ssid = "YOUR_SSID"; +const char* password = "YOUR_PASSWORD"; +// ------------------------------------ + +// Create an On/Off Light Endpoint +MatterOnOffLight OnOffLight; + +// This callback function is executed when a Matter controller sends a command +bool setLightOnOff(bool state) { + Serial.printf("Received Matter command: Light %s\r\n", state ? "ON" : "OFF"); + + // Control the built-in LED (inverted logic: LOW is ON) + digitalWrite(LED_BUILTIN, state ? LOW : HIGH); + + return true; // Return true to confirm the command was successful +} + +void setup() { + pinMode(LED_BUILTIN, OUTPUT); + digitalWrite(LED_BUILTIN, HIGH); // Start with the LED off + Serial.begin(115200); + delay(1000); + + // --- For Matter over Wi-Fi only --- + if (!CHIP_DEVICE_CONFIG_ENABLE_THREAD) { + Serial.printf("Connecting to %s ", ssid); + WiFi.begin(ssid, password); + while (WiFi.status() != WL_CONNECTED) { + delay(500); + Serial.print("."); + } + Serial.println(" Connected"); + } + // ------------------------------------ + + // Initialize the OnOffLight endpoint with an initial state of OFF + OnOffLight.begin(false); + // Attach the callback function to handle state changes + OnOffLight.onChange(setLightOnOff); + + // Start the Matter service. + Matter.begin(); + + // If the device was already commissioned, sync its LED state on boot + if (Matter.isDeviceCommissioned()) { + Serial.println("Matter Node is already commissioned. Ready for use."); + setLightOnOff(OnOffLight.getOnOff()); + } +} + +void loop() { + // This block periodically prints the pairing information until the device is commissioned + if (!Matter.isDeviceCommissioned()) { + static unsigned long lastPrintTime = 0; + if (millis() - lastPrintTime > 5000) { + Serial.println("\n----------------------------------------------------"); + Serial.println("Matter Node not commissioned. Waiting for pairing..."); + Serial.printf("Manual pairing code: %s\r\n", Matter.getManualPairingCode().c_str()); + Serial.println("----------------------------------------------------"); + lastPrintTime = millis(); + } + } + + // A small delay is needed to allow background tasks to run + delay(100); +} +``` + +#### How to Configure and Test Your Matter Device + +The same sketch can be used for both Matter over Wi-Fi® and Matter over Thread. The behavior is controlled by **compile-time flags** at the top of the code. + +**1. To Run as Matter over Wi-Fi®:** +* **Action:** In the sketch, **comment out or delete** the three `#define` flags related to Thread. Fill in your Wi-Fi® credentials in the `ssid` and `password` variables. +* **Requirements:** Your Nesso N1 and Matter Controller (e.g., smartphone) must be on the same Wi-Fi® network. + +**2. To Run as Matter over Thread:** +* **Action:** In the sketch, ensure the three `#define` flags for Thread are **active and not commented out**. +* **Requirements:** You must have a **Thread Border Router** (e.g., a compatible Google Nest Hub or Apple HomePod) active on your network. + +**3. Commissioning the Device:** +After uploading the correctly configured sketch: +1. Open the Serial Monitor. A manual pairing code will be printed every few seconds. +2. Open your Matter Controller app (e.g., Google Home, Apple Home) and choose to add a new device. +3. When prompted, enter the manual pairing code from the Serial Monitor to complete the setup. + +**4. Control the Device:** Once commissioned, a new light bulb device will appear in your app or be controllable via the command line tool. You can now toggle it on and off to control the Nesso N1's built-in LED. + +### LoRa® + +The onboard **SX1262** module provides long-range, low-power communication capabilities, operating in the 850–960 MHz frequency range. It comes with a detachable external antenna that connects via an MMCX connector. + +![LoRa® Antenna Attached](assets/antenna-mounted.png) + +***WARNING: To avoid damage to your board, always use the LoRa® module with the antenna attached.*** + +The LoRa® module is controlled via SPI and several dedicated pins on both the ESP32-C6 and the I/O expander. + +| Pin Name | GPIO | Expander Port | Function | +| :-------------------- | :--- | :------------ | :------------------------------- | +| `MOSI` | 21 | | SPI Master Out Slave In | +| `MISO` | 22 | | SPI Master In Slave Out | +| `SCK` | 20 | | SPI Serial Clock | +| `LORA_IRQ` | 15 | | LoRa® Module Interrupt Request | +| `LORA_CS` | 23 | | LoRa® Module Chip Select (SPI) | +| `LORA_BUSY` | 19 | | LoRa® Module Busy Indicator | +| `LORA_LNA_ENABLE` | | E0.P5 | LoRa® Low-Noise Amplifier Enable | +| `LORA_ANTENNA_SWITCH` | | E0.P6 | LoRa® RF Antenna Switch Control | +| `LORA_ENABLE` | | E0.P7 | LoRa® Module Reset/Enable | + +#### LoRa® Peer-to-Peer (P2P) Examples + +The following examples demonstrate basic LoRa® peer-to-peer (P2P) communication using the [RadioLib](https://github.com/jgromes/RadioLib) library. This is the foundational step for testing your hardware and building more complex network applications. + +**LoRa® Transmitter Example** + +This example configures the Nesso N1 to send a "Hello World!" packet every five seconds. + +***WARNING: You must configure the LoRa® frequency (`LORA_FREQUENCY`) variable to match your geographical region. to a value that is legal for your geographical region. Transmitting on an unauthorized frequency can result in fines. Common frequencies are 915.0 MHz for North America/Australia, 868.0 MHz for Europe, and 433.0 MHz for Asia.*** + +```arduino +#include + +// LoRa® frequency regions +// Europe: 868.0 +// North America: 915.0 +// Australia: 915.0 +// Asia: 433.0 + +const float LORA_FREQUENCY = ; // Set the LoRa® frequency based on your region + +// Initialize the radio module, passing RADIOLIB_NC for the reset pin. +// The reset will be handled manually. +SX1262 radio = new Module(LORA_CS, LORA_IRQ, RADIOLIB_NC, LORA_BUSY); + +// Counter for transmitted packets +int packetCounter = 0; + +void setup() { + Serial.begin(115200); + + // Manually reset the LoRa module using the expander pin for reliability. + pinMode(LORA_ENABLE, OUTPUT); + digitalWrite(LORA_ENABLE, LOW); + delay(10); + digitalWrite(LORA_ENABLE, HIGH); + delay(10); + + // Initialize the LoRa® module + Serial.print(F("[SX1262] Initializing... ")); + int state = radio.begin(LORA_FREQUENCY); + if (state != RADIOLIB_ERR_NONE) { + Serial.print(F("failed, code ")); + Serial.println(state); + while (true); + } + Serial.println(F("success!")); +} + +void loop() { + Serial.print(F("[SX1262] Transmitting packet... ")); + + // Create a packet with a counter + String packet = "Hello from Nesso N1! #" + String(packetCounter++); + int state = radio.transmit(packet); + + if (state == RADIOLIB_ERR_NONE) { + Serial.println(F("success!")); + } else { + Serial.print(F("failed, code ")); + Serial.println(state); + } + + delay(5000); // Wait 5 seconds between transmissions +} +``` + +**LoRa® Receiver Example** + +This example configures a second Nesso N1 to listen for LoRa® packets and print them to the Serial Monitor. It uses a simple polling method where the main loop waits until a packet is received. + +```arduino +#include + +// LoRa® frequency regions +// Europe: 868.0 +// North America: 915.0 +// Australia: 915.0 +// Asia: 433.0 + +const float LORA_FREQUENCY = ; // Set the LoRa® frequency based on your region + +// Initialize the radio module, passing RADIOLIB_NC for the reset pin. +SX1262 radio = new Module(LORA_CS, LORA_IRQ, RADIOLIB_NC, LORA_BUSY); + +void setup() { + Serial.begin(115200); + + // Manually reset the LoRa module. + pinMode(LORA_ENABLE, OUTPUT); + digitalWrite(LORA_ENABLE, LOW); + delay(10); + digitalWrite(LORA_ENABLE, HIGH); + delay(10); + + // Initialize the LoRa® module. + Serial.print(F("[SX1262] Initializing... ")); + int state = radio.begin(LORA_FREQUENCY); + if (state != RADIOLIB_ERR_NONE) { + Serial.print(F("failed, code ")); + Serial.println(state); + while (true); + } + + // Start listening for LoRa packets. + Serial.print(F("[SX1262] Starting to listen... ")); + state = radio.startReceive(); + if (state != RADIOLIB_ERR_NONE) { + Serial.print(F("failed, code ")); + Serial.println(state); + while (true); + } + Serial.println(F("success!")); +} + +void loop() { + // Create a string to store the received message. + String str; + + // Try to receive a packet. + int state = radio.receive(str); + + if (state == RADIOLIB_ERR_NONE) { + // Packet was received successfully. + Serial.print(F("\n[SX1262] Received packet: ")); + Serial.println(str); + + // Print packet statistics. + Serial.print(F("[SX1262] RSSI: ")); + Serial.print(radio.getRSSI()); + Serial.print(F(" dBm, SNR: ")); + Serial.print(radio.getSNR()); + Serial.println(F(" dB")); + + } else if (state == RADIOLIB_ERR_CRC_MISMATCH) { + Serial.println(F("[SX1262] CRC error!")); + } else if (state != RADIOLIB_ERR_RX_TIMEOUT) { + // Some other error occurred. Timeout is expected and ignored. + Serial.print(F("[SX1262] Failed, code ")); + Serial.println(state); + } +} +``` + +***Please note: because the `LORA_ENABLE` pin is on an I/O expander, it cannot be passed directly to the RadioLib library constructor. The library must be initialized with the reset pin set to `RADIOLIB_NC` and it is best practice to perform a manual reset in setup.*** + +#### Configuring for Public LoRa® Networks + +The onboard SX1262 module can be configured to communicate on public LoRa® networks such as [**The Things Network (TTN)**](https://www.thethingsnetwork.org/) or [**Helium**](https://helium.com/). These networks operate on specific frequencies and use defined radio parameters based on regional plans (e.g., `EU868`, `US915`, `AU915`). To ensure your device can be heard by gateways in your area, you must first configure your LoRa® radio to match your region's frequency. + +## Onboard Sensors & Peripherals + +### 6-Axis IMU + +The **BMI270** is a high-performance 6-axis Inertial Measurement Unit (IMU) that combines a 3-axis accelerometer and a 3-axis gyroscope. It connects to the ESP32-C6 via the I2C bus (`SCL` on GPIO8, `SDA` on GPIO10) and provides an interrupt signal on `SYS_IRQ` (GPIO3). It is ideal for motion tracking, gesture recognition, and orientation sensing. + +Here is a minimal example using the [Arduino_BMI270_BMM150](https://github.com/arduino-libraries/arduino_bmi270_bmm150) library: + +```arduino +#include + +void setup() { + Serial.begin(115200); + while (!Serial); // Wait for serial port to connect + + Serial.println("Initializing IMU..."); + if (!IMU.begin()) { + Serial.println("Failed to initialize IMU!"); + while (1); + } + + Serial.print("Accel Rate: "); + Serial.print(IMU.accelerationSampleRate()); + Serial.println(" Hz"); + + Serial.print("Gyro Rate: "); + Serial.print(IMU.gyroscopeSampleRate()); + Serial.println(" Hz"); + + Serial.println("X\tY\tZ\t\t| X\tY\tZ"); + Serial.println("Accel (g)\t\t| Gyro (°/s)"); +} + +void loop() { + float ax, ay, az; + float gx, gy, gz; + + if (IMU.accelerationAvailable() && IMU.gyroscopeAvailable()) { + IMU.readAcceleration(ax, ay, az); + IMU.readGyroscope(gx, gy, gz); + + Serial.print("aX:"); + Serial.print(ax, 2); + Serial.print(" aY:"); + Serial.print(ay, 2); + Serial.print(" aZ:"); + Serial.print(az, 2); + Serial.print("\t gX:"); + Serial.print(gx, 2); + Serial.print(" gY:"); + Serial.print(gy, 2); + Serial.print(" gZ:"); + Serial.println(gz, 2); + } + + delay(100); +} +``` + +#### Visualizing the Output + +After uploading the sketch, open the **Serial Plotter** (**Tools > Serial Plotter**) in the Arduino IDE. As you move the Nesso N1, you will see the sensor data graphed in real-time. + +By using the checkboxes in the Serial Plotter window, you can isolate different data streams. The animation below shows the accelerometer data (`aX`, `aY`, `aZ`) as the device is tilted. + +![Accelerometer Data in Serial Plotter](assets/bmi_accel.gif) + +Similarly, you can deselect the accelerometer variables and view only the gyroscope data (`gX`, `gY`, `gZ`) to visualize the rate of rotation, as shown here. + +![Gyroscope Data in Serial Plotter](assets/bmi_gyro.gif) + + +### Buzzer + +A passive buzzer connected to `BEEP_PIN` (GPIO11) provides audible feedback. You can generate simple tones using the standard `tone()` function. + +```arduino +void setup() { + // No setup needed for tone() +} + +void loop() { + // Play a 1 kHz tone for 500 ms + tone(BEEP_PIN, 1000, 500); + delay(2000); +} +``` + +### Infrared (IR) Transmitter + +An onboard IR LED connected to `IR_TX_PIN` (GPIO9) allows the Nesso N1 to function as a remote control for various electronic devices. + +Here is an example using the [IRremote](https://github.com/Arduino-IRremote/Arduino-IRremote) library to send a NEC command: + +```arduino +#include + +void setup() { + Serial.begin(115200); + IrSender.begin(IR_TX_PIN); +} + +void loop() { + Serial.println("Sending IR signal..."); + // Send a NEC command: Address 0x01, Command 0x04 + IrSender.sendNEC(0x01, 0x04, 1); + delay(2000); +} +``` + +***Please note: There is a known hardware timer conflict between the `tone()` function and the IRremote library. To use both features in the same sketch, you must fully reset the pin and re-initialize the IR sender before each transmission. First, set the pin mode to INPUT to release it from the timer, then call `IrSender.begin()` to reconfigure it for IR.*** + +## Expansion Ports + +### Voltage Compatibility Considerations + +Before connecting any external components to your Nesso N1, it is important to understand its voltage characteristics to prevent damage to your sensors and modules: + +**The Nesso N1 operates at 3.3 VDC**, which means: + +- All digital I/O pins use 3.3 VDC logic levels (HIGH = 3.3 VDC, LOW = 0 VDC). +- Analog inputs can safely accept 0 to 3.3 VDC. +- Communication pins (I2C, SPI, UART) operate at 3.3 VDC logic levels. + +**For 5 VDC components**, you must add **external level shifters** for digital communication pins. + +Always check your component's datasheet for voltage specifications before connecting. When in doubt, use a multimeter to verify voltage levels or add protective level shifting. + +### Qwiic Connector + +The Nesso N1 features an onboard Qwiic connector that provides a simple, tool-free solution for connecting I2C devices. The Qwiic ecosystem, developed by SparkFun, has become an industry standard for rapid prototyping, allowing you to connect sensors, displays, and other peripherals without soldering or complex wiring. + +![Qwiic Connector](assets/qwiic-connector.png) + +The Qwiic system’s key advantages include: + +- **Plug-and-play connectivity**: No breadboards, jumper wires, or soldering required. +- **Polarized connectors**: Prevents accidental reverse connections. +- **Daisy-chain capability**: Connect multiple devices in series. +- **Standard pinout**: Compatible across all Qwiic ecosystem devices. + +***The Qwiic connector on the Nesso N1 is connected to the primary I2C bus, which uses the standard `Wire` object. The connector provides a 3.3 V supply, making it ideal for modern sensors.*** + +The Qwiic connector allows you to interface with our Modulino family for developing soldering-free projects. + +![Modulino nodes](assets/modulino.png) + +You can check our [Modulino family](https://store.arduino.cc/collections/modulino) where you will find a variety of **sensors** and **actuators** to expand your projects. + + +### Grove Connector + +The Nesso N1 also includes one standard **Grove** connector. It provides a 5 V interface with two digital I/O pins (`GROVE_IO_0` on GPIO5, `GROVE_IO_1` on GPIO4), making it compatible with the extensive ecosystem of [Grove modules](https://search.arduino.cc/search?q=grove%20module&tab=store), including those from [M5Stack](https://shop.m5stack.com/pages/search-results-page?q=grove&page=1&rb_tags=ACTUATORS%7CSENSOR) and [Arduino Sensor Kit](https://store.arduino.cc/products/sensor-kit-base). + +![Grove Connector](assets/grove-connector.png) + +### 8-Pin Expansion Port + +An 8 pin female header provides access to additional I/O and power pins. It is designed to be fully compatible with the **M5StickC HAT** series of expansion boards, so you can easily add modules for sensors, inputs, and extra connectivity. You can explore the range of compatible HATs on the [M5Stack store](https://shop.m5stack.com/collections/for-stick). + +![8 pins Expansion Port](assets/expansion-port.png) + +| # | Pin Name | GPIO | Function | +| :--- | :------------ | :--- | :---------------------------- | +| 1 | `GND` | - | Ground | +| 2 | `+5V OUT` | - | 5 V Output | +| 3 | `D1` | 7 | Digital PWM I/O | +| 4 | `D2` | 2 | Digital PWM I/O | +| 5 | `D3` | 6 | Digital PWM I/O | +| 6 | `BATTERY OUT` | - | Direct Battery Voltage Output | +| 7 | `+3V3 OUT` | - | 3.3 V Output | +| 8 | `+5V IN` | - | 5 V Input (VIN) | + +***The `BATTERY OUT` pin provides the direct, unregulated voltage from the LiPo battery. Be cautious when using this pin, as the voltage will vary depending on the charge level.*** + +#### Using I2C M5StickC Compatible HATs + +M5StickC HATs that use I2C expect the bus on the D1 and D3 pins of this connector. On the Nesso N1 you must explicitly remap the I2C pins in your sketch so that: + +- `D1` (GPIO7) is SCL +- `D3` (GPIO6) is SDA + +Initialize the I2C bus like this: + +```arduino +#include + +void setup() { + // SDA on D3 (GPIO6), SCL on D1 (GPIO7) + Wire.begin(D3, D1); +} +``` + +## Support + +If you encounter any issues or have questions while working with the Arduino Nesso N1, we provide various support resources to help you find answers and solutions. + +### Help Center + +Explore our [Help Center](https://support.arduino.cc/hc/en-us), which offers a comprehensive collection of articles and guides for our products. The Arduino Help Center is designed to provide in-depth technical assistance and help you make the most of your device. + +### Forum + +Join our community forum to connect with other Nesso N1 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 Nesso N1. + +- [Nesso N1 category in the Arduino Forum](https://forum.arduino.cc/c/official-hardware/kits/nesso-n1/225) + +### 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 are happy to help you with any issues or inquiries about the Nesso N1. + +- [Contact us page](https://www.arduino.cc/en/contact-us/) \ No newline at end of file diff --git a/content/hardware/09.kits/maker/starter-kit-r4/certifications/Arduino_K000007_R4-DoC_CE.pdf b/content/hardware/09.kits/maker/starter-kit-r4/certifications/Arduino_K000007_R4-DoC_CE.pdf new file mode 100644 index 0000000000..bd3a3293e3 Binary files /dev/null and b/content/hardware/09.kits/maker/starter-kit-r4/certifications/Arduino_K000007_R4-DoC_CE.pdf differ diff --git a/content/hardware/09.kits/maker/starter-kit-r4/certifications/Arduino_K000007_R4-DoC_UKCA.pdf b/content/hardware/09.kits/maker/starter-kit-r4/certifications/Arduino_K000007_R4-DoC_UKCA.pdf new file mode 100644 index 0000000000..1112259916 Binary files /dev/null and b/content/hardware/09.kits/maker/starter-kit-r4/certifications/Arduino_K000007_R4-DoC_UKCA.pdf differ diff --git a/content/hardware/09.kits/maker/starter-kit-r4/compatibility.yml b/content/hardware/09.kits/maker/starter-kit-r4/compatibility.yml new file mode 100644 index 0000000000..94dcf76b65 --- /dev/null +++ b/content/hardware/09.kits/maker/starter-kit-r4/compatibility.yml @@ -0,0 +1,21 @@ +software: + - arduino-ide + - arduino-cli + - cloud-editor +hardware: + boards: + - uno-r4-wifi + shields: + - 4-relays-shield + - motor-shield-rev3 + - ethernet-shield-rev2 + - 9-axis-motion-shield + carriers: ~ + accessories: + - modulino-buttons + - modulino-buzzer + - modulino-distance + - modulino-knob + - modulino-movement + - modulino-pixels + - modulino-thermo diff --git a/content/hardware/09.kits/maker/starter-kit-r4/datasheet/assets/featured.png b/content/hardware/09.kits/maker/starter-kit-r4/datasheet/assets/featured.png new file mode 100644 index 0000000000..5a1aeb1690 Binary files /dev/null and b/content/hardware/09.kits/maker/starter-kit-r4/datasheet/assets/featured.png differ diff --git a/content/hardware/09.kits/maker/starter-kit-r4/datasheet/assets/kit-components.png b/content/hardware/09.kits/maker/starter-kit-r4/datasheet/assets/kit-components.png new file mode 100644 index 0000000000..d386d42ebe Binary files /dev/null and b/content/hardware/09.kits/maker/starter-kit-r4/datasheet/assets/kit-components.png differ diff --git a/content/hardware/09.kits/maker/starter-kit-r4/datasheet/assets/kit-project.png b/content/hardware/09.kits/maker/starter-kit-r4/datasheet/assets/kit-project.png new file mode 100644 index 0000000000..ed3a95ede5 Binary files /dev/null and b/content/hardware/09.kits/maker/starter-kit-r4/datasheet/assets/kit-project.png differ diff --git a/content/hardware/09.kits/maker/starter-kit-r4/datasheet/assets/mechanicalDrawing_R4WiFi.png b/content/hardware/09.kits/maker/starter-kit-r4/datasheet/assets/mechanicalDrawing_R4WiFi.png new file mode 100644 index 0000000000..74cd81eb37 Binary files /dev/null and b/content/hardware/09.kits/maker/starter-kit-r4/datasheet/assets/mechanicalDrawing_R4WiFi.png differ diff --git a/content/hardware/09.kits/maker/starter-kit-r4/datasheet/assets/uno-r4-wifi.png b/content/hardware/09.kits/maker/starter-kit-r4/datasheet/assets/uno-r4-wifi.png new file mode 100644 index 0000000000..11bc0ee99e Binary files /dev/null and b/content/hardware/09.kits/maker/starter-kit-r4/datasheet/assets/uno-r4-wifi.png differ diff --git a/content/hardware/09.kits/maker/starter-kit-r4/datasheet/datasheet.md b/content/hardware/09.kits/maker/starter-kit-r4/datasheet/datasheet.md new file mode 100644 index 0000000000..4836083550 --- /dev/null +++ b/content/hardware/09.kits/maker/starter-kit-r4/datasheet/datasheet.md @@ -0,0 +1,522 @@ +--- +identifier: K000007_R4 +title: Arduino® Starter Kit R4 +type: maker +--- + +![](assets/featured.png) + +# Description + +

The Arduino® Starter Kit R4 is a hands-on learning platform built around the Arduino® UNO R4 WiFi. Featuring an Arm® Cortex®-M4 microcontroller, integrated Wi-Fi® and Bluetooth® via ESP32-S3, and a 12x8 red LED matrix, this kit provides makers, students, and educators with a reliable foundation to learn, prototype, and build interactive electronics projects. With included sensors, motors, and actuators, the Starter Kit R4 bridges theoretical learning and practical experimentation through engaging, hands-on activities that teach fundamental programming and electronics concepts. +

+ +# Target Areas + +Education, embedded programming, maker prototyping, STEM classrooms + +# CONTENTS + +## Application Examples + +

+The Starter Kit R4 offers a wide variety of practical applications, from classroom-friendly tutorials to interactive prototypes. Below are a few examples of what learners and developers can build with the kit: +

+ +
    +
  • Interactive Interfaces: Create game controllers and HID devices that can interact with computers, exploring the bridge between physical and digital controls.
  • +
  • Educational Tools: Teach students the fundamentals of electronics, embedded coding, and control logic using interactive guided experiments and hands-on projects.
  • +
  • LED Matrix Animations: Use the onboard 12x8 red LED matrix to create visual displays, heartbeat monitors, status indicators, or animations for feedback and communication.
  • +
  • Temperature Sensing: Build temperature-based monitoring systems using included thermistors to create chill-o-meters and responsive feedback devices.
  • +
  • Robotics & Motion: Drive DC or servo motors to explore basic robotics and automated movement control applications like motorized pinwheels.
  • +
  • Sound & Music Projects: Create musical instruments, synthesizers, and sound-responsive devices using piezo speakers, capacitive touch, and light sensors.
  • +
  • Sensor-Based Feedback Systems: Develop touch-sensitive lamps, knock detectors, and mood indicators that respond to physical interactions and environmental changes.
  • +
+ +
+ +## Starter Kit R4 Projects Book + +![ ](assets/kit-project.png) + +

+The Arduino Starter Kit R4 includes a printed book with 14 projects. Each project helps you learn how to use different components and write code with the Arduino UNO R4 WiFi. The projects start simple and become more advanced as you go. +

+ +| **No.** | **Project Title** | **What You Learn** | +| ------: | ---------------------- | ------------------------------------------------ | +| 00 | Get Started | How to set up the software and board | +| 01 | Get to Know Your Tools | How to use a breadboard, resistors, and switches | +| 02 | Spaceship Interface | How to control LEDs with buttons | +| 03 | Chill-o-Meter | How to read temperature using a sensor | +| 04 | Color Mixing Lamp | How to use light sensors and fade LEDs | +| 05 | Mood Cue | How to give feedback using lights and sensors | +| 06 | Light Theremin | How to use light to make sound | +| 07 | Keyboard Instrument | How to play tones with a piezo speaker | +| 08 | Digital Hourglass | How to build a timer using LEDs | +| 09 | Motorized Pinwheel | How to control a motor | +| 10 | Crystal Ball | How to make random responses | +| 11 | Knock Lock | How to detect knocks with a piezo sensor | +| 12 | Touchy-feely Lamp | How to control light with a touch sensor | +| 13 | Hacking Buttons | How to reuse parts to make new controls | + +

+The book explains each step clearly and includes drawings and sample code. You can also visit the official project page at: +arduino.cc/starterkit for updates and more projects. +

+Suggested additional materials are listed in the details of each project, such as basic crafting materials: paper, tape, markers, scissors and more. These are not included in the kit. + +### Starter Kit R4 Online Projects + +

+The Starter Kit R4 includes a set of online projects. These projects build on the skills developed in the first 14 lessons, introducing topics such as computer interaction via USB (Human Interface Device - HID), capacitive touch, and enhanced use of the LED matrix. The first online module, "Welcome Online", provides an introduction to the Arduino Cloud platform and how to use it with your kit. +

+ +

+The projects listed below represent the content available at the time of the kit's launch. Additional online projects will continue to be added over time to expand the learning experience and showcase new projects. +

+ +| **No.** | **Project Title** | **What You Learn** | +|--------:|-------------------------------------------|------------------------------------------------------------------------------------------| +| 00-1 | Welcome Online | Learn how to use the online Arduino Cloud platform. | +| 00-2 | Build a Project with Arduino AI Assistant | Learn how to build a project with the help of the Arduino AI assistant speaker. | +| 14 | HIDden Powers | Build a game controller that can interact with your computer, using HID and pushbuttons. | +| 15 | Heartbeat Monitor | Use the Love Button to pulse a heartbeat on the LED Matrix. | +| 16 | Funky Synth | Build a funky synth using capacitive touch and a piezo speaker. | + +

+You can follow the link below to access the official online course platform [11], where you will find the online projects with step-by-step instructions: +courses.arduino.cc/starterkitr4. +To access the course, users need an Arduino account. +

+ +
+ +## Features + +### Kit Contents + +

+The Starter Kit R4 includes the UNO R4 WiFi board and a wide selection of electronic components to build, test and explore interactive projects. All components are curated for step-by-step guided experimentation. +

+ +- **K000007_R4**: This is the SKU that represents the Starter Kit R4. +- **K000007_R4-6P**: This SKU represents the Starter Kit R4 Classroom pack, which contains Starter Kit R4 (x 6) + +#### Main Board + +- Arduino UNO R4 WiFi (SKU: ABX00087) (x1) + +#### Learning Materials + +- Project book - 150 pages (x1) + +#### Cables & Power + +- USB-C® cable (x1) +- 9V battery snap connector (x1) + +#### Prototyping Tools + +- Breadboard (x1) +- Easy-to-assemble base (x1) +- Solid core jumper wires (x70) +- Stranded jumper wires (x2) +- Male pin strip - 40x1 (x1) + +#### Input & Output Components + +- Pushbuttons (x6) +- LCD display - 16x2 characters (x1) +- Piezo capsule (x1) + +#### LEDs + +- Bright white LED (x1) +- RGB LED (x1) +- Red LEDs (x8) +- Green LEDs (x8) +- Yellow LEDs (x8) +- Blue LEDs (x3) + +#### Sensors + +- Phototransistors (x4) +- Temperature sensor (x1) +- Tilt sensor (x1) + +#### Actuators + +- Small DC motor 6/9 V (x1) +- Small servo motor (x1) + +#### Semiconductor Components + +- H-bridge motor driver (x1) +- Optocoupler (x2) +- MOSFET transistor (x1) +- Diodes (x3) + +#### Passive Components + +- Potentiometers (x3) +- Capacitors - 100 µF (x3) +- Resistors - 220 Ω (x11) +- Resistors - 560 Ω (x3) +- Resistors - 1 kΩ (x3) +- Resistors - 4.7 kΩ (x3) +- Resistors - 10 kΩ (x11) +- Resistors - 1 MΩ (x7) +- Resistors - 10 MΩ (x3) + +#### Accessories + +- Transparent color gels - red, green, blue (x3) + +![Exploded view of the Starter Kit R4 components](assets/kit-components.png) + +
+ +#### Arduino UNO R4 WiFi (SKU: ABX00087) + +

+The UNO R4 WiFi is a modern 32-bit development board that combines the performance of the Renesas RA4M1 microcontroller with the wireless connectivity of the ESP32-S3-MINI-1 module. While preserving the classic UNO form factor and 5 V logic compatibility, it introduces new features including a built-in 12x8 LED matrix, CAN bus and QWIIC I2C connector. These additions make it suitable for both traditional prototyping and interactive electronics projects. +

+ +UNO R4 WiFi Board + +| **Feature** | **Specification** | +|---------------------------------------|------------------------------------------| +| Main MCU | Renesas RA4M1 (R7FA4M1AB3CFM#AA0) | +| Core | Arm® Cortex®-M4, 48 MHz with FPU | +| Memory | 256 kB Flash, 32 kB SRAM, 8 kB EEPROM | +| Wireless MCU | ESP32-S3-MINI-1-N8 | +| Wireless Connectivity | Wi-Fi® 4 (802.11 b/g/n), Bluetooth® 5 LE | +| Operating Voltage | 5 V (RA4M1), 3.3 V (ESP32-S3) | +| USB Connector | USB-C | +| Power Input | VIN: 6-24 V / USB: 5 V | +| Digital I/O Pins | 14 | +| Analog Input Pins | 6 | +| PWM (Pulse Width Modulation) Outputs | 6 | +| DAC (Digital-to-Analog Converter) | 1 × 12-bit (A0 pin) | +| LED Matrix | 12x8 red matrix, programmable | +| Communication Interfaces | UART (1), I2C (2), SPI (1), CAN (1) | +| Special Interfaces | QWIIC connector (3.3 V I2C), ESP header | +| Additional Features | RTC, OPAMP, DMA controller, CTSU | +| Dimensions | 68.58 mm × 53.34 mm | + +

+By default, programming the RA4M1 microcontroller is handled through the ESP32-S3, which works as a USB bridge. This configuration allows uploading via USB-C without requiring additional setup. +

+ +

+The board features a USB-C port for both powering and programming. It also supports serial communication and works as the main development interface. +

+ +
+

Warning: Do not exceed 5 V on the USB-C port to avoid hardware damage.

+
+ +

+The RA4M1 microcontroller provides a 12-bit DAC connected to the A0 pin. It can generate analog output signals such as variable voltage levels or waveforms for audio and signal testing applications. +

+ +

+The onboard QWIIC connector (SM04B-SRSS-TB) allows plug-and-play I2C communication with 3.3 V QWIIC-compatible modules. It is connected to a secondary I2C bus powered by the onboard 3.3 V regulator. +

+ +

+The main I2C bus is also accessible on A4 (SDA) and A5 (SCL) pins. Avoid using A4/A5 as analog inputs while I2C communication is active. +

+ +
+

+ For more technical information, schematics, and configuration details, refer to the official UNO R4 WiFi documentation: + + UNO R4 WiFi Official Documentation [1] + +

+
+ +
+ +## Ratings + +### Recommended Operating Conditions + +The recommended electrical and thermal operating ranges for the Arduino UNO R4 WiFi board are as follows: + +| **Symbol** | **Description** | **Minimum** | **Typical** | **Maximum** | **Unit** | +|-----------------|--------------------------------------|-------------|-------------|-------------|----------| +| VIN | Input voltage from VIN pad / DC Jack | 6 | 7.0 | 24 | V | +| VUSB | Input voltage from USB connector | 4.8 | 5.0 | 5.5 | V | +| TOP | Operating Temperature | -40 | 25 | 85 | °C | + +
+

Note: Operating conditions reflect general limits for the main board and consider reasonable usage of connected peripherals. Component-specific ratings may vary.

+
+ +

+The UNO R4 WiFi supports power inputs via USB-C or the VIN pin (DC barrel jack). A buck converter (ISL854102FRZ) regulates VIN input (6-24 V) down to 5 V. USB input is internally dropped to ~4.7 V due to a Schottky diode. +

+ +A 3.3 V linear regulator (SGM2205-3.3XKC3G/TR) supplies the ESP32-S3 and other 3.3 V peripherals. + +### Pin Voltage and Current + +- **Logic Levels**: RA4M1 operates at 5 V / ESP32-S3 at 3.3 V +- **Current per GPIO**: Up to 8 mA +- **Important**: Do not apply 5 V signals to ESP32-S3 pins + +Always use external power supplies for high-current loads like servos or DC motors. + +
+

+ For more technical information, schematics, and configuration details, refer to the official UNO R4 WiFi documentation: + + UNO R4 WiFi Official Documentation [1] + +

+
+ +
+ +## Kit Power Supply + +

+The Starter Kit R4 supports multiple powering options via the Arduino UNO R4 WiFi board. When connecting additional peripherals, ensure they are within the supported voltage and current limits.

+ +-

VIN / Barrel Jack: Accepts 6-24 VDC input, regulated to 5 V using the onboard buck converter (ISL854102FRZ). Recommended for projects requiring higher or isolated input voltage sources.

+ +
+

Note: A 9 V battery snap connector is included in the kit for use with a 9 V battery as a power source if desired. The 9 V battery is not included and must be purchased separately.

+
+ +-

USB-C Connector: Provides 5 V directly from the USB host. Actual voltage seen by the board is slightly reduced due to a Schottky diode (~4.7 V). Suitable for desktop or classroom use.

+-

5 V Pin: Provides regulated 5 V output when the board is powered via USB or VIN. Use with caution and avoid connecting high-current loads (e.g., motors) directly to this pin.

+ +
+

Warning: Exceeding the voltage or current ratings of the board or connected components may result in damage or unsafe operation. Always check the specifications of peripherals before connecting them.

+
+ +
+

+ For more technical information, schematics, and configuration details, refer to the official UNO R4 WiFi documentation: + + UNO R4 WiFi Official Documentation [1] + +

+
+ +
+ +## Device Operation + +### Getting Started - IDE + +

+If you want to program your Arduino Starter Kit R4 offline, install the Arduino Desktop IDE [2]. To connect the Arduino UNO R4 WiFi to your computer, you will need a USB-C cable. +

+ +### Getting Started - Arduino Cloud Editor + +

+All components of the Arduino Starter Kit R4 work seamlessly on the Arduino Cloud Editor [3] by installing a simple plugin. The Arduino Cloud Editor is hosted online, ensuring it is always up-to-date with the latest features and support for all boards and devices. Follow the Getting Started guide [6] to start coding in the browser and upload your sketches onto the Arduino UNO R4 WiFi. +

+ +### Getting Started - Arduino Cloud + +

+The Arduino Starter Kit R4 is fully compatible with the Arduino Cloud, allowing you to explore online development tools and AI-assisted project building using the UNO R4 WiFi board. The kit includes guided tutorials for getting started with the Arduino Cloud platform and leveraging the Arduino AI Assistant for project development. To learn how to integrate your projects with the Cloud, refer to the official documentation [6]. +

+ +### Sample Sketches + +

+Sample sketches for the Starter Kit R4 can be found either in the "Examples" menu in the Arduino IDE or the LED Matrix tutorial section of Arduino documentation [7]. These examples include basic and advanced applications showcasing motion and environmental monitoring capabilities. +

+ +### Online Resources + +

+Now that you have gone through the basics of what you can do with the Starter Kit R4, you can explore the endless possibilities it provides by checking exciting projects on Arduino Project Hub [5], the Arduino Library Reference [9], and the online Starter Kit R4 product page [10]. +

+ +
+ +## Mechanical Information + +### Starter Kit R4 (K000007_R4) Dimensions + +| **View** | **Measurement** | +|----------|-----------------| +| Width | 245 mm | +| Length | 160 mm | +| Height | 41 mm | +| Weight | 0.864 Kg | + +### Starter Kit R4 Classroom Pack (K000007_R4-6P) Dimensions + +| **View** | **Measurement** | +|----------|-----------------| +| Width | 245 mm | +| Length | 160 mm | +| Height | 146 mm | +| Weight | 5.4 kg | + +
+ +### UNO R4 WiFi (ABX00087) Dimensions + +| **View** | **Measurement** | +|---------------|------------------------| +| Width | 68.58 mm | +| Length | 53.34 mm | + +![Board Dimensions](assets/mechanicalDrawing_R4WiFi.png) + +
+ +## Product Compliance + +

+The Arduino Starter Kit R4 is composed of multiple individual components, with the UNO R4 WiFi being the main board, it complies with specific regulations and certifications. For detailed product compliance information, please refer to the corresponding datasheets of each component included in the kit: +

+ +- [UNO R4 WiFi Compliance Information](https://docs.arduino.cc/hardware/uno-r4-wifi/) **[1]** + +## FCC Caution + +

+The UNO R4 WiFi of the Arduino Starter Kit R4 is subject to individual FCC regulations. Please refer to the FCC documentation linked in each Arduino component's datasheet for specific compliance details: +

+ +- [UNO R4 WiFi Compliance Information](https://docs.arduino.cc/hardware/uno-r4-wifi/) **[1]** + +

+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: + +(1) This device may not cause harmful interference + +(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. + +2. This equipment complies with RF radiation exposure limits set forth for an uncontrolled environment. + +3. This equipment should be installed and operated with a minimum distance of 20 cm between the radiator & your body. + +

+Note: This equipment has been tested and found to comply with the limits for a Class B digital +device, pursuant to part 15 of the FCC Rules. These limits are designed to provide +reasonable protection against harmful interference in a residential installation. This equipment +generates, uses and can radiate radio frequency energy and, if not installed and used in +accordance with the instructions, may cause harmful interference to radio communications. +However, there is no guarantee that interference will not occur in a particular installation. If +this equipment does cause harmful interference to radio or television reception, which can be +determined by turning the equipment off and on, the user is encouraged to try to correct the +interference by one or more of the following measures:

+ +- Reorient or relocate the receiving antenna. +- Increase the separation between the equipment and receiver. +- Connect the equipment into an outlet on a circuit different from that to which the +receiver is connected. +- Consult the dealer or an experienced radio/TV technician for help. + +

+English: +User manuals for licence-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 licence-exempt RSS standard(s). Operation is subject to the following two conditions: +

+ +(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 + +(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 a minimum distance of 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. + +## 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). +

+ +## 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. +

+ +| **Substance** | **Maximum Limit (ppm)** | +| -------------------------------------- | ----------------------- | +| Lead (Pb) | 1000 | +| Cadmium (Cd) | 100 | +| Mercury (Hg) | 1000 | +| Hexavalent Chromium (Cr6+) | 1000 | +| Poly Brominated Biphenyls (PBB) | 1000 | +| Poly Brominated Diphenyl ethers (PBDE) | 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), 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. +

+ +
+ +## Company Information + +| **Company name** | Arduino S.r.l. | +|------------------|----------------------------------------------| +| **Address** | Via Andrea Appiani, 25 – 20900 Monza (Italy) | + +## Reference Documentation + +| **No.** | **Reference** | **Link** | +|--------:|------------------------------|--------------------------------------------------------------------| +| 1 | UNO R4 WiFi Documentation | https://docs.arduino.cc/hardware/uno-r4-wifi/ | +| 2 | Arduino IDE | https://www.arduino.cc/en/software | +| 3 | Arduino Cloud Editor | https://create.arduino.cc/editor | +| 4 | Language Reference | https://www.arduino.cc/reference/en/ | +| 5 | Project Hub | https://create.arduino.cc/projecthub | +| 6 | Cloud Getting Started Guide | https://docs.arduino.cc/cloud/web-editor/tutorials/getting-started | +| 7 | LED Matrix Examples | https://docs.arduino.cc/tutorials/uno-r4-wifi/led-matrix | +| 8 | Wi-Fi Examples | https://docs.arduino.cc/tutorials/uno-r4-wifi/wifi-examples | +| 9 | Library Reference | https://github.com/arduino-libraries/ | +| 10 | Online Store | https://store.arduino.cc/products/starter-kit-r4 | +| 11 | Online Starter Kit R4 Course | https://courses.arduino.cc/starterkitr4 | + +## Document Revision History + +| **Date** | **Revision** | **Changes** | +|------------|--------------|--------------------| +| 18/11/2025 | 1 | First release | diff --git a/content/hardware/09.kits/maker/starter-kit-r4/essentials.md b/content/hardware/09.kits/maker/starter-kit-r4/essentials.md new file mode 100644 index 0000000000..4b9da8d4fc --- /dev/null +++ b/content/hardware/09.kits/maker/starter-kit-r4/essentials.md @@ -0,0 +1,6 @@ +--- +productsLibrariesMap: + - Servo + - LiquidCrystal + - Arduino_CapacitiveTouch +--- diff --git a/content/hardware/09.kits/maker/starter-kit-r4/features.md b/content/hardware/09.kits/maker/starter-kit-r4/features.md new file mode 100644 index 0000000000..6ae0e1760e --- /dev/null +++ b/content/hardware/09.kits/maker/starter-kit-r4/features.md @@ -0,0 +1,59 @@ + + +The Arduino Starter Kit R4 includes everything you need to dive into the world of electronics and IoT. Based on the powerful UNO R4 WiFi, this kit guides you through 14 hands-on projects with a printed book and offers even more online. + + + + + + + +The kit is built around the powerful Arduino UNO R4 WiFi, featuring a 32-bit microcontroller, Wi-Fi®, Bluetooth®, and a 12x8 LED matrix for dynamic projects. + + + + + + + + + +Includes a wide selection of sensors, actuators, and electronic components to build 14 guided projects and countless others. + + + + + +Comes with a detailed, full-color project book that guides you from basic electronics to more complex concepts, making learning hands-on and fun. + + + + + +All book content and online projects are available in English, Spanish, Italian, German, and French, accessible and easy to learn for makers worldwide. + + + + + +Access additional projects online and learn how to connect your creations to the Arduino Cloud, bringing your ideas to the digital world. + + + + + +Built into the Arduino online editor, the AI assistant helps beginners overcome coding challenges with smart suggestions, answers, and inspiration. + + + + + +Use the exam voucher included in the box to take one attempt at the official Arduino Certification exam online, and validate your new skills with an internationally recognized certificate. + + + + + + + + diff --git a/content/hardware/09.kits/maker/starter-kit-r4/image.svg b/content/hardware/09.kits/maker/starter-kit-r4/image.svg new file mode 100644 index 0000000000..8c86b21ea8 --- /dev/null +++ b/content/hardware/09.kits/maker/starter-kit-r4/image.svg @@ -0,0 +1,2241 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/content/hardware/09.kits/maker/starter-kit-r4/product.md b/content/hardware/09.kits/maker/starter-kit-r4/product.md new file mode 100644 index 0000000000..2ccf4a50e3 --- /dev/null +++ b/content/hardware/09.kits/maker/starter-kit-r4/product.md @@ -0,0 +1,10 @@ +--- +title: Starter Kit R4 +url_shop: https://store.arduino.cc/products/starter-kit-r4 +primary_button_url: https://courses.arduino.cc/starter-kit-r4/ +primary_button_title: Go To Course +sku: [K000007_R4, K000007_R4-6P] +productCode: '228' +--- + +The Arduino® Starter Kit R4 is your hands-on introduction to the world of electronics and programming. This all-in-one kit includes everything you need to get started: a powerful [Arduino UNO R4 WiFi](../../hardware/uno-r4-wifi/), a wide selection of electronic components, and a detailed project book. Follow 13+ easy projects to learn the fundamentals, from making LEDs blink to controlling motors and reading sensors. Once you master the basics, online content will guide you in using the board's advanced features: Wi-Fi®, Bluetooth®, and the 12x8 LED matrix, to build Internet of Things projects. diff --git a/content/hardware/09.kits/maker/starter-kit-r4/tech-specs.md b/content/hardware/09.kits/maker/starter-kit-r4/tech-specs.md new file mode 100644 index 0000000000..1b7b493ef2 --- /dev/null +++ b/content/hardware/09.kits/maker/starter-kit-r4/tech-specs.md @@ -0,0 +1 @@ +Here you will find the technical specifications for the Arduino® Starter Kit R4. \ No newline at end of file diff --git a/content/hardware/09.kits/maker/starter-kit-r4/tech-specs.yml b/content/hardware/09.kits/maker/starter-kit-r4/tech-specs.yml new file mode 100644 index 0000000000..192dfe3691 --- /dev/null +++ b/content/hardware/09.kits/maker/starter-kit-r4/tech-specs.yml @@ -0,0 +1,40 @@ +Kit: + Name: Arduino® Starter Kit R4 + SKU: K000007_R4 +Components: + Arduino UNO R4 WiFi (ABX00087): 1x + USB-C® cable: 1x + 9V battery snap connector: 1x + Breadboard: 1x + Easy-to-assemble base: 1x + Solid core jumper wires: 70x + Stranded jumper wires: 2x + Male pin strip (40x1): 1x + Pushbuttons: 6x + LCD display (16x2 characters): 1x + Piezo capsule: 1x + Bright white LED: 1x + RGB LED: 1x + Red LEDs: 8x + Green LEDs: 8x + Yellow LEDs: 8x + Blue LEDs: 3x + Phototransistors: 4x + Temperature sensor: 1x + Tilt sensor: 1x + Small DC motor (6/9 V): 1x + Small servo motor: 1x + H-bridge motor driver: 1x + Optocouplers: 2x + MOSFET transistor: 1x + Diodes: 3x + Potentiometers (10k ohm): 3x + Capacitors (100 µF): 3x + Resistors (220 Ω): 11x + Resistors (560 Ω): 3x + Resistors (1 kΩ): 3x + Resistors (4.7 kΩ): 3x + Resistors (10 kΩ): 11x + Resistors (1 MΩ): 7x + Resistors (10 MΩ): 3x + Transparent color gels (red, green, blue): 3x \ No newline at end of file diff --git a/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-wifi/giga-wifi.md b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-wifi/giga-wifi.md index cb7d2a0811..2061ad87ba 100644 --- a/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-wifi/giga-wifi.md +++ b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-wifi/giga-wifi.md @@ -375,12 +375,12 @@ This code is in the public domain. #include #include -int timezone = -1; //this is GMT -1. +int timezone = -1; //this is GMT -1. -int status = WL_IDLE_STATUS; - -char ssid[] = "Flen"; // your network SSID (name) -char pass[] = ""; // your network password (use for WPA, or use as key for WEP) +#include "arduino_secrets.h" +///////please enter your sensitive data in the Secret tab/arduino_secrets.h +char ssid[] = SECRET_SSID; // your network SSID (name) +char pass[] = SECRET_PASS; // your network password (use for WPA, or use as key for WEP) int keyIndex = 0; // your network key index number (needed only for WEP) @@ -416,11 +416,12 @@ void setup() { } // attempt to connect to WiFi network: - while (status != WL_CONNECTED) { + while (true) { Serial.print("Attempting to connect to SSID: "); Serial.println(ssid); // Connect to WPA/WPA2 network. Change this line if using open or WEP network: - status = WiFi.begin(ssid, pass); + if (WiFi.begin(ssid, pass) == WL_CONNECTED) + break; // wait 10 seconds for connection: delay(10000); @@ -475,8 +476,8 @@ unsigned long parseNtpPacket() { const unsigned long secsSince1900 = highWord << 16 | lowWord; constexpr unsigned long seventyYears = 2208988800UL; const unsigned long epoch = secsSince1900 - seventyYears; - - const unsigned long new_epoch = epoch + (3600 * timezone); //multiply the timezone with 3600 (1 hour) + + const unsigned long new_epoch = epoch + (3600 * timezone); //multiply the timezone with 3600 (1 hour) set_time(new_epoch); @@ -1660,4 +1661,4 @@ void onMqttMessage(int messageSize) { Serial.println(); Serial.println(); } -``` \ No newline at end of file +``` diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/AdressChangeIDE.png b/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/AdressChangeIDE.png deleted file mode 100644 index d5cd3fd195..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/AdressChangeIDE.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/Modulino_Buttons_Power_Tree.png b/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/Modulino_Buttons_Power_Tree.png deleted file mode 100644 index 3281df8b8e..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/Modulino_Buttons_Power_Tree.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/adressChanger.png b/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/adressChanger.png deleted file mode 100644 index c6eae670c8..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/adressChanger.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/connection-guide-buttons-jumper.png b/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/connection-guide-buttons-jumper.png deleted file mode 100644 index a2aa5b68df..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/connection-guide-buttons-jumper.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/connection-guide-buttons-qwiic-chain.png b/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/connection-guide-buttons-qwiic-chain.png deleted file mode 100644 index ae538f5949..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/connection-guide-buttons-qwiic-chain.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/connection-guide-buttons-qwiik.png b/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/connection-guide-buttons-qwiik.png deleted file mode 100644 index 4df7f0508a..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/connection-guide-buttons-qwiik.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/connection-guide-buttons.png b/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/connection-guide-buttons.png deleted file mode 100644 index 473282f2a9..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/connection-guide-buttons.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/how-to-buttons-ardu.md b/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/how-to-buttons-ardu.md deleted file mode 100644 index 1ff1957351..0000000000 --- a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/how-to-buttons-ardu.md +++ /dev/null @@ -1,349 +0,0 @@ ---- -title: "How To Use The Modulino Buttons" -description: "Learn how to get the most out of your Modulino Buttons." -tags: - - Modulino - - QWIIC - - I2C -author: 'Pedro Sousa Lima' -hardware: - - hardware/11.modulinos/modulinos/modulino-buttons -software: - - ide-v2 - - web-editor ---- - -The Modulino Buttons is a modular sensor that provides tactile input and visual feedback, making it perfect to add interactive controls to your projects! -The Modulino form factor is shaped with two QWIIC connectors and the I²C protocol integration, allowing the connection and programming of multiple Modulino nodes in a very simple way. In addition to the QWIIC's connectors, the Modulino nodes also expose solderable pins that can be used in multiple ways and make them compatible with boards that are not QWIIC compatible. - - -![Module demonstration](assets/connection-guide-buttons.gif) - -Pressing a button pulls the signal LOW, and each button has an onboard pull-up resistor. The LEDs can be controlled independently through the onboard microcontroller. - - -## General Characteristics - -The **Modulino Buttons** module uses three tactile buttons and LEDs, which do not have native I²C capabilities. Instead, the buttons and LEDs are controlled by the Modulino's onboard microcontroller (STM32C011F4U6TR). This microcontroller provides I²C communication, allowing for flexible reading of button states and control of the LEDs. One unique feature of this setup is the ability to change the I²C address via software. This means the address can be modified based on your application needs, making it adaptable to different system configurations. - -| Specification | Details | -|-------------------|-----------------------------| -| Buttons | 3 × Tactile pushbuttons | -| LEDs | 3 × Indicator LEDs (orange) | -| Power Supply | 3.3 V | -| Interface | UART, SWD, I2C | -| Pull-up Resistors | Integrated on button inputs | - - -The default I²C address for the **Modulino Buttons** module is: - -| Modulino I²C Address | Hardware I²C Address | Editable Addresses (HEX) | -|----------------------|----------------------|-------------------------------------------------| -| 0x7C | 0x3E | Any custom address (via software configuration) | - -When scanning for I²C address on the bus, you might find the modulino using the **Hardware I²C Address**. However, you should always use the **Modulino I²C Address** when using the official Modulino library. - -Later in this article we teach how to [change the address](#how-to-change-i2c-address). - -## Pinout - -The tactile buttons and LEDs are the core components of this module. These input and output devices are controlled by an onboard STM32 microcontroller, which supports digital communication (I²C), meaning it connects directly to the I²C bus on the module without requiring additional conversion circuitry. - -![Arduino Buttons Pinout](assets/ButtonsPinouts.png) - -### 1x10 Header - -| Pin | Function | -|-------|----------------| -| A | Button A | -| GND | Ground | -| 3V3 | 3.3 V Power | -| PF2 | RESET | -| SWCLK | SWD Clock | -| SWDIO | SWD Data | -| TX1 | USART Transmit | -| RX1 | USART Receive | -| B | Button B | -| C | Button C | - -- **A: Button A** – This pin connects directly to button A. -- **GND: Ground** – Ground connection for power and signal reference. -- **3V3: Power** – 3.3 V power supply input. -- **PF2: RESET** – The reset pin for the microcontroller, which can be used to reset the system. -- **SWCLK: SWD Clock** – Used for providing the clock signal in the SWD interface. -- **SWDIO: SWD Data** – Used for debugging, as part of the Serial Wire Debug (SWD) interface. -- **TX1: USART Transmit** – Used for transmitting data over UART communication. -- **RX1: USART Receive** – Used for receiving data over UART communication. -- **B: Button B** – This pin connects directly to button B. -- **C: Button C** – This pin connects directly to button C. - -### 1x4 Header (I2C) - -The pinout for the Modulino Buttons is shown below. While the recommended connection method is via the QWIIC connectors, this solderable header provides a connection option when using the modulino with a non-QWIIC compatible board. - -| Pin | Function | -|-------|--------------| -| GND | Ground | -| 3.3 V | Power Supply | -| SDA | I²C Data | -| SCL | I²C Clock | - -## Power Specifications - -The board is typically powered by +3.3 VDC when using the QWIIC interface as per the I²C standard. - -| Parameter | Condition | Minimum | Typical | Maximum | Unit | -|------------------|-------------------|---------|-------------|---------|------| -| Supply Voltage | - | - | 3.3 (QWIIC) | - | V | -| LED Current Draw | Single LED Active (A,B or C) | - | 2.5 | - | mA | - -The module additionally includes a power LED that draws 1 mA and turns on as soon as it is powered. J1 (Qwiic connector), J2 (Qwiic connector), and the headers all share the same power branch. The power distribution of the module is therefore as follows: - -![Power Tree Modulino Buttons](assets/Modulino_Buttons_Power_Tree.png) - -## Schematic - -The Modulino Buttons uses a simple circuit, as shown in the schematic below: - -![Full Schematic Modulino Buttons](assets/schematic.png) - -The main components are the **three tactile buttons**, **three user-programmable LEDs** and the **STM32C011F4U6TR** microcontroller (U1), which handles button state reading, LED control, as well as I²C communication. - -You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, this is the recommended method) or the **solderable pins** (J4). The board runs on **3.3V**, which comes from the QWIIC cable or the **3V3 pin** on J4. - -There's also a small power LED indicator that lights up when the board is on. -You can grab the full schematic and PCB files from the [Modulino Buttons](https://docs.arduino.cc/hardware/modulinos/modulino-buttons) product page. - -## How To Connect Your Modulino - -The easiest and most reliable way to connect your Modulino is through the QWIIC Connect System. It’s plug-and-play, uses standard I²C, and makes it easy to join multiple modules. If your board supports QWIIC, this is the recommended way to go. - -Note that the dedicated I²C pins will differ from board to board meaning it is always a good idea to check your specific model. - -![Modulino Wiring Options QWIIC(A - recommended) and Header(B)](assets/connection-guide-buttons.png) - -### QWIIC Connector - -Whenever available, the **QWIIC Connect System** is the preferred method. Connecting to the Modulino is extremely simple, just use a standard QWIIC cable to connect your board to either of the QWIIC connectors on the Modulino. Because the cable and connectors are polarized, there is no need to worry about accidentally swapping connections. - -QWIIC is a plug-and-play I²C Connect System that uses standardized 4-pin connectors: - -- GND -- 3.3V -- SDA (Data) -- SCL (Clock) - -![Connection Guide QWIIC](assets/connection-guide-buttons-qwiik.png) - -The Modulino features two QWIIC connectors, which are internally connected in parallel. This means you can daisy-chain multiple modules easily by connecting additional QWIIC cables between them. - -### Solderable Header - -When QWIIC is not available, you can use the exposed solderable pins on the module. You can solder pins to the unpopulated pads; just remember the pinout provided in this guide to connect to the right pins of your board. - -![Connection Guide Solder Pads](assets/connection-guide-buttons-jumper.png) - -## Daisy-Chaining Multiple Modulino Nodes - - -Regardless of whether you connect the first Modulino via QWIIC or through the solderable pins, you can still take advantage of the extra QWIIC connector to daisy-chain additional modules. -Each Modulino includes two QWIIC connectors wired in parallel, allowing you to connect one module to the next in a chain. As long as each module is configured with a unique I²C address, they can all communicate on the same bus. - -This approach keeps your setup clean, modular, and expandable without adding extra wiring complexity. - -![Modulino Wiring Options](assets/connection-guide-buttons-qwiic-chain.png) - -***The number of modules you can connect will depend on what modules you are chaining together, as this system allows for multiple sensors from different manufacturers to be added. Also, the cables you use for these connections will play a significant role in the setup’s performance. Ensure your cables are properly connected and capable of handling the required data transfer. -Each module should have a unique address on a chain if you plan to address them individually. Later in this article we teach how to [change the address](#how-to-change-i2c-address). Multiple modules with the same address will cause conflicts on the I²C bus and will not allow you to address them individually.*** - -## How To Use Your Modulino - -### Installing The Modulino Library - -You need the official Modulino library available [here](https://docs.arduino.cc/libraries/modulino/) to use the Modulino Buttons. - -With the Arduino IDE you get some tools that make adding a library easier. To learn how to install the IDE please visit our [page](https://docs.arduino.cc/software/ide-v2/tutorials/getting-started/ide-v2-downloading-and-installing/). - -After opening the IDE, a tab should be visible on the left. Press the book icon for "library" as highlighted in the image. - -![IDE Library Tab](assets/IDE-Left-Tab.png) - -The process should look like this: - -![Library Install](assets/library-install.gif) - -A message will appear after the installation is successful. - -### Getting Button Press Data - -Interacting with the Modulino Buttons module is simple using the `Modulino` library. - -For the **Buttons** module, there are two key functions: - -- `update()`**:** Requests new data from the button module. -- `isPressed(index)`**:** Checks if a specific button (`A`, `B`, or `C`) is pressed. -- `setLeds(A, B, C)`**:** Sets the state of the LED (`A`, `B`, or `C`). -- ```Modulino.begin();```: By default the Modulino library uses ```Wire1``` if your connection is in a different Wire you will have to edit it, check [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/) (by default the Modulino library uses ```Wire1``` if your board model has a different pinout for the dedicated I²C pins you might have to edit it. More information on **Wire** can be found [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/)) for the library's hardware compatibility. More information on **Wire** can be found [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/). - -Here is an example sketch demonstrating how to use these functions to detect button presses: - -```arduino -#include - -// Create object instance -ModulinoButtons buttons; - -void setup() { - Serial.begin(9600); - Modulino.begin(); - buttons.begin(); - - // Function to control the LEDs on top of each button - buttons.setLeds(true, true, true); -} - -void loop() { - // Request new data from the Modulino Buttons - if (buttons.update()) { - // Check if any button has been pressed - if (buttons.isPressed(0)) { - Serial.println("Button A pressed!"); - } else if (buttons.isPressed(1)) { - Serial.println("Button B pressed!"); - } else if (buttons.isPressed(2)) { - Serial.println("Button C pressed!"); - } - } -} -``` -The code example provided shows how to initialize the button module, read button states, and control the LEDs. The program begins by turning on all three LEDs, then continuously checks for button presses and reports them through the serial monitor. Each button is identified by its index (0 for A, 1 for B, 2 for C), making it easy to expand the functionality for more complex interactions. This simple interface can be adapted to trigger various actions in your projects, from controlling other components to navigating menus or implementing game controls. - -### Detecting Button Events - -The Modulino Buttons module can be enhanced with the [Button2 library](https://docs.arduino.cc/libraries/button2/) to detect various button events beyond simple presses. This approach allows you to respond to single clicks, double clicks, triple clicks, and long presses. - -For the **Button Events** functionality, there are several key functions: - -- `setButtonStateFunction(function)`**:** Sets a custom function that provides the button state. -- `setClickHandler(function)`**:** Sets a handler for single-click events. -- `setDoubleClickHandler(function)`**:** Sets a handler for double-click events. -- `setTripleClickHandler(function)`**:** Sets a handler for triple-click events. -- `setLongClickHandler(function)`**:** Sets a handler for long-press events. -- `loop()`**:** Must be called repeatedly to check for button state changes. - -Here is an example sketch demonstrating how to implement button event detection: - -```arduino -#include "Modulino.h" -#include "Button2.h" - -Button2 button; -ModulinoButtons modulino_buttons; - -uint8_t button0StateHandler() { - modulino_buttons.update(); - return modulino_buttons.isPressed(0) ? LOW : HIGH; // fake a normal button -> LOW = pressed -} - -void handler(Button2& btn) { - switch (btn.getType()) { - case single_click: - break; - case double_click: - Serial.print("double "); - break; - case triple_click: - Serial.print("triple "); - break; - case long_click: - Serial.print("long"); - break; - } - Serial.print("click"); - Serial.print(" ("); - Serial.print(btn.getNumberOfClicks()); - Serial.println(")"); -} - -void setup() { - - Serial.begin(115200); - - Modulino.begin(); - modulino_buttons.begin(); - - button.setDebounceTime(35); - button.setButtonStateFunction(button0StateHandler); - button.setClickHandler(handler); - button.setDoubleClickHandler(handler); - button.setTripleClickHandler(handler); - button.setLongClickHandler(handler); - button.begin(BTN_VIRTUAL_PIN); -} - -void loop() { - button.loop(); -} -``` - -The code example provided shows how to integrate the Button2 library with the Modulino Buttons module to detect advanced button interactions. It creates a virtual button connected to Button A (index 0) and sets up handlers for different types of clicks. The `button0StateHandler()` function serves as a bridge between the Modulino hardware and the Button2 library by converting the button state to the expected format. When running, the program will detect and report single clicks, double clicks, triple clicks, and long presses through the serial monitor. This approach enables more sophisticated user interfaces in your projects, from navigating multi-level menus to implementing different functions based on how a user interacts with a single button. - -### How To Change I2C Address - -An example sketch, AddressChanger, is also included with the library inside the `Utilities` folder and available [here](https://github.com/arduino-libraries/Modulino/blob/main/examples/Utilities/AddressChanger/AddressChanger.ino). This sketch changes the I²C address at a software level on the Module's microcontroller. - -![Example location on the IDE](assets/AdressChangeIDE.png) - -- Connect the module to your board, remove any other modules that might be in the chain. Connection must be via I²C. -- Upload the sketch. -- Open the Serial Monitor. -- Text should now appear. Make sure the correct bauld-rate is selected if the displayed characters seem corrupted. - - ![Expected console output](assets/adressChanger.png) - -- Select the address and confirm. Valid I²C addresses range from 0x08 to 0x77 (7-bit values in hexadecimal format, e.g., 0x42). -- Your address should now have changed. Make sure to take note of the selected address. - -To keep track of the address in use the module has a white rectangle on the back. Feel free to use this to write the address that was chosen. - -When using a custom address in your sketch, you'll need to specify this address when creating the module object. For example: -```arduino -ModulinoButtons buttons(0x3E); // Replace 0x3E with your specific address -``` - - -## Troubleshooting - -### Buttons Not Responding - -If your Modulino's power LED isn't on or the buttons aren't responsive, first check that the board is properly connected: - -- Ensure both the board and the Modulino are connected to your computer, and that the power LEDs on both are lit. -- If the issue persists, make sure the Qwiic cable is properly clicked into place. - -### Library Not Installed Properly - -If you encounter an issue with the `#include "modulino.h"` command, verify that the Modulino library is correctly installed: - -- Check your IDE to ensure the library is installed and up-to-date. -- Re-install the library through the Library Manager. - -### LEDs Not Working - -If the LEDs aren't lighting up as expected, make sure: - -- The correct LED states are being set in your code (true for on, false for off). -- All exposed electronics are not touching any conductive surfaces, as this could interfere with the operation. - -## Conclusion - -The **Modulino Buttons** is a digital input and output device that communicates over I²C and follows the Modulino form factor. It includes standard Qwiic connectors for quick, solderless connections and easy daisy-chaining with other modules. Paired with the Modulino library, it makes detecting button presses and controlling LEDs straightforward, allowing you to focus on experimenting or building your system logic. It's a small, reliable module suited for both user interfaces and interactive control systems. - -## What Is Next? - -Now that you've learned how to use your Modulino Buttons, you're all set to integrate it into your projects! - -- Create a simple menu system where each button performs a different function. -- Build a game controller for a simple arcade-style game. -- Use the buttons to control other Modulino devices in your project. -- Design an interactive installation where button presses trigger different visual and audio effects. \ No newline at end of file diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/ButtonsPinouts.png b/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/ButtonsPinouts.png deleted file mode 100644 index cd1e959c27..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/ButtonsPinouts.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/Modulino_Buttons_Power_Tree.png b/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/Modulino_Buttons_Power_Tree.png deleted file mode 100644 index 3281df8b8e..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/Modulino_Buttons_Power_Tree.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/connection-guide-buttons-jumper.png b/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/connection-guide-buttons-jumper.png deleted file mode 100644 index a2aa5b68df..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/connection-guide-buttons-jumper.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/connection-guide-buttons-qwiic-chain.png b/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/connection-guide-buttons-qwiic-chain.png deleted file mode 100644 index ae538f5949..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/connection-guide-buttons-qwiic-chain.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/connection-guide-buttons-qwiik.png b/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/connection-guide-buttons-qwiik.png deleted file mode 100644 index 4df7f0508a..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/connection-guide-buttons-qwiik.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/connection-guide-buttons.gif b/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/connection-guide-buttons.gif deleted file mode 100644 index 73e0d48f1c..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/connection-guide-buttons.gif and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/connection-guide-buttons.png b/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/connection-guide-buttons.png deleted file mode 100644 index 473282f2a9..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/connection-guide-buttons.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/mp-usb-connection.png b/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/mp-usb-connection.png deleted file mode 100644 index fb059f9e8b..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/mp-usb-connection.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/schematic.png b/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/schematic.png deleted file mode 100644 index df5f2cfb25..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/schematic.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/how-to-buttons-mp.md b/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/how-to-buttons-mp.md deleted file mode 100644 index 579cc4dcde..0000000000 --- a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/how-to-buttons-mp.md +++ /dev/null @@ -1,299 +0,0 @@ ---- -title: "How To Use The Modulino Buttons And MicroPython" -description: "Learn how to get the most out of your Modulino Buttons in a MicroPython environment." -tags: - - Modulino - - QWIIC - - I2C -author: 'Pedro Sousa Lima' -hardware: - - hardware/11.modulinos/modulinos/modulino-buttons -software: - - ide-v2 - - web-editor ---- - -The Modulino Buttons is a modular sensor that provides tactile input and visual feedback, making it perfect to add interactive controls to your projects! -The Modulino form factor is shaped with two QWIIC connectors and the I²C protocol integration, allowing the connection and programming of multiple Modulino nodes in a very simple way. In addition to the QWIIC's connectors, the Modulino nodes also expose solderable pins that can be used in multiple ways and make them compatible with boards that are not QWIIC compatible. - - -![Module demonstration](assets/connection-guide-buttons.gif) - -Pressing a button pulls the signal LOW, and each button has an onboard pull-up resistor. The LEDs can be controlled independently through the onboard microcontroller. - - -## General Characteristics - -The **Modulino Buttons** module uses three tactile buttons and LEDs, which do not have native I²C capabilities. Instead, the buttons and LEDs are controlled by the Modulino's onboard microcontroller (STM32C011F4U6TR). This microcontroller provides I²C communication, allowing for flexible reading of button states and control of the LEDs. One unique feature of this setup is the ability to change the I²C address via software. This means the address can be modified based on your application needs, making it adaptable to different system configurations. - -| Specification | Details | -|-------------------|-----------------------------| -| Buttons | 3 × Tactile pushbuttons | -| LEDs | 3 × Indicator LEDs (orange) | -| Power Supply | 3.3 V | -| Interface | UART, SWD, I2C | -| Pull-up Resistors | Integrated on button inputs | - - -The default I²C address for the **Modulino Buttons** module is: - -| Modulino I²C Address | Hardware I²C Address | Editable Addresses (HEX) | -|----------------------|----------------------|-------------------------------------------------| -| 0x7C | 0x3E | Any custom address (via software configuration) | - -When scanning for I²C address on the bus, you might find the modulino using the **Hardware I²C Address**. However, you should always use the **Modulino I²C Address** when using the official Modulino library. -Later in this article we teach how to [change the address](#how-to-change-i2c-address). - -## Pinout - -The tactile buttons and LEDs are the core components of this module. These input and output devices are controlled by an onboard STM32 microcontroller, which supports digital communication (I²C), meaning it connects directly to the I²C bus on the module without requiring additional conversion circuitry. - -![Arduino Buttons Pinout](assets/ButtonsPinouts.png) - -### 1x10 Header - -| Pin | Function | -|-------|----------------| -| A | Button A | -| GND | Ground | -| 3V3 | 3.3 V Power | -| PF2 | RESET | -| SWCLK | SWD Clock | -| SWDIO | SWD Data | -| TX1 | USART Transmit | -| RX1 | USART Receive | -| B | Button B | -| C | Button C | - -- **A: Button A** – This pin connects directly to button A. -- **GND: Ground** – Ground connection for power and signal reference. -- **3V3: Power** – 3.3 V power supply input. -- **PF2: RESET** – The reset pin for the microcontroller, which can be used to reset the system. -- **SWCLK: SWD Clock** – Used for providing the clock signal in the SWD interface. -- **SWDIO: SWD Data** – Used for debugging, as part of the Serial Wire Debug (SWD) interface. -- **TX1: USART Transmit** – Used for transmitting data over UART communication. -- **RX1: USART Receive** – Used for receiving data over UART communication. -- **B: Button B** – This pin connects directly to button B. -- **C: Button C** – This pin connects directly to button C. - -### 1x4 Header (I2C) - -The pinout for the Modulino Buttons is shown below. While the recommended connection method is via the QWIIC connectors, this solderable header provides a connection option when using the modulino with a non-QWIIC compatible board. - -| Pin | Function | -|-------|--------------| -| GND | Ground | -| 3.3 V | Power Supply | -| SDA | I²C Data | -| SCL | I²C Clock | - -## Power Specifications - -The board is typically powered by +3.3 VDC when using the QWIIC interface as per the I²C standard. - -| Parameter | Condition | Minimum | Typical | Maximum | Unit | -|------------------|-------------------|---------|-------------|---------|------| -| Supply Voltage | - | - | 3.3 (QWIIC) | - | V | -| LED Current Draw | Single LED Active (A,B or C) | - | 2.5 | - | mA | - -The module additionally includes a power LED that draws 1 mA and turns on as soon as it is powered. J1 (Qwiic connector), J2 (Qwiic connector), and the headers all share the same power branch. The power distribution of the module is therefore as follows: - -![Power Tree Modulino Buttons](assets/Modulino_Buttons_Power_Tree.png) - -## Schematic - -The Modulino Buttons uses a simple circuit, as shown in the schematic below: - -![Full Schematic Modulino Buttons](assets/schematic.png) - -The main components are the **three tactile buttons**, **three user-programmable LEDs** and the **STM32C011F4U6TR** microcontroller (U1), which handles button state reading, LED control, as well as I²C communication. - -You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, this is the recommended method) or the **solderable pins** (J4). The board runs on **3.3V**, which comes from the QWIIC cable or the **3V3 pin** on J4. - -There's also a small power LED indicator that lights up when the board is on. - -You can grab the full schematic and PCB files from the [Modulino Buttons](https://docs.arduino.cc/hardware/modulinos/modulino-buttons) product page. - -## How To Connect Your Modulino - -The easiest and most reliable way to connect your Modulino is through the QWIIC Connect System. It’s plug-and-play, uses standard I²C, and makes it easy to join multiple modules. If your board supports QWIIC, this is the recommended way to go. - -Note that the dedicated I²C pins will differ from board to board meaning it is always a good idea to check your specific model. - -![Modulino Wiring Options QWIIC(A - recommended) and Header(B)](assets/connection-guide-buttons.png) - -### QWIIC Connector - -Whenever available, the **QWIIC Connect System** is the preferred method. Connecting to the Modulino is extremely simple, just use a standard QWIIC cable to connect your board to either of the QWIIC connectors on the Modulino. Because the cable and connectors are polarized, there is no need to worry about accidentally swapping connections. -QWIIC is a plug-and-play I²C Connect System that uses standardized 4-pin connectors: - -- GND -- 3.3V -- SDA (Data) -- SCL (Clock) - -![Connection Guide QWIIC](assets/connection-guide-buttons-qwiik.png) - -The Modulino features two QWIIC connectors, which are internally connected in parallel. This means you can daisy-chain multiple modules easily by connecting additional QWIIC cables between them. - -### Solderable Header - -When QWIIC is not available, you can use the exposed solderable pins on the module. You can solder pins to the unpopulated pads; just remember the pinout provided in this guide to connect to the right pins of your board. - -![Connection Guide Solder Pads](assets/connection-guide-buttons-jumper.png) - - -## Daisy-Chaining Multiple Modulino Nodes - - -Regardless of whether you connect the first Modulino via QWIIC or through the solderable pins, you can still take advantage of the extra QWIIC connector to daisy-chain additional modules. -Each Modulino includes two QWIIC connectors wired in parallel, allowing you to connect one module to the next in a chain. As long as each module is configured with a unique I²C address, they can all communicate on the same bus. - -This approach keeps your setup clean, modular, and expandable without adding extra wiring complexity. - -![Modulino Wiring Options](assets/connection-guide-buttons-qwiic-chain.png) - -***The number of modules you can connect will depend on what modules you are chaining together, as this system allows for multiple sensors from different manufacturers to be added. Also, the cables you use for these connections will play a significant role in the setup’s performance. Ensure your cables are properly connected and capable of handling the required data transfer. -Each module should have a unique address on a chain if you plan to address it independently. Later in this article we teach how to [change the address](#how-to-change-i2c-address). Multiple modules with the same address will cause conflicts on the I²C bus and will not allow you to address them individually.*** - - -## How To Program Your Modulino - -### Installing The Modulino Library - -To program your Modulino it is recommended you use the official ```Modulino``` micropython library available [here](https://github.com/arduino/arduino-modulino-mpy). The library is fully compatible with the no **Arduino Lab for MicroPython**. - -For information on installing the **Arduino Lab for MicroPython** please visit our [page](https://docs.arduino.cc/micropython/first-steps/install-guide/). - -The ```Modulino``` library is not available by default on MicroPython devices hence installation is needed. - -To simplify the process the [MicroPython Package Installer](https://github.com/arduino/lab-micropython-package-installer/releases) is recommended as it will provide a graphical interface to guide installation. - -After installation, you should now be able to: - -1. Open the tool. -2. Plug in your board to the computer. - - ![USB Connection](assets/mp-usb-connection.png) - - If the board does not appear in the Detected Boards section, click Reload. If the board is still undetected, ensure no other programs (e.g., a code editor) are using the board's COM port. - -3. Search for the ```Modulino``` package by filling in the text box on the search feature. -4. Click Install and wait for the installation confirmation. -5. Disconnect the board from the tool before returning to your code editor to avoid conflicts due to a busy COM port. - -![Package Installer Overview](assets/package-installer-overview.png) - -The module should now be includable in your program using: - -```from modulino import ModulinoThermo``` - -### Getting Button Input and Controlling LEDs - -Interacting with buttons using the `Modulino` library is straightforward. For the **Modulino Buttons** module, there are key functions to detect button presses and control the LEDs associated with each button. - -### Detecting Button Presses - -Each button supports different interactions: - -- **`.on_button_a_press`**, **`.on_button_b_press`**, **`.on_button_c_press`** - Triggers when a button is pressed. -- **`.on_button_a_long_press`**, **`.on_button_b_long_press`**, **`.on_button_c_long_press`** - Triggers when a button is held down for a longer duration. -- **`.on_button_a_release`**, **`.on_button_b_release`**, **`.on_button_c_release`** - Triggers when a button is released. - -By default the Modulino library uses ```Wire1``` if your board model has a different pinout for the dedicated I²C pins you might have to edit it as instructed [here](https://github.com/arduino/arduino-modulino-mpy/tree/main/docs#%E2%84%B9%EF%B8%8F-using-3rd-party-boards). More information on **Wire** can be found [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/). - -### Reading Button Inputs And Controlling LEDs - -```python -from modulino import ModulinoButtons -from time import sleep - -buttons = ModulinoButtons() - -# Define button press actions -buttons.on_button_a_press = lambda : print("Button A pressed") -buttons.on_button_a_long_press = lambda : print("Button A long press") -buttons.on_button_a_release = lambda : print("Button A released") - -buttons.on_button_b_press = lambda : print("Button B pressed") -buttons.on_button_b_long_press = lambda : print("Button B long press") -buttons.on_button_b_release = lambda : print("Button B released") - -buttons.on_button_c_press = lambda : print("Button C pressed") -buttons.on_button_c_long_press = lambda : print("Button C long press") -buttons.on_button_c_release = lambda : print("Button C released") - -# LED Sequence: Turn each LED on with a delay, then turn them off -buttons.led_a.on() -sleep(0.5) -buttons.led_b.on() -sleep(0.5) -buttons.led_c.on() -sleep(0.5) -buttons.set_led_status(False, False, False) # Turn off all LEDs - -while True: - buttons_state_changed = buttons.update() - - if buttons_state_changed: - led_a_status = buttons.is_pressed(0) # Turn LED A on if button A is pressed - led_b_status = buttons.is_pressed(1) # Turn LED B on if button B is pressed - led_c_status = buttons.is_pressed(2) # Turn LED C on if button C is pressed - buttons.set_led_status(led_a_status, led_b_status, led_c_status) -``` - -### How To Change Address - -A sketch is also available included with the library named `AddressChanger` and also available [here](https://github.com/arduino/arduino-modulino-mpy/blob/main/examples/change_address.py). This sketch changes the I2C address at a software level on the Module's microcontroller. - -- Connect the module to your board via I2C, ensuring no other modules are in the chain. -- Run the script in a MicroPython environment. -- Follow the on-screen instructions (REPL) to select the device and enter a new address. Valid I²C addresses range from 0x08 to 0x77 (7-bit values in hexadecimal format, e.g., 0x42). -- The script will attempt to change the address and confirm success. - -To keep track of the address in use, the module has a white rectangle on the back. Feel free to use this to write the address that was chosen. - -When using a custom address in your MicroPython sketch, you'll need to specify this address when creating the module object. For example: - -```python -buttons_module = ModulinoButtons(address=0x45) # Replace 0x45 with your specific address -``` - -## Troubleshooting - -### Buttons Not Responding - -If your Modulino's power LED isn't on or the buttons aren't responsive, first check that the board is properly connected: - -- Ensure both the board and the Modulino are connected to your computer, and that the power LEDs on both are lit. -- If the issue persists, make sure the Qwiic cable is properly clicked into place. - -### Library Not Installed Properly - -If you encounter an issue with the `import ModulinoButtons` command, verify that the Modulino library is correctly installed: - -- Check your library installer to ensure the library is installed and up-to-date. -- Re-install the library through the Library Manager. - -### LEDs Not Working - -If the LEDs aren't lighting up as expected, make sure: - -- The correct LED states are being set in your code (true for on, false for off). -- All exposed electronics are not touching any conductive surfaces, as this could interfere with the operation. - -## Conclusion - -The **Modulino Buttons** is a digital input and output device that communicates over I²C and follows the Modulino form factor. It includes standard Qwiic connectors for quick, solderless connections and easy daisy-chaining with other modules. Paired with the Modulino library, it makes detecting button presses and controlling LEDs straightforward, allowing you to focus on experimenting or building your system logic. It's a small, reliable module suited for both user interfaces and interactive control systems. - -## What Is Next? - -Now that you've learned how to use your Modulino Buttons, you're all set to integrate it into your projects! - -- Create a simple menu system where each button performs a different function. -- Build a game controller for a simple arcade-style game. -- Use the buttons to control other Modulino devices in your project. -- Design an interactive installation where button presses trigger different visual and audio effects. \ No newline at end of file diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/IDE-Left-Tab.png b/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/IDE-Left-Tab.png deleted file mode 100644 index c7bb86575e..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/IDE-Left-Tab.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/Modulino_Buzzer_Power_Tree.png b/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/Modulino_Buzzer_Power_Tree.png deleted file mode 100644 index 7ca852c52b..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/Modulino_Buzzer_Power_Tree.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/addressChangeIDE.png b/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/addressChangeIDE.png deleted file mode 100644 index d5cd3fd195..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/addressChangeIDE.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/adressChanger.png b/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/adressChanger.png deleted file mode 100644 index c6eae670c8..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/adressChanger.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/connection-guide-buzzer-jumper.png b/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/connection-guide-buzzer-jumper.png deleted file mode 100644 index 1a45271300..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/connection-guide-buzzer-jumper.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/connection-guide-buzzer-qwiic-chain.png b/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/connection-guide-buzzer-qwiic-chain.png deleted file mode 100644 index a90c8fdf46..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/connection-guide-buzzer-qwiic-chain.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/connection-guide-buzzer-qwiik.png b/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/connection-guide-buzzer-qwiik.png deleted file mode 100644 index 6ee9d1c03a..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/connection-guide-buzzer-qwiik.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/connection-guide-buzzer.png b/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/connection-guide-buzzer.png deleted file mode 100644 index 4f6bd1cd6c..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/connection-guide-buzzer.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/library-install.gif b/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/library-install.gif deleted file mode 100644 index 16f396c353..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/library-install.gif and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/content.md b/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/content.md deleted file mode 100644 index 0c74563365..0000000000 --- a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/content.md +++ /dev/null @@ -1,268 +0,0 @@ ---- -title: "How To Use The Modulino Buzzer" -description: "Learn how to get the most out of your Modulino Buzzer." -tags: - - Modulino - - QWIIC - - I2C -author: 'Pedro Sousa Lima' -hardware: - - hardware/11.modulinos/modulinos/modulino-buzzer -software: - - ide-v2 - - web-editor ---- - -The Modulino Buzzer is a modular sensor that generates audio output, making it perfect to add sound feedback to your projects! -The Modulino form factor is shaped with two QWIIC connectors and the I²C protocol integration, allowing the connection and programming of multiple Modulino nodes in a very simple way. In addition to the QWIIC's connectors, the Modulino nodes also expose solderable pins that can be used in multiple ways and make them compatible with boards that are not QWIIC compatible. - - -## Hardware Specifications - -The Modulino Buzzer based on the buzzer (PKLCS1212E4001-R1) is capable of generating different tones and sound patterns. Take a look at the following table to know more about its characteristics: - -| Parameter | Condition | Minimum | Typical | Maximum | Unit | -|----------------------|-----------|---------|---------|---------|------| -| Frequency | - | - | 4,000 | - | Hz | -| Sound Pressure Level | - | 75 | 85 | - | dB | - -### Sensor Details - -The **Modulino Buzzer** module uses the **PKLCS1212E4001-R1** buzzer, which does not have native I²C capabilities. Instead, the buzzer is controlled by the Modulino's onboard microcontroller (STM32C011F4U6T). This microcontroller provides I²C communication, allowing for flexible control of the buzzer. - -One unique feature of this setup is the ability to change the I²C address via software. This means the address can be modified based on your application needs, making it adaptable to different system configurations. - -The default I²C address for the **Modulino Buzzer** module is: - -| Modulino I²C Address | Hardware I²C Address |Editable Addresses (HEX)| -|----------------------|----------------------|----------------------| -| 0x3C | 0x1E |Any custom address (via software configuration) - - -When scanning for I²C address on the bus, you might find the modulino using the **Hardware I²C Address**. However, you should always use the **Modulino I²C Address** when using the official Modulino library. - -Later in this article we teach how to [change the address](#how-to-change-i2c-address). - - -## Pinout - -The PKLCS1212E4001-R1 buzzer is the core component of this module. This audio output device is controlled by an onboard STM32 microcontroller, which supports digital communication (I²C), meaning it connects directly to the I²C bus on the module without requiring additional conversion circuitry. - -![Arduino Buzzer Pinout](assets/BuzzerPinouts.png) - -### 1x8 Header - -| Pin | Function | -|--------|-----------------| -| GND | Ground | -| 3V3 | 3.3V Power | -| RESET | Reset | -| SWCLK | SWD Clock | -| SWDIO | SWD Data | -| TX1 | USART Transmit | -| RX1 | USART Receive | -| PA0 | Buzzer | - -- **GND:** Provides ground reference for the circuit. -- **3V3:** Supplies 3.3 V power to connected components and modules. -- **Reset:** The reset pin for the microcontroller, which can be used to reset the system. -- **SWCLK:** Used for providing the clock signal in the SWD interface. -- **SWDIO:** Used for debugging, as part of the Serial Wire Debug (SWD) interface. -- **TX1:** Used for transmitting data over UART communication. -- **RX1:** Used for receiving data over UART communication. -- **PA0:** This pin is used to control the buzzer's output signal. In fact, this pin can be used to bypass the I²C interface and control the buzzer directly using a square wave. -![Direct control via signal](assets/buzzerPA0.gif) - - -### 1x4 Header (I2C) - -The pinout for the Modulino Buzzer is shown below. While the recommended connection method is via the QWIIC connectors, this solderable header provides a connection option when using the modulino with a non-QWIIC compatible board. - -| Pin | Function | -|-------|--------------| -| GND | Ground | -| 3.3 V | Power Supply | -| SDA | I²C Data | -| SCL | I²C Clock | - - -## Power Specifications - -The board is typically powered by +3.3 VDC when using the QWIIC interface as per the I²C standard. - -| Parameter | Condition | Typical | Unit | -|---------------------|-----------|---------|------| -| Operating Voltage | - | 3.3 | V | -| Current Consumption | - | ~6.4 | mA | - -The module additionally includes a power LED that draws 1 mA and turns on as soon as it is powered. -J1 (Qwiic connector), J2 (Qwiic connector), and the headers all share the same power branch. The power distribution of the module is therefore as follows: -![Power Tree Modulino Buzzer](assets/Modulino_Buzzer_Power_Tree.png) - -## Schematic - -The Modulino Buzzer uses a simple circuit, as shown in the schematic below: - -![Full Schematic Modulino Buzzer](assets/schematic.png) - -The main components are the **PKLCS1212E4001-R1 buzzer** and the **STM32C011F6U6TR** microcontroller (U1), which handles tone generation as well as I²C communication. - -You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, this is the recommended method) or the **solderable pins** (J4). The board runs on **3.3V**, which comes from the QWIIC cable or the **3V3 pin** on J4. - -There's also a small power LED indicator that lights up when the board is on. - -You can grab the full schematic and PCB files from the [Modulino Buzzer](https://docs.arduino.cc/hardware/modulinos/modulino-buzzer) product page. - -## How To Connect Your Modulino - -The easiest and most reliable way to connect your Modulino is through the QWIIC Connect System. It’s plug-and-play, uses standard I²C, and makes it easy to join multiple modules. If your board supports QWIIC, this is the recommended way to go. Note that the dedicated I²C pins will differ from board to board meaning it is always a good idea to check your specific model. - -If your board doesn’t have a QWIIC connector, you can still access the same I²C bus and power the module using the solderable header pads just make sure you wire it to 3.3V and match the I²C pinout. - -![Modulino Wiring Options QWIIC(A - recommended) and Header(B)](assets/connection-guide-buzzer.png) - -### QWIIC Connector - -Whenever available, the **QWIIC Connect System** is the preferred method. Connecting to the Modulino is extremely simple, just use a standard QWIIC cable to connect your board to either of the QWIIC connectors on the Modulino. Because the cable and connectors are polarized, there is no need to worry about accidentally swapping connections. - -QWIIC is a plug-and-play I²C Connect System that uses standardized 4-pin connectors: -- GND -- 3.3V -- SDA (Data) -- SCL (Clock) - -![Connection Guide QWIIC](assets/connection-guide-buzzer-qwiik.png) - -The Modulino features two QWIIC connectors, which are internally connected in parallel. This means you can daisy-chain multiple modules easily by connecting additional QWIIC cables between them. - -### Solderable Header - -When QWIIC is not available, you can use the exposed solderable pins on the module. You can solder pins to the unpopulated pads; just remember the pinout provided in this guide to connect to the right pins of your board. - -![Connection Guide Solder Pads](assets/connection-guide-buzzer-jumper.png) - -## Daisy-Chaining Multiple Modulino Nodes - -Regardless of whether you connect the first Modulino via QWIIC or through the solderable pins, you can still take advantage of the extra QWIIC connector to daisy-chain additional modules. - -Each Modulino includes two QWIIC connectors wired in parallel, allowing you to connect one module to the next in a chain. As long as each module is configured with a unique I²C address, they can all communicate on the same bus as long as you select the correct I²C pins depending on your board. - -This approach keeps your setup clean, modular, and expandable without adding extra wiring complexity. - -![Modulino Wiring Options](assets/connection-guide-buzzer-qwiic-chain.png) - -***The number of modules you can connect will depend on what modules you are chaining together, as this system allows for multiple sensors from different manufacturers to be added. Also, the cables you use for these connections will play a significant role in the setup’s performance. Ensure your cables are properly connected and capable of handling the required data transfer. -Each module should have a unique address on a chain if you plan to address them individually. Later in this article we teach how to [change the address](#how-to-change-i2c-address). Multiple modules with the same address will cause conflicts on the I²C bus and will not allow you to address them individually.*** - -## How To Use Your Modulino - -### Installing The Modulino Library - -You need the official Modulino library available [here](https://docs.arduino.cc/libraries/modulino/) to use the Modulino Buzzer. - -With the Arduino IDE you get some tools that make adding a library easier. To learn how to install the IDE please visit our [page](https://docs.arduino.cc/software/ide-v2/tutorials/getting-started/ide-v2-downloading-and-installing/). - -After opening the IDE, a tab should be visible on the left. Press the book icon for "library" as highlighted in the image. - -![IDE Library Tab](assets/IDE-Left-Tab.png) - -The process should look like this: - -![Library Install](assets/library-install.gif) - -A message will appear after the installation is successful. - -### Play A Simple Tune - -Getting sound feedback from the buzzer is fairly simple using the ```Modulino``` library. For the **Modulino Buzzer** there is one important function: - -- ```tone(frequency, duration)```: Generates a tone with the specified frequency (in Hz) and duration (in milliseconds). -- ```Modulino.begin();```: By default the Modulino library uses ```Wire1``` if your connection is in a different Wire you will have to edit it, check [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/) (by default the Modulino library uses ```Wire1``` if your board model has a different pinout for the dedicated I²C pins you might have to edit it. More information on **Wire** can be found [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/)) for the library's hardware compatibility. More information on **Wire** can be found [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/). - -Here is an example sketch of how to implement this function to control the buzzer: - -```arduino -#include - -ModulinoBuzzer buzzer; - -int frequency = 440; // Frequency of the tone in Hz -int duration = 1000; // Duration of the tone in milliseconds - -void setup(){ - Modulino.begin(); - buzzer.begin(); -} - -void loop(){ - buzzer.tone(frequency, duration); // Generate the tone - delay(1000); // Wait for 1 second - buzzer.tone(0, duration); // Stop the tone - delay(1000); // Wait for 1 second -} -``` - -The code example provided shows how to initialize the buzzer and generate tones. The buzzer alternates between playing a 440 Hz tone for one second and staying silent for one second. -It can be easily adapted to play different melodies or to provide sound feedback for your projects based on specific conditions or events. - -### How To Change I2C Address - -An example sketch, AddressChanger, is also included with the library inside the `Utilities` folder and available [here](https://github.com/arduino-libraries/Modulino/blob/main/examples/Utilities/AddressChanger/AddressChanger.ino). This sketch changes the I²C address at a software level on the Module's microcontroller. - -![Example location on the IDE](assets/addressChangeIDE.png) - -- Connect the module to your board, remove any other modules that might be in the chain. Connection must be via I²C. -- Upload the sketch. -- Open the Serial Monitor. -- Text should now appear. Make sure the correct bauld-rate is selected if the displayed characters seem corrupted. - - ![Expected console output](assets/adressChanger.png) - -- Select the address and confirm. Valid I²C addresses range from 0x08 to 0x77 (7-bit values in hexadecimal format, e.g., 0x42). -- Your address should now have changed. Make sure to take note of the selected address. - -To keep track of the address in use the module has a white rectangle on the back. Feel free to use this to write the address that was chosen. - -When using a custom address in your sketch, you'll need to specify this address when creating the module object. For example: - -```arduino -ModulinoBuzzer buzzer(0x3E); // Replace 0x3E with your specific address -``` - - -## Troubleshooting - -### Buzzer Not Sounding - -If your Modulino's power LED isn't on or the buzzer isn't responsive, first check that the board is properly connected: - -- Ensure both the board and the Modulino are connected to your computer, and that the power LEDs on both are lit. -- If the issue persists, make sure the Qwiic cable is properly clicked into place. - -### Library Not Installed Properly - -If you encounter an issue with the `#include "modulino.h"` command, verify that the Modulino library is correctly installed: - -- Check your IDE to ensure the library is installed and up-to-date. -- Re-install the library through the Library Manager. - -### Distorted Sound - -If the buzzer sound is distorted or not playing as expected, make sure: - -- The correct frequency values are being used (typically between 20 Hz and 20 kHz for audible sounds). -- All exposed electronics are not touching any conductive surfaces, as this could interfere with the sound output. - -## Conclusion - -The **Modulino Buzzer** is a digital sound output device that communicates over I²C and follows the Modulino form factor. It includes standard Qwiic connectors for quick, solderless connections and easy daisy-chaining with other modules. Paired with the Modulino library, it makes generating sound feedback straightforward, allowing you to focus on experimenting or building your system logic. It's a small, reliable module suited for both interactive feedback and audio alert systems. - -## What Is Next? - -Now that you've learned how to use your Modulino Buzzer, you're all set to integrate it into your projects! - -- Experiment with different frequencies to create various tones and melodies. -- Try creating a simple alarm system that triggers the buzzer when certain conditions are met. -- Use the buzzer to provide feedback in your interactive projects when a button is pressed or a threshold is reached. -- Create a music box that plays different tunes when specific inputs are detected! - diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/BuzzerPinouts.png b/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/BuzzerPinouts.png deleted file mode 100644 index 4c1c420282..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/BuzzerPinouts.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/Modulino_Buzzer_Power_Tree.png b/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/Modulino_Buzzer_Power_Tree.png deleted file mode 100644 index 7ca852c52b..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/Modulino_Buzzer_Power_Tree.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/buzzerPA0.gif b/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/buzzerPA0.gif deleted file mode 100644 index 7f133eb687..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/buzzerPA0.gif and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/connection-guide-buzzer-jumper.png b/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/connection-guide-buzzer-jumper.png deleted file mode 100644 index 1b61af02f8..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/connection-guide-buzzer-jumper.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/connection-guide-buzzer-qwiic-chain.png b/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/connection-guide-buzzer-qwiic-chain.png deleted file mode 100644 index a90c8fdf46..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/connection-guide-buzzer-qwiic-chain.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/connection-guide-buzzer-qwiik.png b/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/connection-guide-buzzer-qwiik.png deleted file mode 100644 index 0dbdad86af..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/connection-guide-buzzer-qwiik.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/connection-guide-buzzer.png b/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/connection-guide-buzzer.png deleted file mode 100644 index 4f6bd1cd6c..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/connection-guide-buzzer.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/mp-usb-connection.png b/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/mp-usb-connection.png deleted file mode 100644 index fb059f9e8b..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/mp-usb-connection.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/package-installer-overview.png b/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/package-installer-overview.png deleted file mode 100644 index 67678dc808..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/package-installer-overview.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/schematic.png b/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/schematic.png deleted file mode 100644 index 4d0d4a9098..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/assets/schematic.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/content.md b/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/content.md deleted file mode 100644 index bb3221e880..0000000000 --- a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-mp/content.md +++ /dev/null @@ -1,269 +0,0 @@ ---- -title: "How To Use The Modulino Buzzer And MicroPython" -description: "Learn how to get the most out of your Modulino Buzzer in a MicroPython environment." -tags: - - Modulino - - QWIIC - - I2C -author: 'Pedro Sousa Lima' -hardware: - - hardware/11.modulinos/modulinos/modulino-buzzer -software: - - ide-v2 - - web-editor ---- - -The Modulino Buzzer is a modular sensor that generates audio output, making it perfect to add sound feedback to your projects! -The Modulino form factor is shaped with two QWIIC connectors and the I²C protocol integration, allowing the connection and programming of multiple Modulino nodes in a very simple way. In addition to the QWIIC's connectors, the Modulino nodes also expose solderable pins that can be used in multiple ways and make them compatible with boards that are not QWIIC compatible. - - -## Hardware Specifications - -The Modulino Buzzer based on the buzzer (PKLCS1212E4001-R1) is capable of generating different tones and sound patterns. Take a look at the following table to know more about its characteristics: - -| Parameter | Condition | Minimum | Typical | Maximum | Unit | -|----------------------|-----------|---------|---------|---------|------| -| Frequency | - | - | 4,000 | - | Hz | -| Sound Pressure Level | - | 75 | 85 | - | dB | - -### Sensor Details - -The **Modulino Buzzer** module uses the **PKLCS1212E4001-R1** buzzer, which does not have native I²C capabilities. Instead, the buzzer is controlled by the Modulino's onboard microcontroller (STM32C011F4U6T). This microcontroller provides I²C communication, allowing for flexible control of the buzzer. - -One unique feature of this setup is the ability to change the I²C address via software. This means the address can be modified based on your application needs, making it adaptable to different system configurations. - -The default I²C address for the **Modulino Buzzer** module is: - -| Modulino I²C Address | Hardware I²C Address |Editable Addresses (HEX)| -|----------------------|----------------------|----------------------| -| 0x3C | 0x1E |Any custom address (via software configuration) - - -When scanning for I²C address on the bus, you might find the modulino using the **Hardware I²C Address**. However, you should always use the **Modulino I²C Address** when using the official Modulino library. - -Later in this article we teach how to [change the address](#how-to-change-i2c-address). - - -## Pinout - -The PKLCS1212E4001-R1 buzzer is the core component of this module. This audio output device is controlled by an onboard STM32 microcontroller, which supports digital communication (I²C), meaning it connects directly to the I²C bus on the module without requiring additional conversion circuitry. - -![Arduino Buzzer Pinout](assets/BuzzerPinouts.png) - -| Pin | Function | -|--------|-----------------| -| GND | Ground | -| 3V3 | 3.3V Power | -| RESET | Reset | -| SWCLK | SWD Clock | -| SWDIO | SWD Data | -| TX1 | USART Transmit | -| RX1 | USART Receive | -| PA0 | Buzzer | - -- **GND:** Provides ground reference for the circuit. -- **3V3:** Supplies 3.3 V power to connected components and modules. -- **Reset:** The reset pin for the microcontroller, which can be used to reset the system. -- **SWCLK:** Used for providing the clock signal in the SWD interface. -- **SWDIO:** Used for debugging, as part of the Serial Wire Debug (SWD) interface. -- **TX1:** Used for transmitting data over UART communication. -- **RX1:** Used for receiving data over UART communication. -- **PA0:** This pin is used to control the buzzer's output signal. In fact, this pin can be used to bypass the I²C interface and control the buzzer directly using a square wave. -![Direct control via signal](assets/buzzerPA0.gif) - - -### 1x4 Header (I2C) - -The pinout for the Modulino Buzzer is shown below. While the recommended connection method is via the QWIIC connectors, this solderable header provides a connection option when using the modulino with a non-QWIIC compatible board. - -| Pin | Function | -|-------|--------------| -| GND | Ground | -| 3.3 V | Power Supply | -| SDA | I²C Data | -| SCL | I²C Clock | - - -## Power Specifications - -The board is typically powered by +3.3 VDC when using the QWIIC interface as per the I²C standard. - -| Parameter | Condition | Typical | Unit | -|---------------------|-----------|---------|------| -| Operating Voltage | - | 3.3 | V | -| Current Consumption | - | ~6.4 | mA | - -The module additionally includes a power LED that draws 1 mA and turns on as soon as it is powered. - -J1 (Qwiic connector), J2 (Qwiic connector), and the headers all share the same power branch. The power distribution of the module is therefore as follows: - -![Power Tree Modulino Buzzer](assets/Modulino_Buzzer_Power_Tree.png) - -## Schematic - -The Modulino Buzzer uses a simple circuit, as shown in the schematic below: - -![Full Schematic Modulino Buzzer](assets/schematic.png) - -The main components are the **PKLCS1212E4001-R1 buzzer** and the **STM32C011F6U6TR** microcontroller (U1), which handles tone generation as well as I²C communication. - -You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, this is the recommended method) or the **solderable pins** (J4). The board runs on **3.3V**, which comes from the QWIIC cable or the **3V3 pin** on J4. - -There's also a small power LED indicator that lights up when the board is on. - -You can grab the full schematic and PCB files from the [Modulino Buzzer](https://docs.arduino.cc/hardware/modulinos/modulino-buzzer) product page. - -## How To Connect Your Modulino - -The easiest and most reliable way to connect your Modulino is through the QWIIC Connect System. It’s plug-and-play, uses standard I²C, and makes it easy to join multiple modules. If your board supports QWIIC, this is the recommended way to go. Note that the dedicated I²C pins will differ from board to board meaning it is always a good idea to check your specific model. - -If your board doesn’t have a QWIIC connector, you can still access the same I²C bus and power the module using the solderable header pads just make sure you wire it to 3.3V and match the I²C pinout. - -![Modulino Wiring Options QWIIC(A - recommended) and Header(B)](assets/connection-guide-buzzer.png) - -### QWIIC Connector - -Whenever available, the **QWIIC Connect System** is the preferred method. Connecting to the Modulino is extremely simple, just use a standard QWIIC cable to connect your board to either of the QWIIC connectors on the Modulino. Because the cable and connectors are polarized, there is no need to worry about accidentally swapping connections. - -QWIIC is a plug-and-play I²C Connect System that uses standardized 4-pin connectors: - -- GND -- 3.3V -- SDA (Data) -- SCL (Clock) - -![Connection Guide QWIIC](assets/connection-guide-buzzer-qwiik.png) - -The Modulino features two QWIIC connectors, which are internally connected in parallel. This means you can daisy-chain multiple modules easily by connecting additional QWIIC cables between them. - -### Solderable Header - -When QWIIC is not available, you can use the exposed solderable pins on the module. You can solder pins to the unpopulated pads; just remember the pinout provided in this guide to connect to the right pins of your board. - -![Connection Guide Solder Pads](assets/connection-guide-buzzer-jumper.png) - -## Daisy-Chaining Multiple Modulino Nodes - -Regardless of whether you connect the first Modulino via QWIIC or through the solderable pins, you can still take advantage of the extra QWIIC connector to daisy-chain additional modules. - -Each Modulino includes two QWIIC connectors wired in parallel, allowing you to connect one module to the next in a chain. As long as each module is configured with a unique I²C address, they can all communicate on the same bus as long as you select the correct I²C pins depending on your board. - -This approach keeps your setup clean, modular, and expandable without adding extra wiring complexity. - -![Modulino Wiring Options](assets/connection-guide-buzzer-qwiic-chain.png) - -***The number of modules you can connect will depend on what modules you are chaining together, as this system allows for multiple sensors from different manufacturers to be added. Also, the cables you use for these connections will play a significant role in the setup’s performance. Ensure your cables are properly connected and capable of handling the required data transfer. -Each module should have a unique address on a chain if you plan to address them individually. Later in this article we teach how to [change the address](#how-to-change-i2c-address). Multiple modules with the same address will cause conflicts on the I²C bus and will not allow you to address them individually.*** - -## How To Program Your Modulino - -### Installing The Modulino Library - -To program your Modulino it is recommended you use the official ```Modulino``` micropython library available [here](https://github.com/arduino/arduino-modulino-mpy). The library is fully compatible with the no **Arduino Lab for MicroPython**. - -For information on installing the **Arduino Lab for MicroPython** please visit our [page](https://docs.arduino.cc/micropython/first-steps/install-guide/). - -The ```Modulino``` library is not available by default on MicroPython devices hence installation is needed. - -To simplify the process the [MicroPython Package Installer](https://github.com/arduino/lab-micropython-package-installer/releases) is recommended as it will provide a graphical interface to guide installation. - -After installation, you should now be able to: - -1. Open the tool. -2. Plug in your board to the computer. - - ![USB Connection](assets/mp-usb-connection.png) - - If the board does not appear in the Detected Boards section, click Reload. If the board is still undetected, ensure no other programs (e.g., a code editor) are using the board's COM port. - -3. Search for the ```Modulino``` package by filling in the text box on the search feature. -4. Click Install and wait for the installation confirmation. -5. Disconnect the board from the tool before returning to your code editor to avoid conflicts due to a busy COM port. - -![Package Installer Overview](assets/package-installer-overview.png) - -The module should now be includable in your program using: - -```from modulino import ModulinoBuzzer``` - -### Play a Simple Tune with MicroPython - -Playing a sound from the **Modulino Buzzer** module is easy using the `Modulino` library. The crucial function to generate a tone is: - -- `tone(frequency, duration, blocking)` - Generates a tone with the specified frequency (in Hz) and duration (in milliseconds). -- By default the Modulino library uses ```Wire1``` if your board model has a different pinout for the dedicated I²C pins you might have to edit it as instructed [here](https://github.com/arduino/arduino-modulino-mpy/tree/main/docs#%E2%84%B9%EF%B8%8F-using-3rd-party-boards). More information on **Wire** can be found [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/). - -Here’s a basic example to control the buzzer: - -```python -from modulino import ModulinoBuzzer -from time import sleep - -buzzer = ModulinoBuzzer() - -frequency = 440 # Frequency of the tone in Hz -duration = 1000 # Duration of the tone in milliseconds - -# Play the tone -buzzer.tone(frequency, duration, blocking=True) -sleep(1) # Wait for 1 second - -# Stop the tone -buzzer.tone(0, duration, blocking=True) -sleep(1) # Wait for 1 second -``` - -### How To Change Address - -A sketch is also available included with the library named `AddressChanger` and also available [here](https://github.com/arduino/arduino-modulino-mpy/blob/main/examples/change_address.py). This sketch changes the I2C address at a software level on the Module's microcontroller. - -- Connect the module to your board via I2C, ensuring no other modules are in the chain. -- Run the script in a MicroPython environment. -- Follow the on-screen instructions (REPL) to select the device and enter a new address. Valid I²C addresses range from 0x08 to 0x77 (7-bit values in hexadecimal format, e.g., 0x42). -- The script will attempt to change the address and confirm success. - -To keep track of the address in use, the module has a white rectangle on the back. Feel free to use this to write the address that was chosen. - -When using a custom address in your MicroPython sketch, you'll need to specify this address when creating the module object. For example: - -```python -buzzer_module = ModulinoBuzzer(address=0x45) # Replace 0x45 with your specific address -``` - - -## Troubleshooting - -### Buzzer Not Sounding - -If your Modulino's power LED isn't on or the buzzer isn't responsive, first check that the board is properly connected: - -- Ensure both the board and the Modulino are connected to your computer, and that the power LEDs on both are lit. -- If the issue persists, make sure the Qwiic cable is properly clicked into place. - -### Library Not Installed Properly - -If you encounter an issue with the `from modulino import ModulinoBuzzer"` command, verify that the Modulino library is correctly installed: - -- Check if the library is installed and up-to-date. -- Re-install the library through the Library Manager. - -### Distorted Sound - -If the buzzer sound is distorted or not playing as expected, make sure: - -- The correct frequency values are being used (typically between 20 Hz and 20 kHz for audible sounds). -- All exposed electronics are not touching any conductive surfaces, as this could interfere with the sound output. - -## Conclusion - -The **Modulino Buzzer** is a digital sound output device that communicates over I²C and follows the Modulino form factor. It includes standard Qwiic connectors for quick, solderless connections and easy daisy-chaining with other modules. Paired with the Modulino library, it makes generating sound feedback straightforward, allowing you to focus on experimenting or building your system logic. It's a small, reliable module suited for both interactive feedback and audio alert systems. - -## What Is Next? - -Now that you've learned how to use your Modulino Buzzer, you're all set to integrate it into your projects! - -- Experiment with different frequencies to create various tones and melodies. -- Try creating a simple alarm system that triggers the buzzer when certain conditions are met. -- Use the buzzer to provide feedback in your interactive projects when a button is pressed or a threshold is reached. -- Create a music box that plays different tunes when specific inputs are detected! - diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/IDE-Left-Tab.png b/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/IDE-Left-Tab.png deleted file mode 100644 index c7bb86575e..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/IDE-Left-Tab.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/Modulino_Distance_Power_Tree.png b/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/Modulino_Distance_Power_Tree.png deleted file mode 100644 index 64b9ae3a3c..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/Modulino_Distance_Power_Tree.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/connection-guide-distance-jumper.png b/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/connection-guide-distance-jumper.png deleted file mode 100644 index df073cc73b..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/connection-guide-distance-jumper.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/connection-guide-distance-qwiic-chain.png b/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/connection-guide-distance-qwiic-chain.png deleted file mode 100644 index 9399b6deb1..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/connection-guide-distance-qwiic-chain.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/connection-guide-distance-qwiik.png b/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/connection-guide-distance-qwiik.png deleted file mode 100644 index 37768f52e8..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/connection-guide-distance-qwiik.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/connection-guide-distance.png b/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/connection-guide-distance.png deleted file mode 100644 index e011bec29e..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/connection-guide-distance.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/library-install.gif b/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/library-install.gif deleted file mode 100644 index 16f396c353..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/library-install.gif and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/content.md b/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/content.md deleted file mode 100644 index 14d6e61714..0000000000 --- a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/content.md +++ /dev/null @@ -1,232 +0,0 @@ ---- -title: "How To Use The Modulino Distance" -description: "Learn how to get the most out of your Modulino Distance." -tags: - - Modulino - - QWIIC - - I2C -author: 'Pedro Sousa Lima' -hardware: - - hardware/11.modulinos/modulinos/modulino-distance -software: - - ide-v2 - - web-editor ---- - -The Modulino Distance is a modular sensor that measures distance using Time-of-Flight (ToF) technology, making it perfect to add precise distance sensing and depth mapping to your projects! -The Modulino form factor is shaped with two QWIIC connectors and the I²C protocol integration, allowing the connection and programming of multiple Modulino nodes in a very simple way. In addition to the QWIIC's connectors, the Modulino nodes also expose solderable pins that can be used in multiple ways and make them compatible with boards that are not QWIIC compatible. - -## General Characteristics - -The Modulino Distance is capable of measuring distances using Time-of-Flight technology. Take a look at the following table to know more about its measuring ranges: - -| Parameter | Condition | Minimum | Typical | Maximum | Unit | -|-----------------------|----------------------|---------|---------|---------|------| -| Range | Distance Measurement | 1 | - | 1300 | mm | -| Resolution | - | - | 1 | - | mm | -| Operating Temperature | - | -30 | - | 85 | °C | - - -### Sensor Details - -The VL53L4CDV0DH/1 sensor from STMicroelectronics is the core component of this module. This ToF sensor natively supports digital communication (I²C), meaning it connects directly to the I²C bus on the module without requiring additional conversion circuitry. - -| Parameter | Condition | Minimum | Typical | Maximum | Unit | -|---------------|---------------|---------|---------|---------|------| -| Field of View | - | - | 18 | - | ° | -| Wavelength | Laser Emitter | - | 940 | - | nm | - -The default address for the Module is: - -| Modulino I²C Address | Hardware I²C Address | -|----------------------|----------------------| -| 0x52 | 0x52 | - -***Note: Since the address cannot be changed on this Modulino specifically, using two or more identical modules on the same I²C bus will result in address conflicts and cause communication issues.*** - -## Pinout - -The pinout for the Modulino Distance is shown below. Please note that the exposed solderable pins are directly connected to the QWIIC connectors using the same I²C interface. - -![Arduino Distance Pinout](assets/DistancePinouts.png) - -### 1x4 Header (Sensor GPIO) - -| Pin | Function | -|-------|----------------| -| GND | Ground | -| 3V3 | 3.3 V Power | -| GPIO1 | Digital Output | -| XSHUT | Xshutdown | - -- **GND: Ground** – Ground connection for power and signal reference. -- **3V3: Power** – 3.3 V power supply input. -- **GPIO1: Digital Output** – General purpose digital output pin. -- **XSHUT: Xshutdown** – Shutdown control pin for the sensor. - -### 1x4 Header (I2C) - -The pinout for the Modulino Buzzer is shown below. While the recommended connection method is via the QWIIC connectors, this solderable header provides a connection option when using the modulino with a non-QWIIC compatible board. - -| Pin | Function | -|-------|--------------| -| GND | Ground | -| 3V3 | Power Supply | -| SDA | I²C Data | -| SCL | I²C Clock | - -Depending on the board connected to the modulino, the I²C pin names to program it may differ. Please check the [board tutorials](https://docs.arduino.cc/hardware/) on your modulino's compatible board or the [Modulino library](https://github.com/arduino-libraries/Modulino/tree/main/docs) to learn more. - -## Power Specifications - -The board is typically powered by +3.3 VDC when using the QWIIC interface as per the I²C standard. - -| Parameter | Condition | Minimum | Typical | Maximum | Unit | -| --------------------- | ----------------------- | ------- | ----------- | ------- | ---- | -| Supply Voltage | - | - | 3.3 (QWIIC) | - | V | -| Current Consumption | Active measurement mode | - | 24 | 40 | mA | -| Operating Temperature | - | -30 | - | 85 | °C | - -The module additionally includes a power LED that draws 1 mA and turns on as soon as it is powered. J1 (Qwiic connector), J2 (Qwiic connector), and the headers all share the same power branch. The power distribution of the module is therefore as follows: - -![Power Tree Modulino Distance](assets/Modulino_Distance_Power_Tree.png) - -## Schematic - -The Modulino Distance uses a simple circuit, as shown in the schematic below: - -![Full Schematic Modulino Distance](assets/schematic.png) - -The main component is the **VL53L4CDV0DH/1** sensor (U1), which handles distance measurements using Time-of-Flight technology, as well as I²C communication. - -You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, this is the recommended method) or the **solderable pins** (J4). The board runs on **3.3 V**, which comes from the QWIIC cable or the **3V3 pin** on J4. - -There's also a small power indicator LED that lights up when the board is on. - -You can grab the full schematic and PCB files from the [Modulino Distance](https://docs.arduino.cc/hardware/modulinos/modulino-distance) product page. - -## How To Connect Your Modulino - -The easiest and most reliable way to connect your Modulino is through the QWIIC Connect System. It’s plug-and-play, uses standard I²C, and makes it easy to join multiple modules. If your board supports QWIIC, this is the recommended way to go. - -Note that the dedicated I²C pins will differ from board to board meaning it is always a good idea to check your specific model. - - -![Modulino Wiring Options QWIIC(A - recommended) and Header(B)](assets/connection-guide-distance.png) - -### QWIIC Connector - -Whenever available, the **QWIIC Connect System** is the preferred method. Connecting to the Modulino is extremely simple, just use a standard QWIIC cable to connect your board to either of the QWIIC connectors on the Modulino. Because the cable and connectors are polarized, there is no need to worry about accidentally swapping connections. - -QWIIC is a plug-and-play I²C Connect System that uses standardized 4-pin connectors: - -- GND -- 3.3 V -- SDA (Data) -- SCL (Clock) - -![Connection Guide QWIIC](assets/connection-guide-distance-qwiik.png) - -The Modulino features two QWIIC connectors, which are internally connected in parallel. This means you can daisy-chain multiple modules easily by connecting additional QWIIC cables between them. - -### Solderable Header - -When QWIIC is not available, you can use the exposed solderable pins on the module. You can solder pins to the unpopulated pads; just remember the pinout provided in this guide to connect to the right pins of your board. - -![Connection Guide Solder Pads](assets/connection-guide-distance-jumper.png) - -## Daisy-Chaining Multiple Modulino Nodes - -Regardless of whether you connect the first Modulino via QWIIC or through the solderable pins, you can still take advantage of the extra QWIIC connector to daisy-chain additional modules. Each Modulino includes two QWIIC connectors wired in parallel, allowing you to connect one module to the next in a chain. As long as each module is configured with a unique I²C address, they can all communicate on the same bus. This approach keeps your setup clean, modular, and expandable without adding extra wiring complexity. - -![Modulino Wiring Options](assets/connection-guide-distance-qwiic-chain.png) - -***The number of modules you can connect will depend on what modules you are chaining together, as this system allows for multiple sensors from different manufacturers to be added. Also, the cables you use for these connections will play a significant role in the setup's performance. Ensure your cables are correctly connected and capable of handling the required data transfer. -Each module should have a unique address on a chain if you plan to address them individually. Multiple modules with the same address will cause conflicts on the I²C bus.*** - -## How To Use Your Modulino - -### Installing The Modulino Library - -You need the official Modulino library available [here](https://docs.arduino.cc/libraries/modulino/) to use the Modulino Thermo. - -With the Arduino IDE you get some tools that make adding a library easier. To learn how to install the IDE please visit our [page](https://docs.arduino.cc/software/ide-v2/tutorials/getting-started/ide-v2-downloading-and-installing/). - -After opening the IDE, a tab should be visible on the left. Press the book icon for "library" as highlighted in the image. - -![IDE Library Tab](assets/IDE-Left-Tab.png) - -The process should look like this: - -![Library Install](assets/library-install.gif) - -A message will appear after the installation is successful. - -### Getting Distance Data - -Getting data from the sensor is fairly simple using the ```Modulino``` library. For the **Modulino Distance** there are two important functions: - -- ```available()```: Checks if new distance data is available. -- ```get()```: Retrieves the measured distance from the sensor (default in cm). -- ```Modulino.begin();```: By default the Modulino library uses ```Wire1``` if your connection is in a different Wire you will have to edit it, check [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/) (by default the Modulino library uses ```Wire1``` if your board model has a different pinout for the dedicated I²C pins you might have to edit it. More information on **Wire** can be found [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/)) for the library's hardware compatibility. More information on **Wire** can be found [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/). - -Here is an example sketch of how to implement these functions to acquire data and show it using the serial monitor: - -```arduino -#include "Modulino.h" - -// Create object instance -ModulinoDistance distance; - -void setup() { - Serial.begin(9600); - - // Initialize the Modulino system and distance sensor - Modulino.begin(); - distance.begin(); -} - -void loop() { - if (distance.available()) { - int measure = distance.get(); - Serial.println(measure); - } - delay(10); -} -``` - -## Troubleshooting - -### Sensor Not Reachable - -If your Modulino's power LED isn't on or the sensor isn't responsive, first check that the board is properly connected: - -- Ensure both the board and the Modulino are connected to your computer, and that the power LEDs on both are lit. -- If the issue persists, make sure the Qwiic cable is properly clicked into place. - -### Library Not Installed Properly - -If you encounter an issue with the `#include "modulino.h"` command, verify that the Modulino library is correctly installed: - -- Check your IDE to ensure the library is installed and up-to-date. -- Re-install the library through the Library Manager. - -### Inaccurate Values - -If the sensor values are not accurate, make sure: - -- The sensor lens is clean and free from dust or obstructions. -- All exposed electronics are not touching any conductive surfaces, as this could interfere with readings. -- The object being measured is within the sensor's detection range. - -## Conclusion - -The **Modulino Distance** is a digital Time-of-Flight distance sensor that communicates over I²C and follows the Modulino form factor. It includes standard Qwiic connectors for quick, solderless connections and easy daisy-chaining with other modules. Paired with the Modulino library, it makes accessing distance data straightforward, allowing you to focus on experimenting or building your system logic. It's a small, reliable module suited for both quick tests and longer-term setups. - -## What Is Next? - -Now that you've learned how to use your Modulino Distance, you're all set to integrate it into your projects! - -- Create a parking assistance system that provides audio feedback as objects get closer, similar to car parking sensors. -- Build a theremin-like musical instrument that changes pitch or volume based on hand movements in front of the sensor. -- Design an automatic dispenser that activates when hands are detected beneath it (for soap, sanitizer, etc.). \ No newline at end of file diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/DistancePinouts.png b/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/DistancePinouts.png deleted file mode 100644 index f657054092..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/DistancePinouts.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/Modulino_Distance_Power_Tree.png b/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/Modulino_Distance_Power_Tree.png deleted file mode 100644 index 64b9ae3a3c..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/Modulino_Distance_Power_Tree.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/connection-guide-distance-jumper.png b/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/connection-guide-distance-jumper.png deleted file mode 100644 index df073cc73b..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/connection-guide-distance-jumper.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/connection-guide-distance-qwiic-chain.png b/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/connection-guide-distance-qwiic-chain.png deleted file mode 100644 index 9399b6deb1..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/connection-guide-distance-qwiic-chain.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/connection-guide-distance-qwiik.png b/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/connection-guide-distance-qwiik.png deleted file mode 100644 index 21e4b96ff0..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/connection-guide-distance-qwiik.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/connection-guide-distance.png b/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/connection-guide-distance.png deleted file mode 100644 index e011bec29e..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/connection-guide-distance.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/mp-usb-connection.png b/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/mp-usb-connection.png deleted file mode 100644 index fb059f9e8b..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/mp-usb-connection.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/package-installer-overview.png b/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/package-installer-overview.png deleted file mode 100644 index 67678dc808..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/package-installer-overview.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/schematic.png b/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/schematic.png deleted file mode 100644 index 20dd38803b..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/assets/schematic.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/content.md b/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/content.md deleted file mode 100644 index a8cc998584..0000000000 --- a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/content.md +++ /dev/null @@ -1,236 +0,0 @@ ---- -title: "How To Use The Modulino Distance And MicroPython" -description: "Learn how to get the most out of your Modulino Distance in a MicroPython environment." -tags: - - Modulino - - QWIIC - - I2C -author: 'Pedro Sousa Lima' -hardware: - - hardware/11.modulinos/modulinos/modulino-distance -software: - - ide-v2 - - web-editor ---- - -The Modulino Distance is a modular sensor that measures distance using Time-of-Flight (ToF) technology, making it perfect to add precise distance sensing and depth mapping to your projects! -The Modulino form factor is shaped with two QWIIC connectors and the I²C protocol integration, allowing the connection and programming of multiple Modulino nodes in a very simple way. In addition to the QWIIC's connectors, the Modulino nodes also expose solderable pins that can be used in multiple ways and make them compatible with boards that are not QWIIC compatible. - -## General Characteristics - -The Modulino Distance is capable of measuring distances using Time-of-Flight technology. Take a look at the following table to know more about its measuring ranges: - -| Parameter | Condition | Minimum | Typical | Maximum | Unit | -|-----------------------|----------------------|---------|---------|---------|------| -| Range | Distance Measurement | 1 | - | 1300 | mm | -| Resolution | - | - | 1 | - | mm | -| Operating Temperature | - | -30 | - | 85 | °C | - - -### Sensor Details - -The VL53L4CDV0DH/1 sensor from STMicroelectronics is the core component of this module. This ToF sensor natively supports digital communication (I²C), meaning it connects directly to the I²C bus on the module without requiring additional conversion circuitry. - -| Parameter | Condition | Minimum | Typical | Maximum | Unit | -|---------------|---------------|---------|---------|---------|------| -| Field of View | - | - | 18 | - | ° | -| Wavelength | Laser Emitter | - | 940 | - | nm | - -The default address for the Module is: - -| Modulino I²C Address | Hardware I²C Address | -|----------------------|----------------------| -| 0x52 | 0x52 | - -***Note: Since the address cannot be changed on this Modulino specifically, using two or more identical modules on the same I²C bus will result in address conflicts and cause communication issues.*** - -## Pinout - -The pinout for the Modulino Distance is shown below. Please note that the exposed solderable pins are directly connected to the QWIIC connectors using the same I²C interface. - -![Arduino Distance Pinout](assets/DistancePinouts.png) - -### 1x4 Header (Sensor GPIO) - -| Pin | Function | -|-------|----------------| -| GND | Ground | -| 3V3 | 3.3V Power | -| GPIO1 | Digital Output | -| XSHUT | Xshutdown | - -- **GND: Ground** – Ground connection for power and signal reference. -- **3V3: Power** – 3.3V power supply input. -- **GPIO1: Digital Output** – General purpose digital output pin. -- **XSHUT: Xshutdown** – Shutdown control pin for the sensor. - - -### 1x4 Header (I2C) - -The pinout for the Modulino Buzzer is shown below. While the recommended connection method is via the QWIIC connectors, this solderable header provides a connection option when using the modulino with a non-QWIIC compatible board. - -| Pin | Function | -|-------|--------------| -| GND | Ground | -| 3.3 V | Power Supply | -| SDA | I²C Data | -| SCL | I²C Clock | - -Depending on the board connected to the modulino, the I²C pin names to program it may differ. Please check the [board tutorials](https://docs.arduino.cc/hardware/) on your modulino's compatible board or the [Modulino library](https://github.com/arduino-libraries/Modulino/tree/main/docs) to learn more. - -## Power Specifications - -The board is typically powered by +3.3 VDC when using the QWIIC interface as per the I²C standard. - -| Parameter | Condition | Minimum | Typical | Maximum | Unit | -| --------------------- | ----------------------- | ------- | ----------- | ------- | ---- | -| Supply Voltage | - | - | 3.3 (QWIIC) | - | V | -| Current Consumption | Active measurement mode | - | 24 | 40 | mA | -| Operating Temperature | - | -30 | - | 85 | °C | - -The module additionally includes a power LED that draws 1 mA and turns on as soon as it is powered. J1 (Qwiic connector), J2 (Qwiic connector), and the headers all share the same power branch. The power distribution of the module is therefore as follows: - -![Power Tree Modulino Distance](assets/Modulino_Distance_Power_Tree.png) - -## Schematic - -The Modulino Distance uses a simple circuit, as shown in the schematic below: - -![Full Schematic Modulino Distance](assets/schematic.png) - -The main component is the **VL53L5CX** sensor (U1), which handles distance measurements using Time-of-Flight technology, as well as I²C communication. - -You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, this is the recommended method) or the **solderable pins** (J4). The board runs on **3.3V**, which comes from the QWIIC cable or the **3V3 pin** on J4. - -There's also a small power indicator LED that lights up when the board is on. - -You can grab the full schematic and PCB files from the [Modulino Distance](https://docs.arduino.cc/hardware/modulinos/modulino-distance) product page. - -## How To Connect Your Modulino - -The easiest and most reliable way to connect your Modulino is through the QWIIC Connect System. It’s plug-and-play, uses standard I²C, and makes it easy to join multiple modules. If your board supports QWIIC, this is the recommended way to go. - -Note that the dedicated I²C pins will differ from board to board meaning it is always a good idea to check your specific model. - -![Modulino Wiring Options QWIIC(A - recommended) and Header(B)](assets/connection-guide-distance.png) - -### QWIIC Connector - -Whenever available, the **QWIIC Connect System** is the preferred method. Connecting to the Modulino is extremely simple, just use a standard QWIIC cable to connect your board to either of the QWIIC connectors on the Modulino. Because the cable and connectors are polarized, there is no need to worry about accidentally swapping connections. - -QWIIC is a plug-and-play I²C Connect System that uses standardized 4-pin connectors: - -- GND -- 3.3V -- SDA (Data) -- SCL (Clock) - -![Connection Guide QWIIC](assets/connection-guide-distance-qwiik.png) - -The Modulino features two QWIIC connectors, which are internally connected in parallel. This means you can daisy-chain multiple modules easily by connecting additional QWIIC cables between them. - -### Solderable Header - -When QWIIC is not available, you can use the exposed solderable pins on the module. You can solder pins to the unpopulated pads; just remember the pinout provided in this guide to connect to the right pins of your board. - -![Connection Guide Solder Pads](assets/connection-guide-distance-jumper.png) - -## Daisy-Chaining Multiple Modulino Nodes - -Regardless of whether you connect the first Modulino via QWIIC or through the solderable pins, you can still take advantage of the extra QWIIC connector to daisy-chain additional modules. Each Modulino includes two QWIIC connectors wired in parallel, allowing you to connect one module to the next in a chain. As long as each module is configured with a unique I²C address, they can all communicate on the same bus. This approach keeps your setup clean, modular, and expandable without adding extra wiring complexity. - -![Modulino Wiring Options](assets/connection-guide-distance-qwiic-chain.png) - -***The number of modules you can connect will depend on what modules you are chaining together, as this system allows for multiple sensors from different manufacturers to be added. Also, the cables you use for these connections will play a significant role in the setup's performance. Ensure your cables are correctly connected and capable of handling the required data transfer. -Each module should have a unique address on a chain if you plan to address them individually. Multiple modules with the same address will cause conflicts on the I²C bus.*** - -## How To Program Your Modulino - -### Installing The Modulino Library - -To program your Modulino it is recommended you use the official ```Modulino``` micropython library available [here](https://github.com/arduino/arduino-modulino-mpy). The library is fully compatible with the no **Arduino Lab for MicroPython**. - -For information on installing the **Arduino Lab for MicroPython** please visit our [page](https://docs.arduino.cc/micropython/first-steps/install-guide/). - -The ```Modulino``` library is not available by default on MicroPython devices hence installation is needed. - -To simplify the process the [MicroPython Package Installer](https://github.com/arduino/lab-micropython-package-installer/releases) is recommended as it will provide a graphical interface to guide installation. - -After installation, you should now be able to: - -1. Open the tool. -2. Plug in your board to the computer. - - ![USB Connection](assets/mp-usb-connection.png) - - If the board does not appear in the Detected Boards section, click Reload. If the board is still undetected, ensure no other programs (e.g., a code editor) are using the board's COM port. - -3. Search for the ```Modulino``` package by filling in the text box on the search feature. -4. Click Install and wait for the installation confirmation. -5. Disconnect the board from the tool before returning to your code editor to avoid conflicts due to a busy COM port. - -![Package Installer Overview](assets/package-installer-overview.png) - -The module should now be includable in your program using: - -```from modulino import ModulinoDistance``` - -### Getting Distance Data - -Getting data from the sensor is straightforward using the ```Modulino``` library. -For the **Modulino Distance**, there is one crucial function: - -- ```.distance``` - Provides the distance measurement from the sensor. (Default in cm) -- By default the Modulino library uses ```Wire1``` if your board model has a different pinout for the dedicated I²C pins you might have to edit it as instructed [here](https://github.com/arduino/arduino-modulino-mpy/tree/main/docs#%E2%84%B9%EF%B8%8F-using-3rd-party-boards). More information on **Wire** can be found [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/). - -Here is an example of how to implement this function to acquire data: - -```python -from modulino import ModulinoDistance -from time import sleep_ms - -distance = ModulinoDistance() - -while True: - print(f"📏 Distance: {distance.distance} cm") - sleep_ms(50) -``` - -This simple code creates an instance of the ModulinoDistance class and continuously reads the distance values, displaying them in centimeters with a 50ms delay between readings. - -## Troubleshooting - -### Sensor Not Reachable - -If your Modulino's power LED isn't on or the sensor isn't responsive, first check that the board is properly connected: - -- Ensure both the board and the Modulino are connected to your computer, and that the power LEDs on both are lit. -- If the issue persists, make sure the Qwiic cable is properly clicked into place. - -### Library Not Installed Properly - -If you encounter an issue with the `import ModulinoDistance` command, verify that the Modulino library is correctly installed: - -- Check the package installer to ensure the library is installed and up-to-date. -- Re-install the library through the Library Manager. - -### Inaccurate Values - -If the sensor values are not accurate, make sure: - -- The sensor lens is clean and free from dust or obstructions. -- All exposed electronics are not touching any conductive surfaces, as this could interfere with readings. -- The object being measured is within the sensor's detection range. - -## Conclusion - -The **Modulino Distance** is a digital Time-of-Flight distance sensor that communicates over I²C and follows the Modulino form factor. It includes standard Qwiic connectors for quick, solderless connections and easy daisy-chaining with other modules. Paired with the Modulino library, it makes accessing distance data straightforward, allowing you to focus on experimenting or building your system logic. It's a small, reliable module suited for both quick tests and longer-term setups. - -## What Is Next? - -Now that you've learned how to use your Modulino Distance, you're all set to integrate it into your projects! - -- Create a parking assistance system that provides audio feedback as objects get closer, similar to car parking sensors. -- Build a theremin-like musical instrument that changes pitch or volume based on hand movements in front of the sensor. -- Design an automatic dispenser that activates when hands are detected beneath it (for soap, sanitizer, etc.). - diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/AdressChangeIDE.png b/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/AdressChangeIDE.png deleted file mode 100644 index d5cd3fd195..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/AdressChangeIDE.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/Modulino_Knob_Power_Tree.png b/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/Modulino_Knob_Power_Tree.png deleted file mode 100644 index f50d5ba207..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/Modulino_Knob_Power_Tree.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/adressChanger.png b/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/adressChanger.png deleted file mode 100644 index c6eae670c8..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/adressChanger.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/connection-guide-knob-jumper.png b/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/connection-guide-knob-jumper.png deleted file mode 100644 index f53484a929..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/connection-guide-knob-jumper.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/connection-guide-knob-qwiic-chain.png b/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/connection-guide-knob-qwiic-chain.png deleted file mode 100644 index bdb182ec7e..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/connection-guide-knob-qwiic-chain.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/connection-guide-knob-qwiic.png b/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/connection-guide-knob-qwiic.png deleted file mode 100644 index 82dccffca5..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/connection-guide-knob-qwiic.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/connection-guide-knob.png b/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/connection-guide-knob.png deleted file mode 100644 index 8e5bc0b051..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/connection-guide-knob.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/library-dependencies.png b/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/library-dependencies.png deleted file mode 100644 index d25bd9720b..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/library-dependencies.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/library-install.gif b/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/library-install.gif deleted file mode 100644 index 16f396c353..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/library-install.gif and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/library-menu.png b/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/library-menu.png deleted file mode 100644 index 2339cf8450..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/library-menu.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/content.md b/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/content.md deleted file mode 100644 index 44f4ad3ee5..0000000000 --- a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/content.md +++ /dev/null @@ -1,253 +0,0 @@ ---- -title: "How To Use The Modulino Knob" -description: "Learn how to get the most out of your Modulino Knob." -tags: - - Modulino - - QWIIC - - I2C -author: 'Christoher Méndez' -hardware: - - hardware/11.modulinos/modulinos/modulino-knob -software: - - ide-v2 - - web-editor ---- - -The Modulino Knob is a modular sensor based on a quadrature rotary encoder that translates angular motion (rotation) into a digital signal. The sensor value will increase or decrease according to the rotation direction. Also, it includes an SPST switch that is activated when the knob is pressed. - -It uses the Modulino form factor, streamlining integration through the I2C protocol. It provides QWIIC connectors and exposed solderable pins (for boards without a QWIIC interface). - -## General Characteristics - -The Modulino Knob has the following measurement specifications: - - -| **Parameter** | **Condition** | **Minimum** | **Typical** | **Maximum** | **Unit** | -| -------------- | ------------- | ----------- | ---------------- | ----------- | -------- | -| Sensor | Angle | - | 360 (continuous) | - | ° | -| Steps | - | - | 30 | - | - | -| Resolution | - | - | 12 | - | bit | - -### Sensor Details - -The PEC11J-9215F-S0015 rotary encoder is the core component of this module. This sensor output is processed by an STM32C011F4 microcontroller for digital communication (I2C), meaning that the encoder is communicated through the I2C pins using the mentioned microcontroller as an intermediary. - -The default address for the Module is: - -| **Modulino I2C Address** | **Hardware I2C Address** | -| ------------------------ | ------------------------ | -| 0x76 | 0x3A | - -When scanning for I²C address on the bus, you might find the modulino using the **Hardware I²C Address**. However, you should always use the **Modulino I²C Address** when using the official Modulino library. - -Later in this article we teach how to [change the address](#how-to-change-i2c-address). - - -## Pinout - -The rotary encoder is the core component of this module. This input device is controlled by an onboard STM32 microcontroller, which supports digital communication (I²C), meaning it connects directly to the I²C bus on the module without requiring additional conversion circuitry. - -![Arduino Knob Pinout](assets/KnobPinouts.png) - -The board also includes direct connections to the rotary encoder bypassing the built-in microcontroller. - -### 1x10 Header - -| Pin | Function | -|-------|----------------| -| PA2 | Button | -| GND | Ground | -| 3V3 | 3.3 V Power | -| PF2 | RESET | -| SWCLK | SWD Clock | -| SWDIO | SWD Data | -| TX1 | USART Transmit | -| RX1 | USART Receive | -| PA0 | Encoder A | -| PA1 | Encoder B | - -- **PA2: Button:**This pin connects directly to the built-in button of the rotary encoder. -- **GND: Ground:**Ground connection for power and signal reference. -- **3V3: Power:**3.3 V power supply input. -- **PF2: RESET:**The reset pin for the microcontroller, which can be used to reset the system. -- **SWCLK: SWD Clock:**Used for providing the clock signal in the SWD interface. -- **SWDIO: SWD Data:**Used for debugging, as part of the Serial Wire Debug (SWD) interface. -- **TX1: USART Transmit:**Used for transmitting data over UART communication. -- **RX1: USART Receive:**Used for receiving data over UART communication. -- **PA0: Encoder A:**These pins connect directly to the rotary encoder's quadrature outputs. -- **PA1: Encoder B:**These pins connect directly to the rotary encoder's quadrature outputs. - -### 1x4 Header (I2C) - -The pinout for the Modulino Knob is shown below. While the recommended connection method is via the QWIIC connectors, this solderable header provides a connection option when using the modulino with a non-QWIIC compatible board. - -| Pin | Function | -|-------|--------------| -| GND | Ground | -| 3.3 V | Power Supply | -| SDA | I²C Data | -| SCL | I²C Clock | - -## Power Specifications - -The board must be powered **only** by +3.3 VDC when using the solderable pins or the QWIIC interface as per the standard. - -| Parameter | Typical | Unit | -| --------------- | ------- | ---- | -| Supply Voltage | 3.3 | V | -| Average Current | 3.4 | mA | - -The module additionally includes a power LED that draws 1 mA and turns on as soon as it is powered. J1 (Qwiic connector), J2 (Qwiic connector), and the headers all share the same power branch. The power distribution of the module is therefore as follows: - -![Power Tree Modulino Knob](assets/Modulino_Knob_Power_Tree.png) - -## Schematic - -The Modulino Knob uses a simple circuit, as shown in the schematic below: - -![Full Schematic Modulino Knob](assets/schematic.png) - -The main components are the **rotary encoder with integrated pushbutton** (PECHL-9215E-S0015) and the **STM32C011F4U6TR** microcontroller (U1), which handles encoder position reading, button state detection, as well as I²C communication. - -You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, this is the recommended method) or the **solderable pins** (J3). The board runs on **3.3V**, which comes from the QWIIC cable or the **3V3 pin** on J3. - -There's also a small power LED indicator (green) that lights up when the board is on. - -You can grab the full schematic and PCB files from the [Modulino Knob](https://docs.arduino.cc/hardware/modulinos/modulino-knob) product page. - -## How To Connect Your Modulino - -The easiest and most reliable way to connect your Modulino is through the QWIIC Connect System. It's plug-and-play, uses standard I²C, and makes it easy to join multiple modules. If your board supports QWIIC, this is the recommended way to go. Note that the dedicated I²C pins will differ from board to board meaning it is always a good idea to check your specific model. - -![Modulino Wiring Options QWIIC(A - recommended) and Header(B)](assets/connection-guide-knob.png) - -### QWIIC Connector - -Whenever available, the **QWIIC Connect System** is the preferred method. Connecting to the Modulino is extremely simple, just use a standard QWIIC cable to connect your board to either of the QWIIC connectors on the Modulino. Because the cable and connectors are polarized, there is no need to worry about accidentally swapping connections. - -QWIIC is a plug-and-play I²C Connect System that uses standardized 4-pin connectors: - -- GND -- 3.3V -- SDA (Data) -- SCL (Clock) - -![Connection Guide QWIIC](assets/connection-guide-knob-qwiic.png) - -The Modulino features two QWIIC connectors, which are internally connected in parallel. This means you can daisy-chain multiple modules easily by connecting additional QWIIC cables between them. - -### Solderable Header - -When QWIIC is not available, you can use the exposed solderable pins on the module. You can solder pins to the unpopulated pads; just remember the pinout provided in this guide to connect to the right pins of your board. - -![Connection Guide Solder Pads](assets/connection-guide-knob-jumper.png) - -### Daisy-Chaining Multiple Modulino Nodes - -Regardless of whether you connect the first Modulino via QWIIC or through the solderable pins, you can still take advantage of the extra QWIIC connector to daisy-chain additional modules. Each Modulino includes two QWIIC connectors wired in parallel, allowing you to connect one module to the next in a chain. As long as each module is configured with a unique I²C address, they can all communicate on the same bus. This approach keeps your setup clean, modular, and expandable without adding extra wiring complexity. - -![Modulino Wiring Options](assets/connection-guide-knob-qwiic-chain.png) - -***The number of modules you can connect will depend on what modules you are chaining together, as this system allows for multiple sensors from different manufacturers to be added. Also, the cables you use for these connections will play a significant role in the setup's performance. Ensure your cables are properly connected and capable of handling the required data transfer. -Each module should have a unique address on a chain if you plan to address them individually. Later in this article we teach how to [change the address](#how-to-change-i2c-address). Multiple modules with the same address will cause conflicts on the I²C bus and will not allow you to address them individually.*** - -## How To Use Your Modulino - -### Installing The Modulino Library - -You need the official Modulino library available [here](https://github.com/arduino-libraries/Modulino) to use the Modulino Knob. - -With the Arduino IDE, you get some tools that make adding a library easier. To learn how to install the IDE, please visit our [page](https://docs.arduino.cc/micropython/first-steps/install-guide/). - -After opening the IDE, a tab should be visible on the left. Press the book icon for "library" as highlighted in the image. - -![IDE Library Tab](assets/library-menu.png) - -You can now search for the library `Modulino` by filling in the `Filter your search` text box. A prompt might appear saying that additional dependencies are required. This is not a problem, as they will be automatically added when you confirm the prompt. - -![Add Dependencies Prompt](assets/library-dependencies.png) - -The libraries should now start to install. A message will appear after the installation is successful. - -The process should be like this: - -![Library Install](assets/library-install.gif) - -### Getting Knob Data - -Data can be obtained from the sensor using the `Modulino` library. - -For the **Knob** there are two important functions: - -- `get()`: Returns a numerical value relative to the knob rotation. -- `isPressed()`: Returns the state of the knob built-in button. -- `knob.get();` retrieves a unitless value relative to the knob rotation. -- `knob.isPressed();` retrieves the knob button state. -- `knob.set();` changes the initial position of the encoder. -- `Modulino.begin();`: By default the Modulino library uses ```Wire1``` if your connection is in a different Wire you will have to edit it, check [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/) (by default the Modulino library uses ```Wire1``` if your board model has a different pinout for the dedicated I²C pins you might have to edit it. More information on **Wire** can be found [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/)) for the library's hardware compatibility. More information on **Wire** can be found [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/). - -Here is an example sketch of how to implement these functions to acquire data: - -```arduino -#include - -ModulinoKnob knob; - -void setup() { - Serial.begin(9600); - Modulino.begin(); - knob.begin(); -} - -void loop(){ - int position = knob.get(); - bool click = knob.isPressed(); - - Serial.print("Current position is: "); - Serial.println(position); - - if(click){ - Serial.println("Clicked!"); - } - -} -``` - -### How To Change I2C Address - -An example sketch, AddressChanger, is also included with the library inside the `Utilities` folder and available [here](https://github.com/arduino-libraries/Modulino/blob/main/examples/Utilities/AddressChanger/AddressChanger.ino). This sketch changes the I²C address at a software level on the Module's microcontroller. - -![Example location on the IDE](assets/AdressChangeIDE.png) - -- Connect the module to your board, remove any other modules that might be in the chain. Connection must be via I²C. -- Upload the sketch. -- Open the Serial Monitor. -- Text should now appear. Make sure the correct bauld-rate is selected if the displayed characters seem corrupted. - - ![Expected console output](assets/adressChanger.png) - -- Select the address and confirm. Valid I²C addresses range from 0x08 to 0x77 (7-bit values in hexadecimal format, e.g., 0x42). -- Your address should now have changed. Make sure to take note of the selected address. - -To keep track of the address in use the module has a white rectangle on the back. Feel free to use this to write the address that was chosen. - -When using a custom address in your sketch, you'll need to specify this address when creating the module object. For example: - -```arduino -ModulinoKnob knob(0x3E); // Replace 0x3E with your specific address -``` - - -## Conclusion - -The **Modulino Knob** provides a simple solution for UI interface, volume control or rotational measurement in any project. With its **I2C interface**, compact **Modulino form factor**, and **robustness**, it seamlessly integrates into both beginner and advanced applications. - -By leveraging the **Modulino library**, users can quickly access sensor data and implement functionalities such as **user interface control and angle measurement tool**. With just a few lines of code, you can start **controlling your projects**, making it easier than ever to bring intelligent sensing to your applications. - -## What Is Next? - -After mastering the basics of the Modulino Knob, try these project ideas: - -- Calculate what is the encoder rotation angle per step to convert the arbitrary output into a rotation angle output. -- Control the Arduino onboard LED with the press of the knob button. -- Use the Modulino Knob to control the navigation on a UI display on an LCD or OLED screen. \ No newline at end of file diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/KnobPinouts.png b/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/KnobPinouts.png deleted file mode 100644 index ea4147de61..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/KnobPinouts.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/Modulino_Knob_Power_Tree.png b/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/Modulino_Knob_Power_Tree.png deleted file mode 100644 index f50d5ba207..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/Modulino_Knob_Power_Tree.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/connection-guide-knob-jumper.png b/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/connection-guide-knob-jumper.png deleted file mode 100644 index 61ae95f8bc..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/connection-guide-knob-jumper.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/connection-guide-knob-qwiic-chain.png b/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/connection-guide-knob-qwiic-chain.png deleted file mode 100644 index bdb182ec7e..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/connection-guide-knob-qwiic-chain.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/connection-guide-knob-qwiic.png b/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/connection-guide-knob-qwiic.png deleted file mode 100644 index 82dccffca5..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/connection-guide-knob-qwiic.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/connection-guide-knob.png b/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/connection-guide-knob.png deleted file mode 100644 index 8e5bc0b051..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/connection-guide-knob.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/mp-usb-connection.png b/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/mp-usb-connection.png deleted file mode 100644 index fb059f9e8b..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/mp-usb-connection.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/package-installer-overview.png b/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/package-installer-overview.png deleted file mode 100644 index 67678dc808..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/package-installer-overview.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/schematic.png b/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/schematic.png deleted file mode 100644 index 4b20ab5c12..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/assets/schematic.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/content.md b/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/content.md deleted file mode 100644 index b3d29bc8c6..0000000000 --- a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-mp/content.md +++ /dev/null @@ -1,263 +0,0 @@ ---- -title: "How To Use The Modulino Knob with MicroPython" -description: "Learn how to get the most out of your Modulino Knob in a MicroPython environment." -tags: - - Modulino - - QWIIC - - I2C -author: 'Christoher Méndez' -hardware: - - hardware/11.modulinos/modulinos/modulino-knob -software: - - ide-v2 - - web-editor ---- - -The Modulino Knob is a modular sensor based on a quadrature rotary encoder that translates angular motion (rotation) into a digital signal. The sensor value will increase or decrease according to the rotation direction. Also, it includes an SPST switch that is activated when the knob is pressed. - -It uses the Modulino form factor, streamlining integration through the I2C protocol. It provides QWIIC connectors and exposed solderable pins (for boards without a QWIIC interface). - -## General Characteristics - -The Modulino Knob has the following measurement specifications: - - -| **Parameter** | **Condition** | **Minimum** | **Typical** | **Maximum** | **Unit** | -| -------------- | ------------- | ----------- | ---------------- | ----------- | -------- | -| Sensor | Angle | - | 360 (continuous) | - | ° | -| Steps | - | - | 30 | - | - | -| Resolution | - | - | 12 | - | bit | - -### Sensor Details - -The PEC11J-9215F-S0015 rotary encoder is the core component of this module. This sensor output is processed by an STM32C011F4 microcontroller for digital communication (I2C), meaning that the encoder is communicated through the I2C pins using the mentioned microcontroller as an intermediary. - -The default address for the Module is: - -| **Modulino I2C Address** | **Hardware I2C Address** | -| ------------------------ | ------------------------ | -| 0x76 | 0x3A | - -When scanning for I²C address on the bus, you might find the modulino using the **Hardware I²C Address**. However, you should always use the **Modulino I²C Address** when using the official Modulino library. - -Later in this article we teach how to [change the address](#how-to-change-i2c-address). - - -## Pinout - -The rotary encoder is the core component of this module. This input device is controlled by an onboard STM32 microcontroller, which supports digital communication (I²C), meaning it connects directly to the I²C bus on the module without requiring additional conversion circuitry. - -![Arduino Knob Pinout](assets/KnobPinouts.png) - -The board also includes direct connections to the rotary encoder bypassing the built-in microcontroller. - -### 1x10 Header - -| Pin | Function | -|-------|----------------| -| PA2 | Button | -| GND | Ground | -| 3V3 | 3.3 V Power | -| PF2 | RESET | -| SWCLK | SWD Clock | -| SWDIO | SWD Data | -| TX1 | USART Transmit | -| RX1 | USART Receive | -| PA0 | Encoder A | -| PA1 | Encoder B | - -- **PA2: Button:**This pin connects directly to the built-in button of the rotary encoder. -- **GND: Ground:**Ground connection for power and signal reference. -- **3V3: Power:**3.3 V power supply input. -- **PF2: RESET:**The reset pin for the microcontroller, which can be used to reset the system. -- **SWCLK: SWD Clock:**Used for providing the clock signal in the SWD interface. -- **SWDIO: SWD Data:**Used for debugging, as part of the Serial Wire Debug (SWD) interface. -- **TX1: USART Transmit:**Used for transmitting data over UART communication. -- **RX1: USART Receive:**Used for receiving data over UART communication. -- **PA0: Encoder A:**These pins connect directly to the rotary encoder's quadrature outputs. -- **PA1: Encoder B:**These pins connect directly to the rotary encoder's quadrature outputs. - -### 1x4 Header (I2C) - -The pinout for the Modulino Knob is shown below. While the recommended connection method is via the QWIIC connectors, this solderable header provides a connection option when using the modulino with a non-QWIIC compatible board. - -| Pin | Function | -|-------|--------------| -| GND | Ground | -| 3.3 V | Power Supply | -| SDA | I²C Data | -| SCL | I²C Clock | - -## Power Specifications - -The board must be powered **only** by +3.3 VDC when using the solderable pins or the QWIIC interface as per the standard. - -| Parameter | Typical | Unit | -| --------------- | ------- | ---- | -| Supply Voltage | 3.3 | V | -| Average Current | 3.4 | mA | - -The module additionally includes a power LED that draws 1 mA and turns on as soon as it is powered. J1 (Qwiic connector), J2 (Qwiic connector), and the headers all share the same power branch. The power distribution of the module is therefore as follows: - -![Power Tree Modulino Knob](assets/Modulino_Knob_Power_Tree.png) - -## Schematic - -The Modulino Knob uses a simple circuit, as shown in the schematic below: - -![Full Schematic Modulino Knob](assets/schematic.png) - -The main components are the **rotary encoder with integrated pushbutton** (PECHL-9215E-S0015) and the **STM32C011F4U6TR** microcontroller (U1), which handles encoder position reading, button state detection, as well as I²C communication. - -You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, this is the recommended method) or the **solderable pins** (J3). The board runs on **3.3V**, which comes from the QWIIC cable or the **3V3 pin** on J3. - -There's also a small power LED indicator (green) that lights up when the board is on. - -You can grab the full schematic and PCB files from the [Modulino Knob](https://docs.arduino.cc/hardware/modulinos/modulino-knob) product page. - -## How To Connect Your Modulino - -The easiest and most reliable way to connect your Modulino is through the QWIIC Connect System. It's plug-and-play, uses standard I²C, and makes it easy to join multiple modules. If your board supports QWIIC, this is the recommended way to go. Note that the dedicated I²C pins will differ from board to board meaning it is always a good idea to check your specific model. - -![Modulino Wiring Options QWIIC(A - recommended) and Header(B)](assets/connection-guide-knob.png) - -### QWIIC Connector - -Whenever available, the **QWIIC Connect System** is the preferred method. Connecting to the Modulino is extremely simple, just use a standard QWIIC cable to connect your board to either of the QWIIC connectors on the Modulino. Because the cable and connectors are polarized, there is no need to worry about accidentally swapping connections. - -QWIIC is a plug-and-play I²C Connect System that uses standardized 4-pin connectors: - -- GND -- 3.3V -- SDA (Data) -- SCL (Clock) - -![Connection Guide QWIIC](assets/connection-guide-knob-qwiic.png) - -The Modulino features two QWIIC connectors, which are internally connected in parallel. This means you can daisy-chain multiple modules easily by connecting additional QWIIC cables between them. - -### Solderable Header - -When QWIIC is not available, you can use the exposed solderable pins on the module. You can solder pins to the unpopulated pads; just remember the pinout provided in this guide to connect to the right pins of your board. - -![Connection Guide Solder Pads](assets/connection-guide-knob-jumper.png) - -### Daisy-Chaining Multiple Modulino Nodes - -Regardless of whether you connect the first Modulino via QWIIC or through the solderable pins, you can still take advantage of the extra QWIIC connector to daisy-chain additional modules. Each Modulino includes two QWIIC connectors wired in parallel, allowing you to connect one module to the next in a chain. As long as each module is configured with a unique I²C address, they can all communicate on the same bus. This approach keeps your setup clean, modular, and expandable without adding extra wiring complexity. - -![Modulino Wiring Options](assets/connection-guide-knob-qwiic-chain.png) - -***The number of modules you can connect will depend on what modules you are chaining together, as this system allows for multiple sensors from different manufacturers to be added. Also, the cables you use for these connections will play a significant role in the setup's performance. Ensure your cables are properly connected and capable of handling the required data transfer. -Each module should have a unique address on a chain if you plan to address them individually. Later in this article we teach how to [change the address](#how-to-change-i2c-address). Multiple modules with the same address will cause conflicts on the I²C bus and will not allow you to address them individually.*** - -## How To Program Your Modulino - -### Installing The Modulino Library - -To program your Modulino it is recommended you use the official `Modulino` micropython library available [here](https://github.com/arduino/arduino-modulino-mpy). The library is fully compatible with the **Arduino Lab for MicroPython**. - -For information on installing the **Arduino Lab for MicroPython** please visit our [page](https://docs.arduino.cc/micropython/first-steps/install-guide/). - -The `Modulino` library is not available by default on MicroPython devices hence installation is needed. - -To simplify the process the [MicroPython Package Installer](https://github.com/arduino/lab-micropython-package-installer/releases) is recommended as it will provide a graphical interface to guide the installation. - -After installation, you should now be able to: - -1. Open the tool. -2. Plug in your board to the computer. - - ![USB Connection](assets/mp-usb-connection.png) - - If the board does not appear in the Detected Boards section, click Reload. If the board is still undetected, ensure no other programs (e.g., a code editor) are using the board's COM port. - -3. Search for the `Modulino` package by filling in the text box on the search feature. -4. Click Install and wait for the installation confirmation. -5. Disconnect the board from the tool before returning to your code editor to avoid conflicts due to a busy COM port. - -![Package Installer Overview](assets/package-installer-overview.png) - -The module should now be includable in your program using: - -```python -from modulino import ModulinoThermo -``` - -### Getting Knob Data - -Data can be obtained from the sensor using the `Modulino` package. - -For the **Knob** there is a crucial function: - -- `ModulinoKnob` is imported from the `modulino` package to interact with the **Modulino Knob** sensor. -- `sleep` is imported from the `time` module to introduce delays between readings. -- `.update` - Check for new available data from the sensor and execute callback functions to react to the button press or rotation. -- `knob.value` lets you set the sensor initial value from which the encoder rotation will start increasing or decreasing. -- `knob.range` lets you set the minimum and maximum possible value of the encoder output. -- `knob.on_press` this function establish what will happen when the knob button is pressed. -- `knob.on_release` calls the `on_release()` function when the knob button is released. -- `knob.on_rotate_clockwise` prints the rotation value when the knob is turned clockwise. -- `knob.on_rotate_counter_clockwise` prints the rotation value when the knob is turned counter-clockwise. -- `knob.update()` function is called continuously checking for knob new values. If the rotation or button state is changed, it will print a message on the Terminal. -By default the Modulino library uses ```Wire1``` if your board model has a different pinout for the dedicated I²C pins you might have to edit it as instructed [here](https://github.com/arduino/arduino-modulino-mpy/tree/main/docs#%E2%84%B9%EF%B8%8F-using-3rd-party-boards). More information on **Wire** can be found [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/). - - -Here is an example of how to implement this function to acquire data: - -```python -from modulino import ModulinoKnob -from time import sleep - -knob = ModulinoKnob() -knob.value = 0 # (Optional) Set an initial value -knob.range = (-10, 10) # (Optional) Set a value range - -def on_release(): - knob.reset() - print("🔘 Released! Knob's value was reset.") - -knob.on_press = lambda: print("🔘 Pressed!") -knob.on_release = on_release -knob.on_rotate_clockwise = lambda steps, value: print(f"🎛️ Rotated {steps} steps clockwise! Value: {value}") -knob.on_rotate_counter_clockwise = lambda steps, value: print(f"🎛️ Rotated {steps} steps counter clockwise! Value: {value}") - -while True: - if(knob.update()): - print("👀 Knob value or state changed!") - - sleep(0.1) -``` - -The code can be easily adapted to trigger actions at certain rotation thresholds or to log data for analysis. - -### How To Change Address - -A sketch is also available included with the library named `AddressChanger` and also available [here](https://github.com/arduino/arduino-modulino-mpy/blob/main/examples/change_address.py). This sketch changes the I2C address at a software level on the Module's microcontroller. - -- Connect the module to your board via I2C, ensuring no other modules are in the chain. -- Run the script in a MicroPython environment. -- Follow the on-screen instructions (REPL) to select the device and enter a new address. Valid I²C addresses range from 0x08 to 0x77 (7-bit values in hexadecimal format, e.g., 0x42). -- The script will attempt to change the address and confirm success. - -To keep track of the address in use, the module has a white rectangle on the back. Feel free to use this to write the address that was chosen. - -When using a custom address in your MicroPython sketch, you'll need to specify this address when creating the module object. For example: - -```python -knob_module = ModulinoKnob(address=0x45) # Replace 0x45 with your specific address -``` - -## Conclusion - -The **Modulino Knob** provides a simple solution for UI interface, volume control or rotational measurement in any project. With its **I2C interface**, compact **Modulino form factor**, and **robustness**, it seamlessly integrates into both beginner and advanced applications. - -By leveraging the **Modulino package**, users can quickly access sensor data and implement functionalities such as **user interface control and angle measurement tool**. With just a few lines of code, you can start **controlling your projects**, making it easier than ever to bring intelligent sensing to your applications. - -## What Is Next? - -After mastering the basics of the Modulino Knob, try these project ideas: - -- Calculate what is the encoder rotation angle per step to convert the arbitrary output into a rotation angle output. -- Control the Arduino onboard LED with the press of the knob button. -- Use the Modulino Knob to control the navigation on a UI display on an LCD or OLED screen. \ No newline at end of file diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/IDE-Left-Tab.png b/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/IDE-Left-Tab.png deleted file mode 100644 index c7bb86575e..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/IDE-Left-Tab.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/Modulino_Movement_Power_Tree.png b/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/Modulino_Movement_Power_Tree.png deleted file mode 100644 index fe775335ff..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/Modulino_Movement_Power_Tree.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/connection-guide-movement-jumper.png b/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/connection-guide-movement-jumper.png deleted file mode 100644 index 5381b10c45..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/connection-guide-movement-jumper.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/connection-guide-movement-qwiic-chain.png b/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/connection-guide-movement-qwiic-chain.png deleted file mode 100644 index c6c89cc127..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/connection-guide-movement-qwiic-chain.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/connection-guide-movement-qwiik.png b/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/connection-guide-movement-qwiik.png deleted file mode 100644 index 331a2f823c..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/connection-guide-movement-qwiik.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/connection-guide-movement.png b/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/connection-guide-movement.png deleted file mode 100644 index c21dcc1db7..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/connection-guide-movement.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/library-dependencies.png b/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/library-dependencies.png deleted file mode 100644 index d25bd9720b..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/library-dependencies.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/library-install.gif b/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/library-install.gif deleted file mode 100644 index 16f396c353..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/library-install.gif and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/schematic.png b/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/schematic.png deleted file mode 100644 index a804960788..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/schematic.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/content.md b/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/content.md deleted file mode 100644 index d7543e2756..0000000000 --- a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/content.md +++ /dev/null @@ -1,326 +0,0 @@ ---- -title: "How To Use The Modulino Movement" -description: "Learn how to get the most out of your Modulino Movement." -tags: - - Modulino - - QWIIC - - I2C -author: 'Pedro Sousa Lima' -hardware: - - hardware/11.modulinos/modulinos/modulino-movement -software: - - ide-v2 - - web-editor ---- - -The Modulino Movement is a modular sensor that measures acceleration and angular velocity, making it perfect to add motion sensing to your projects! The Modulino form factor is shaped with two QWIIC connectors and the I²C protocol integration, allowing the connection and programming of multiple Modulino nodes in a very simple way. In addition to the QWIIC's connectors, the Modulino nodes also expose solderable pins that can be used in multiple ways and make them compatible with boards that are not QWIIC compatible. - - -The Modulino form factor is shaped with two QWIIC connectors and the I²C protocol integration, allowing the connection and programming of multiple modulinos in a very simple way. In addition to the QWIIC's connectors, the Modulinos also expose solderable pins that can be used in multiple ways and make them compatible with boards that are not QWIIC compatible. - -## General Characteristics - -The Modulino Movement is capable of measuring acceleration and angular velocity. Take a look at the following table to know more about its measuring ranges: - -| Parameter | Condition | Minimum | Typical | Maximum | Unit | -|---------------------------------|-------------------------|---------|---------|---------|----------| -| **Accelerometer Range** | Configurable Full Scale | ±2 | ±8 | ±16 | g | -| **Gyroscope Range** | Configurable Full Scale | ±125 | ±1000 | ±2000 | dps | -| **Accelerometer Sensitivity** | @ ±2g | 0.061 | - | - | mg/LSB | -| **Gyroscope Sensitivity** | @ ±125dps | 4.375 | - | - | mdps/LSB | -| **Accelerometer Noise Density** | High-performance mode | - | 70 | - | µg/√Hz | -| **Gyroscope Noise Density** | High-performance mode | - | 3.8 | - | mdps/√Hz | -| **Temperature Sensor Range** | - | -40 | - | +85 | °C | -| **FIFO Buffer** | - | - | 9 | - | KB | -| **Sampling Rate** | Output Data Rate | 1.6 | - | 6664 | Hz | - -### Sensor Details - -The LSM6DSOXTR sensor from STMicroelectronics is the core component of this module. This 6-axis IMU (accelerometer and gyroscope) natively supports digital communication (I²C and SPI), meaning it connects directly to the I²C bus on the module without requiring additional conversion circuitry. -The default address for the Module is: - -| Modulino I²C Address | Hardware I²C Address | -|----------------------|----------------------| -| 0x6A or 0x7E | 0x6A or 0x7E | - -When scanning for I²C address on the bus, you might find the modulino using the **Hardware I²C Address**. However, you should always use the **Modulino I²C Address** when using the official Modulino library. -Later in this article we teach how to [change the address](#how-to-change-i2c-address). - -## Pinout - -The pinout for the Modulino Movement is shown below. Please note that the exposed solderable pins are directly connected to the QWIIC connectors using the same I²C interface. - -![Arduino Movement Pinout](assets/MovementPinouts.png) - -Depending on the board connected to the modulino, the I²C pin names to program it may differ. Please check the [board tutorials](https://docs.arduino.cc/hardware/) on your modulino's compatible board or the [Modulino library](https://github.com/arduino-libraries/Modulino/tree/main/docs) to learn more. - -### 1x10 Header - -| Pin | Function | -|---------|------------------| -| VDDIO | Power | -| GND | Ground | -| INT1 | Interrupt 1 | -| INT2 | Interrupt 2 | -| SDO/SA0 | SPI Data Out | -| SCx | SPI Clock | -| SDx | SPI Data | -| CS | SPI Chip Select | -| SDOAUX | Auxiliary Output | -| OCSAUX | Auxiliary Output | - -- **VDDIO: Power** – I/O voltage supply pin for the sensor. -- **GND: Ground** – Ground connection for power and signal reference. -- **INT1: Interrupt 1** – Programmable interrupt output pin. -- **INT2: Interrupt 2** – Programmable interrupt output pin. -- **SDO/SA0: SPI Data Out** – SPI data output pin, also used as I2C address selection. -- **SCx: SPI Clock** – Clock signal for SPI communication. -- **SDx: SPI Data** – SPI data input pin. -- **CS: SPI Chip Select** – Chip select pin for SPI communication. -- **SDOAUX: Auxiliary Output** – Auxiliary data output pin. -- **OCSAUX: Auxiliary Output** – Auxiliary output control signal pin. - -### 1x4 Header (I2C) - -| Pin | Function | -|-------|--------------| -| GND | Ground | -| 3.3 V | Power Supply | -| SDA | I2C Data | -| SCL | I2C Clock | - -## Power Specifications - -The board is typically powered by +3.3 VDC when using the QWIIC interface as per the I²C standard. - -| Parameter | Condition | Minimum | Typical | Maximum | Unit | -|-----------------------------------------------|---------------------|---------|-------------|---------|------| -| Supply Voltage | - | 1.71 | 3.3 (QWIIC) | 3.6 | V | -| I/O Voltage | - | 1.62 | - | 3.6 | V | -| Gyro + Accel Current (High Performance Mode) | Both sensors active | - | 0.55 | - | mA | -| Accelerometer Current (High Performance Mode) | - | - | 170 | - | µA | -| Accelerometer Current (Low Power Mode) | ODR = 50 Hz | - | 26 | - | µA | -| Accelerometer Current (Ultra-Low Power Mode) | ODR = 50 Hz | - | 9.5 | - | µA | - -The module additionally includes a power LED that draws 1 mA and turns on as soon as it is powered. J1 (Qwiic connector), J2 (Qwiic connector), and the headers all share the same power branch. The power distribution of the module is therefore as follows: - -![Power Tree Modulino Movement](assets/Modulino_Movement_Power_Tree.png) - -## Schematic - -The Modulino Movement uses a simple circuit, as shown in the schematic below: - -![Full Schematic Modulino Movement](assets/schematic.png) - -The main component is the **LSM6DSOXTR** sensor (U1), which handles both acceleration and gyroscope measurements, as well as I²C communication. - -You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, this is the recommended method) or the **solderable pins** (J4). The board runs on **3.3V**, which comes from the QWIIC cable or the **3V3 pin** on J4. - -There's also a small power indicator LED that lights up when the board is on. - -Some options for customizing the module's features via onboard solder jumpers are available: - -### **VDDIO Independence:** - -- By default, **VDDIO is connected to +3V3**. -- To make **VDDIO independent**, cut the corresponding solder jumper. - -### SPI Mode Selection: - -- The LSM6DSOXTR supports both **3-wire and 4-wire SPI**. -- You can configure SPI communication and connect additional sensors by cutting or soldering the appropriate jumpers. Please take a look at the IMU's datasheet for more information. - -You can grab the full schematic and PCB files from the [Modulino Movement](https://docs.arduino.cc/hardware/modulinos/modulino-movement) product page. - -## How To Connect Your Modulino - -The easiest and most reliable way to connect your Modulino is through the QWIIC Connect System. It's plug-and-play, uses standard I²C, and makes it easy to join multiple modules. If your board supports QWIIC, this is the recommended way to go. Note that the dedicated I²C pins will differ from board to board meaning it is always a good idea to check your specific model. - -If your board doesn't have a QWIIC connector, you can still access the same I²C bus and power the module using the solderable header pads just make sure you wire it to 3.3V and match the I²C pinout. - -![Modulino Wiring Options QWIIC(A - recommended) and Header(B)](assets/connection-guide-movement.png) - -### QWIIC Connector - -Whenever available, the **QWIIC Connect System** is the preferred method. Connecting to the Modulino is extremely simple, just use a standard QWIIC cable to connect your board to either of the QWIIC connectors on the Modulino. Because the cable and connectors are polarized, there is no need to worry about accidentally swapping connections. - -QWIIC is a plug-and-play I²C Connect System that uses standardized 4-pin connectors: - -- GND -- 3.3V -- SDA (Data) -- SCL (Clock) - -![Connection Guide QWIIC](assets/connection-guide-movement-qwiik.png) - -The Modulino features two QWIIC connectors, which are internally connected in parallel. This means you can daisy-chain multiple modules easily by connecting additional QWIIC cables between them. - -When connecting multiple I²C devices, address conflicts may occur if two or more devices share the same default I²C address. The Modulino addresses this potential issue by allowing you to select a different address through a simple hardware modification. We cover this process in detail in the [**Changing I²C Address**](#changing-i2c-address) section, enabling you to integrate multiple identical modules or different devices that share the same default address in your project. - -### Solderable Header - -When QWIIC is not available, you can use the exposed solderable pins on the module. You can solder pins to the unpopulated pads; just remember the pinout provided in this guide to connect to the right pins of your board. - -![Connection Guide Solder Pads](assets/connection-guide-movement-jumper.png) - -## Daisy-Chaining Multiple Modulino Nodes - -Regardless of whether you connect the first Modulino via QWIIC or through the solderable pins, you can still take advantage of the extra QWIIC connector to daisy-chain additional modules. Each Modulino includes two QWIIC connectors wired in parallel, allowing you to connect one module to the next in a chain. As long as each module is configured with a unique I²C address, they can all communicate on the same bus as long as you select the correct I²C pins depending on your board. This approach keeps your setup clean, modular, and expandable without adding extra wiring complexity. - -![Modulino Wiring Options](assets/connection-guide-movement-qwiic-chain.png) - -***The number of modules you can connect will depend on what modules you are chaining together, as this system allows for multiple sensors from different manufacturers to be added. Also, the cables you use for these connections will play a significant role in the setup's performance. Ensure your cables are correctly connected and capable of handling the required data transfer. -Each module should have a unique address on a chain if you plan to address them individually. Later in this article we teach how to [change the address](#how-to-change-i2c-address). Multiple modules with the same address will cause conflicts on the I²C bus and will not allow you to address them individually.*** - -### Changing I2C Address - -The Modulino Movement can be configured to use an alternative I2C address (0x6B) instead of the default address (0x6A). To change the address, follow these steps carefully: - -1. Disconnect all power from the module -2. Locate the address selection solder jumpers on the back of the board -3. Cut the trace on the jumper marked **Default** (0x6A) -4. Solder closed the jumper marked **0x6B** - -After completing these modifications, your module will use the new address (0x6B) when powered on again. - -**IMPORTANT**: Ensure the module remains unpowered during this entire process. Never have both jumpers closed simultaneously when power is applied, as this will create a short circuit between power and ground that could damage your module. - -![I2C Address Change](assets/I2C-change-movement.png) - -When using a custom address in your sketch, you'll need to specify this address when creating the module object. For example: -```arduino -ModulinoMovement movement(0x7E); -``` - - - -## How To Use Your Modulino - -### Installing The Modulino Library - -You need the official Modulino library available [here](https://docs.arduino.cc/libraries/modulino/) to use the Modulino Movement. With the Arduino IDE you get some tools that make adding a library easier. To learn how to install the IDE please visit our [page](https://www.support.arduino.cc/hc/en-us/articles/360019833020-Download-and-install-Arduino-IDE). - -After opening the IDE, a tab should be visible on the left. Press the book icon for "library" as highlighted in the image. - -![IDE Library Tab](assets/IDE-Left-Tab.png) - -You can now look for the library ```Modulino``` by filling in the ```Filter your search``` textbox. - -A prompt might appear saying that additional dependencies are required. This is not a problem, as they will be automatically added when you confirm the prompt. - -![Add Dependencies Prompt](assets/library-dependencies.png) - -The process should look like this: - -![Library Install](assets/library-install.gif) - -A message will appear after the installation is successful. - -### Getting Acceleration Data - -Getting data from the sensor is fairly simple using the ```Modulino``` library. For the **Modulino Movement** there are four important functions: - -- ```update()```: Updates the sensor readings. -- ```getX()```: Retrieves the acceleration value on the **X-axis** in **g**. -- ```getY()```: Retrieves the acceleration value on the **Y-axis** in **g**. -- ```getZ()```: Retrieves the acceleration value on the **Z-axis** in **g**. -- ```getRoll()```: Retrieves the angular rotation around the X-axis in **dps**. -- ```getPitch()```: Retrieves the angular rotation around the Y-axis in **dps**. -- ```getYaw()```: Retrieves the angular rotation around the Z-axis in **dps**. -- ```Modulino.begin();```: By default the Modulino library uses ```Wire1``` if your connection is in a different Wire you will have to edit it, check [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/) (by default the Modulino library uses ```Wire1``` if your board model has a different pinout for the dedicated I²C pins you might have to edit it. More information on **Wire** can be found [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/)) for the library's hardware compatibility. More information on **Wire** can be found [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/). - -Here is an example sketch of how to implement these functions to acquire data and show it using the serial monitor: - -```arduino -#include "Modulino.h" - -// Create a ModulinoMovement -ModulinoMovement movement; - - -float x, y, z; -float roll, pitch, yaw; - - -void setup() { - Serial.begin(9600); - // Initialize Modulino I2C communication - Modulino.begin(); - // Detect and connect to movement sensor module - movement.begin(); -} - -void loop() { - // Read new movement data from the sensor - movement.update(); - - // Get acceleration and gyroscope values - x = movement.getX(); - y = movement.getY(); - z = movement.getZ(); - roll = movement.getRoll(); - pitch = movement.getPitch(); - yaw = movement.getYaw(); - - // Print acceleration values - Serial.print("A: "); - Serial.print(x, 3); - Serial.print(", "); - Serial.print(y, 3); - Serial.print(", "); - Serial.print(z, 3); - - // Print divider between acceleration and gyroscope - Serial.print(" | G: "); - - // Print gyroscope values - Serial.print(roll, 1); - Serial.print(", "); - Serial.print(pitch, 1); - Serial.print(", "); - Serial.println(yaw, 1); - - delay(200); -} -``` - -The code example provided shows how to initialize the sensor, read the acceleration data, and display it on the serial monitor. The data is continuously updated, showing the current acceleration values in real time. - -It can be easily adapted to trigger actions at certain movement thresholds or to detect specific motion patterns in your projects. - -## Troubleshooting - -### Sensor Not Reachable - -If your Modulino's power LED isn't on or the sensor isn't responsive, first check that the board is properly connected: - -- Ensure both the board and the Modulino are connected to your computer, and that the power LEDs on both are lit. -- If the issue persists, make sure the Qwiic cable is properly clicked into place. - -### Library Not Installed Properly - -If you encounter an issue with the `#include "modulino.h"` command, verify that the Modulino library is correctly installed: - -- Check your IDE to ensure the library is installed and up-to-date. -- Re-install the library through the Library Manager. - -### Inaccurate Values - -If the sensor values are not accurate, make sure: - -- The sensor is not placed on an unstable surface that might cause unwanted vibrations. -- All exposed electronics are not touching any conductive surfaces, as this could interfere with readings. -- The board is mounted securely when measuring precise movements. - -## Conclusion - -The **Modulino Movement** is a digital 6-axis IMU sensor that communicates over I²C and follows the Modulino form factor. It includes standard Qwiic connectors for quick, solderless connections and easy daisy-chaining with other modules. Paired with the Modulino library, it makes accessing motion data straightforward, allowing you to focus on experimenting or building your system logic. It's a small, reliable module suited for both quick tests and longer-term setups. - -## What Is Next? - -Now that you've learned how to use your Modulino Movement, you're all set to integrate it into your projects! - -- Use the movement data to detect different patterns and use these as inputs for your projects. -- Create a motion-activated alarm that triggers when unexpected movement is detected. -- Build a balance game that challenges players to keep the sensor level within certain parameters. -- Make a pedometer that counts steps based on the characteristic motion patterns of walking. \ No newline at end of file diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/I2C-change-movement.png b/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/I2C-change-movement.png deleted file mode 100644 index a3c9a51894..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/I2C-change-movement.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/Modulino_Movement_Power_Tree.png b/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/Modulino_Movement_Power_Tree.png deleted file mode 100644 index fe775335ff..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/Modulino_Movement_Power_Tree.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/MovementPinouts.png b/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/MovementPinouts.png deleted file mode 100644 index 9dd2cf39e3..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/MovementPinouts.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/connection-guide-movement-jumper.png b/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/connection-guide-movement-jumper.png deleted file mode 100644 index b72819526f..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/connection-guide-movement-jumper.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/connection-guide-movement-qwiic-chain.png b/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/connection-guide-movement-qwiic-chain.png deleted file mode 100644 index c6c89cc127..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/connection-guide-movement-qwiic-chain.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/connection-guide-movement-qwiik.png b/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/connection-guide-movement-qwiik.png deleted file mode 100644 index 331a2f823c..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/connection-guide-movement-qwiik.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/connection-guide-movement.png b/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/connection-guide-movement.png deleted file mode 100644 index c21dcc1db7..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/connection-guide-movement.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/mp-usb-connection.png b/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/mp-usb-connection.png deleted file mode 100644 index fb059f9e8b..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/mp-usb-connection.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/package-installer-overview.png b/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/package-installer-overview.png deleted file mode 100644 index 67678dc808..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/package-installer-overview.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/schematic.png b/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/schematic.png deleted file mode 100644 index a804960788..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/assets/schematic.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/content.md b/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/content.md deleted file mode 100644 index 0a82cf4646..0000000000 --- a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/content.md +++ /dev/null @@ -1,292 +0,0 @@ ---- -title: "How To Use The Modulino Movement And MicroPython" -description: "Learn how to get the most out of your Modulino Movement in a MicroPython environment." -tags: - - Modulino - - QWIIC - - I2C -author: 'Pedro Sousa Lima' -hardware: - - hardware/11.modulinos/modulinos/modulino-movement -software: - - ide-v2 - - web-editor ---- - -The Modulino Movement is a modular sensor that measures acceleration and angular velocity, making it perfect to add motion sensing to your projects! The Modulino form factor is shaped with two QWIIC connectors and the I²C protocol integration, allowing the connection and programming of multiple Modulino nodes in a very simple way. In addition to the QWIIC's connectors, the Modulino nodes also expose solderable pins that can be used in multiple ways and make them compatible with boards that are not QWIIC compatible. - -## General Characteristics - -The Modulino Movement is capable of measuring acceleration and angular velocity. Take a look at the following table to know more about its measuring ranges: - -| Parameter | Condition | Minimum | Typical | Maximum | Unit | -|---------------------------------|-------------------------|---------|---------|---------|----------| -| **Accelerometer Range** | Configurable Full Scale | ±2 | ±8 | ±16 | g | -| **Gyroscope Range** | Configurable Full Scale | ±125 | ±1000 | ±2000 | dps | -| **Accelerometer Sensitivity** | @ ±2g | 0.061 | - | - | mg/LSB | -| **Gyroscope Sensitivity** | @ ±125dps | 4.375 | - | - | mdps/LSB | -| **Accelerometer Noise Density** | High-performance mode | - | 70 | - | µg/√Hz | -| **Gyroscope Noise Density** | High-performance mode | - | 3.8 | - | mdps/√Hz | -| **Temperature Sensor Range** | - | -40 | - | +85 | °C | -| **FIFO Buffer** | - | - | 9 | - | KB | -| **Sampling Rate** | Output Data Rate | 1.6 | - | 6664 | Hz | - -### Sensor Details - -The LSM6DSOXTR sensor from STMicroelectronics is the core component of this module. This 6-axis IMU (accelerometer and gyroscope) natively supports digital communication (I²C and SPI), meaning it connects directly to the I²C bus on the module without requiring additional conversion circuitry. - -The default address for the Module is: - -| Modulino I²C Address | Hardware I²C Address | -|----------------------|----------------------| -| 0x6A or 0x7E | 0x6A or 0x7E | - -When scanning for I²C address on the bus, you might find the modulino using the **Hardware I²C Address**. However, you should always use the **Modulino I²C Address** when using the official Modulino library. - -Later in this article we teach how to [change the address](#how-to-change-i2c-address). - -## Pinout - -The pinout for the Modulino Movement is shown below. Please note that the exposed solderable pins are directly connected to the QWIIC connectors using the same I²C interface. - -![Arduino Movement Pinout](assets/MovementPinouts.png) - -Depending on the board connected to the modulino, the I²C pin names to program it may differ. Please check the [board tutorials](https://docs.arduino.cc/hardware/) on your modulino's compatible board or the [Modulino library](https://github.com/arduino-libraries/Modulino/tree/main/docs) to learn more. - -### 1x10 Header - -| Pin | Function | -|---------|------------------| -| VDDIO | Power | -| GND | Ground | -| INT1 | Interrupt 1 | -| INT2 | Interrupt 2 | -| SDO/SA0 | SPI Data Out | -| SCx | SPI Clock | -| SDx | SPI Data | -| CS | SPI Chip Select | -| SDOAUX | Auxiliary Output | -| OCSAUX | Auxiliary Output | - -- **VDDIO: Power** – I/O voltage supply pin for the sensor. -- **GND: Ground** – Ground connection for power and signal reference. -- **INT1: Interrupt 1** – Programmable interrupt output pin. -- **INT2: Interrupt 2** – Programmable interrupt output pin. -- **SDO/SA0: SPI Data Out** – SPI data output pin, also used as I2C address selection. -- **SCx: SPI Clock** – Clock signal for SPI communication. -- **SDx: SPI Data** – SPI data input pin. -- **CS: SPI Chip Select** – Chip select pin for SPI communication. -- **SDOAUX: Auxiliary Output** – Auxiliary data output pin. -- **OCSAUX: Auxiliary Output** – Auxiliary output control signal pin. - -### 1x4 Header (I2C) - -| Pin | Function | -|-------|--------------| -| GND | Ground | -| 3.3 V | Power Supply | -| SDA | I2C Data | -| SCL | I2C Clock | - -## Power Specifications - -The board is typically powered by +3.3 VDC when using the QWIIC interface as per the I²C standard. - -| Parameter | Condition | Minimum | Typical | Maximum | Unit | -|-----------------------------------------------|---------------------|---------|-------------|---------|------| -| Supply Voltage | - | 1.71 | 3.3 (QWIIC) | 3.6 | V | -| I/O Voltage | - | 1.62 | - | 3.6 | V | -| Gyro + Accel Current (High Performance Mode) | Both sensors active | - | 0.55 | - | mA | -| Accelerometer Current (High Performance Mode) | - | - | 170 | - | µA | -| Accelerometer Current (Low Power Mode) | ODR = 50 Hz | - | 26 | - | µA | -| Accelerometer Current (Ultra-Low Power Mode) | ODR = 50 Hz | - | 9.5 | - | µA | - -The module additionally includes a power LED that draws 1 mA and turns on as soon as it is powered. J1 (Qwiic connector), J2 (Qwiic connector), and the headers all share the same power branch. The power distribution of the module is therefore as follows: - -![Power Tree Modulino Movement](assets/Modulino_Movement_Power_Tree.png) - -## Schematic - -The Modulino Movement uses a simple circuit, as shown in the schematic below: - -![Full Schematic Modulino Movement](assets/schematic.png) - -The main component is the **LSM6DSOXTR** sensor (U1), which handles both acceleration and gyroscope measurements, as well as I²C communication. - -You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, this is the recommended method) or the **solderable pins** (J4). The board runs on **3.3V**, which comes from the QWIIC cable or the **3V3 pin** on J4. - -There's also a small power indicator LED that lights up when the board is on. - -Some options for customizing the module's features via onboard solder jumpers are available: - -### **VDDIO Independence:** - -- By default, **VDDIO is connected to +3V3**. -- To make **VDDIO independent**, cut the corresponding solder jumper. - -### SPI Mode Selection: - -- The LSM6DSOXTR supports both **3-wire and 4-wire SPI**. -- You can configure SPI communication and connect additional sensors by cutting or soldering the appropriate jumpers. Please take a look at the IMU's datasheet for more information. - -You can grab the full schematic and PCB files from the [Modulino Movement](https://docs.arduino.cc/hardware/modulinos/modulino-movement) product page. - -## How To Connect Your Modulino - -The easiest and most reliable way to connect your Modulino is through the QWIIC Connect System. It's plug-and-play, uses standard I²C, and makes it easy to join multiple modules. If your board supports QWIIC, this is the recommended way to go. Note that the dedicated I²C pins will differ from board to board meaning it is always a good idea to check your specific model. - -If your board doesn't have a QWIIC connector, you can still access the same I²C bus and power the module using the solderable header pads just make sure you wire it to 3.3V and match the I²C pinout. - -![Modulino Wiring Options QWIIC(A - recommended) and Header(B)](assets/connection-guide-movement.png) - -### QWIIC Connector - -Whenever available, the **QWIIC Connect System** is the preferred method. Connecting to the Modulino is extremely simple, just use a standard QWIIC cable to connect your board to either of the QWIIC connectors on the Modulino. Because the cable and connectors are polarized, there is no need to worry about accidentally swapping connections. - -QWIIC is a plug-and-play I²C Connect System that uses standardized 4-pin connectors: -- GND -- 3.3V -- SDA (Data) -- SCL (Clock) - -![Connection Guide QWIIC](assets/connection-guide-movement-qwiik.png) - -The Modulino features two QWIIC connectors, which are internally connected in parallel. This means you can daisy-chain multiple modules easily by connecting additional QWIIC cables between them. - -When connecting multiple I²C devices, address conflicts may occur if two or more devices share the same default I²C address. The Modulino addresses this potential issue by allowing you to select a different address through a simple hardware modification. We cover this process in detail in the [**Changing I²C Address**](#changing-i2c-address) section, enabling you to integrate multiple identical modules or different devices that share the same default address in your project. - -### Solderable Header - -When QWIIC is not available, you can use the exposed solderable pins on the module. You can solder pins to the unpopulated pads; just remember the pinout provided in this guide to connect to the right pins of your board. - -![Connection Guide Solder Pads](assets/connection-guide-movement-jumper.png) - -## Daisy-Chaining Multiple Modulino Nodes - - -Regardless of whether you connect the first Modulino via QWIIC or through the solderable pins, you can still take advantage of the extra QWIIC connector to daisy-chain additional modules. Each Modulino includes two QWIIC connectors wired in parallel, allowing you to connect one module to the next in a chain. As long as each module is configured with a unique I²C address, they can all communicate on the same bus as long as you select the correct I²C pins depending on your board. This approach keeps your setup clean, modular, and expandable without adding extra wiring complexity. - -![Modulino Wiring Options](assets/connection-guide-movement-qwiic-chain.png) - -***The number of modules you can connect will depend on what modules you are chaining together, as this system allows for multiple sensors from different manufacturers to be added. Also, the cables you use for these connections will play a significant role in the setup's performance. Ensure your cables are correctly connected and capable of handling the required data transfer. -Each module should have a unique address on a chain if you plan to address them individually. Later in this article we teach how to [change the address](#how-to-change-i2c-address). Multiple modules with the same address will cause conflicts on the I²C bus and will not allow you to address them individually.*** - -### Changing I2C Address - -The Modulino Movement can be configured to use an alternative I2C address (0x6B) instead of the default address (0x6A). To change the address, follow these steps carefully: - -1. Disconnect all power from the module -2. Locate the address selection solder jumpers on the back of the board -3. Cut the trace on the jumper marked **Default** (0x6A) -4. Solder closed the jumper marked **0x6B** - -After completing these modifications, your module will use the new address (0x6B) when powered on again. - -**IMPORTANT**: Ensure the module remains unpowered during this entire process. Never have both jumpers closed simultaneously when power is applied, as this will create a short circuit between power and ground that could damage your module. - -![I2C Address Change](assets/I2C-change-movement.png) - -When using a custom address in your MicroPython sketch, you'll need to specify this address when creating the module object. For example: -```python -movement_module = ModulinoMovement(address=0x7E) -``` - - -## How To Program Your Modulino - -### Installing The Modulino Library - -To program your Modulino it is recommended you use the official ```Modulino``` micropython library available [here](https://github.com/arduino/arduino-modulino-mpy). The library is fully compatible with the no **Arduino Lab for MicroPython**. - -For information on installing the **Arduino Lab for MicroPython** please visit our [page](https://docs.arduino.cc/micropython/first-steps/install-guide/). - -The ```Modulino``` library is not available by default on MicroPython devices hence installation is needed. - -To simplify the process the [MicroPython Package Installer](https://github.com/arduino/lab-micropython-package-installer/releases) is recommended as it will provide a graphical interface to guide installation. -After installation, you should now be able to: - -1. Open the tool. -2. Plug in your board to the computer. - - ![USB Connection](assets/mp-usb-connection.png) - - If the board does not appear in the Detected Boards section, click Reload. If the board is still undetected, ensure no other programs (e.g., a code editor) are using the board's COM port. - -3. Search for the ```Modulino``` package by filling in the text box on the search feature. -4. Click Install and wait for the installation confirmation. -5. Disconnect the board from the tool before returning to your code editor to avoid conflicts due to a busy COM port. - -![Package Installer Overview](assets/package-installer-overview.png) - -The module should now be includable in your program using: - -```from modulino import ModulinoThermo``` - -### Get Acceleration and Gyroscope Data - -Getting motion data from the **Modulino Movement** module is simple using the `Modulino` library. The module provides two crucial functions for motion sensing: - -- `.accelerometer` - Retrieves the acceleration values (x, y, z). -- `.gyro` - Retrieves the angular velocity (x, y, z) in **dps**. -- By default the Modulino library uses ```Wire1``` if your board model has a different pinout for the dedicated I²C pins you might have to edit it as instructed [here](https://github.com/arduino/arduino-modulino-mpy/tree/main/docs#%E2%84%B9%EF%B8%8F-using-3rd-party-boards). More information on **Wire** can be found [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/). - - -Here’s an example demonstrating how to acquire motion data: - -```python -from modulino import ModulinoMovement -from time import sleep_ms - -movement = ModulinoMovement() - -while True: - acc = movement.accelerometer - gyro = movement.gyro - - print(f"🏃 Accelerometer: x:{acc.x:>8.3f} y:{acc.y:>8.3f} z:{acc.z:>8.3f} g") - print(f"🌐 Gyroscope: x:{gyro.x:>8.3f} y:{gyro.y:>8.3f} z:{gyro.z:>8.3f} dps") - print("") - sleep_ms(100) -``` - -The code example provided shows how to initialize the sensor, read the acceleration data, and display it on the console. - -The data is continuously updated, showing the current acceleration values in real time. -It can be easily adapted to trigger actions at certain movement thresholds or to detect specific motion patterns in your projects. - -## Troubleshooting - -### Sensor Not Reachable - -If your Modulino's power LED isn't on or the sensor isn't responsive, first check that the board is properly connected: - -- Ensure both the board and the Modulino are connected to your computer, and that the power LEDs on both are lit. -- If the issue persists, make sure the Qwiic cable is properly clicked into place. - -### Library Not Installed Properly - -If you encounter an issue with the `import ModulinoMovement` command, verify that the Modulino library is correctly installed: - -- Check your Library installer to ensure the library is installed and up-to-date. -- Re-install the library through the Library Manager. - -### Inaccurate Values - -If the sensor values are not accurate, make sure: - -- The sensor is not placed on an unstable surface that might cause unwanted vibrations. -- All exposed electronics are not touching any conductive surfaces, as this could interfere with readings. -- The board is mounted securely when measuring precise movements. - -## Conclusion - -The **Modulino Movement** is a digital 6-axis IMU sensor that communicates over I²C and follows the Modulino form factor. It includes standard Qwiic connectors for quick, solderless connections and easy daisy-chaining with other modules. Paired with the Modulino library, it makes accessing motion data straightforward, allowing you to focus on experimenting or building your system logic. It's a small, reliable module suited for both quick tests and longer-term setups. - -## What Is Next? - -Now that you've learned how to use your Modulino Movement, you're all set to integrate it into your projects! - -- Use the movement data to detect different patterns and use these as inputs for your projects. -- Create a motion-activated alarm that triggers when unexpected movement is detected. -- Build a balance game that challenges players to keep the sensor level within certain parameters. -- Make a pedometer that counts steps based on the characteristic motion patterns of walking. \ No newline at end of file diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/IDE-Left-Tab.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/IDE-Left-Tab.png deleted file mode 100644 index c7bb86575e..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/IDE-Left-Tab.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/Modulino_Pixels_Power_Tree.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/Modulino_Pixels_Power_Tree.png deleted file mode 100644 index 1360acf9f8..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/Modulino_Pixels_Power_Tree.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/addressChangeIDE.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/addressChangeIDE.png deleted file mode 100644 index d5cd3fd195..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/addressChangeIDE.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/adressChanger.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/adressChanger.png deleted file mode 100644 index c6eae670c8..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/adressChanger.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/connection-guide-pixels-jumper.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/connection-guide-pixels-jumper.png deleted file mode 100644 index cdce255db8..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/connection-guide-pixels-jumper.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/connection-guide-pixels-qwiic-chain.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/connection-guide-pixels-qwiic-chain.png deleted file mode 100644 index 5899d68721..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/connection-guide-pixels-qwiic-chain.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/connection-guide-pixels-qwiik.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/connection-guide-pixels-qwiik.png deleted file mode 100644 index 3b09f3b752..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/connection-guide-pixels-qwiik.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/connection-guide-pixels.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/connection-guide-pixels.png deleted file mode 100644 index 229410a0c3..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/connection-guide-pixels.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/library-install.gif b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/library-install.gif deleted file mode 100644 index 16f396c353..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/library-install.gif and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/pixel-expantion-mc.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/pixel-expantion-mc.png deleted file mode 100644 index ef177015f8..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/pixel-expantion-mc.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/schematic.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/schematic.png deleted file mode 100644 index 8f5504efee..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/schematic.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/content.md b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/content.md deleted file mode 100644 index 5850c78318..0000000000 --- a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/content.md +++ /dev/null @@ -1,276 +0,0 @@ ---- -title: "How To Use The Modulino Pixels" -description: "Learn how to get the most out of your Modulino Pixels." -tags: - - Modulino - - QWIIC - - I2C -author: 'Pedro Sousa Lima' -hardware: - - hardware/11.modulinos/modulinos/modulino-pixels -software: - - ide-v2 - - web-editor ---- - -The Modulino Pixels is a modular sensor that generates RGB light effects, making it perfect to add colorful visual feedback to your projects! -The Modulino form factor is shaped with two QWIIC connectors and the I²C protocol integration, allowing the connection and programming of multiple Modulino nodes in a very simple way. In addition to the QWIIC's connectors, the Modulino nodes also expose solderable pins that can be used in multiple ways and make them compatible with boards that are not QWIIC compatible. - - -## Hardware Specifications - -The Modulino Pixels based on 8 LC8822-2020 addressable LEDs is capable of generating colorful light patterns and effects. Take a look at the following table to know more about its characteristics: - -| Parameter | Condition | Minimum | Typical | Maximum | Unit | -|------------------|-------------------|---------|---------|---------|------| -| Supply Voltage | - | 2.0 | 3.3 | 3.6 | V | -| Resolution (ADC) | Default | - | 12-bit | - | mcd | -| Communication | I²C,USART,SPI | - | I²C | - | - | - -## Pinout - -The LC8822-2020 addressable LEDs are the core components of this module. These RGB light output devices are controlled by an onboard STM32C011F4U6TR microcontroller, which supports digital communication (I²C), meaning it connects directly to the I²C bus on the module without requiring additional conversion circuitry. - -![Modulino Pixels Pinout](assets/PixelsPinouts.png) - -### 1x10 Header (LC8822-2020 and Microcontroller Signals) - -| Pin | Function | -|--------|-----------------| -| GND | Ground | -| GND | Ground | -| 3V3 | 3.3V Power | -| RESET | Reset | -| SWCLK | SWD Clock | -| SWDIO | SWD Data | -| TX1 | USART Transmit | -| RX1 | USART Receive | -| D0 | Pixels Data Out | -| C0 | Pixels Clock Out| - -- **GND: Ground**: Provides ground reference for the circuit. Multiple ground pins ensure stable power distribution. -- **3V3: 3.3V Power**: Supplies 3.3V power to connected components and modules. -- **RESET: Reset**: Used to reset the microcontroller or connected system. -- **SWCLK and SWDIO: SWD Interface**: Used for debugging, programming, and reprogramming the microcontroller via Serial Wire Debug protocol. -- **TX1 and RX1: USART Communication**: Enable serial communication for data transmission and reception with other devices or modules. -- **D0: Pixels Data Out**: Sends pixel data to addressable LED strips in a daisy chain configuration for lighting control. -- **C0: Pixels Clock Out**: Provides clock signal synchronization for addressable LED strips, ensuring proper timing for pixel data. - -### 1x4 Header (I2C) - -The pinout for the Modulino Pixels is shown below. While the recommended connection method is via the QWIIC connectors, this solderable header provides a connection option when using the modulino with a non-QWIIC compatible board. - -| Pin | Function | -|-------|--------------| -| GND | Ground | -| 3.3 V | Power Supply | -| SDA | I²C Data | -| SCL | I²C Clock | - -## I2C Address - -The **Modulino Pixels** module uses **LC8822-2020** addressable LEDs, which do not have native I²C capabilities. Instead, the LED array is controlled by the Modulino's onboard microcontroller (STM32C011F4U6TR). This microcontroller provides I²C communication, allowing for flexible control of the LEDs. - -One unique feature of this setup is the ability to change the I²C address via software. This means the address can be modified based on your application needs, making it adaptable to different system configurations. The default I²C address for the **Modulino Pixels** module is: - -| Modulino I²C Address | Hardware I²C Address | Editable Addresses (HEX) | -|----------------------|----------------------|-----------------------------------| -| 0x6C | 0x36 | Any custom address (via software) | - -When scanning for I²C address on the bus, you might find the modulino using the **Hardware I²C Address**. However, you should always use the **Modulino I²C Address** when using the official Modulino library. - -Later in this article we teach how to [change the address](#how-to-change-i2c-address). - -## Power Specifications - -The board is typically powered by +3.3 VDC when using the QWIIC interface as per the I²C standard. - -| Parameter | Condition | Typical | Maximum | Unit | -|------------------------|----------------|---------|---------|------| -| Operating Voltage | - | 3.3 | - | V | -| Power Dissipation | - | - | 350 | mW | -| Standby Current | No data signal | - | 1 | mA | -| Max LED Output Current | Per Channel | 18 | - | mA | - - -The module additionally includes a power LED that draws 1 mA and turns on as soon as it is powered. - -J1 (Qwiic connector), J2 (Qwiic connector), and the headers all share the same power branch. The power distribution of the module is therefore as follows: - -![Power Tree Modulino Pixels](assets/Modulino_Pixels_Power_Tree.png) - -## Schematic - -The Modulino Pixels uses a simple circuit, as shown in the schematic below: - -![Full Schematic Modulino Pixels](assets/schematic.png) - -The main components are the **8 LC8822-2020 addressable LEDs** and the **STM32C011F4U6TR** microcontroller (U1), which handles LED control as well as I²C communication. - -You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, this is the recommended method) or the **solderable pins** (J4). The board runs on **3.3V**, which comes from the QWIIC cable or the **3V3 pin** on J4. - -The **LC8822-2020** LEDs are connected in a daisy chain, with the first LED receiving clock and data signals from the microcontroller. The **CO (Clock Out)** and **DO (Data Out)** of the last LED in the chain are accessible via the **1x10 header**, allowing for expansion. ![LED Expantion](assets/expansion-guide-pixels.png) - -These can also be found in small pads near the STM32 microcontroller alongside a few user defines pads that can be used by editing the firmware: - -![Exposed user-defined and LED expansion pads](assets/pixel-expantion-mc.png) - -There's also a small power LED indicator that lights up when the board is on. - -You can grab the full schematic and PCB files from the [Modulino Pixels](https://docs.arduino.cc/hardware/modulinos/modulino-pixels) product page. - -## How To Connect Your Modulino - -The easiest and most reliable way to connect your Modulino is through the QWIIC Connect System. It’s plug-and-play, uses standard I²C, and makes it easy to join multiple modules. If your board supports QWIIC, this is the recommended way to go. -Note that the dedicated I²C pins will differ from board to board meaning it is always a good idea to check your specific model. - - -![Modulino Wiring Options QWIIC(A - recommended) and Header(B)](assets/connection-guide-pixels.png) - -### QWIIC Connector - -Whenever available, the **QWIIC Connect System** is the preferred method. Connecting to the Modulino is extremely simple, just use a standard QWIIC cable to connect your board to either of the QWIIC connectors on the Modulino. Because the cable and connectors are polarized, there is no need to worry about accidentally swapping connections. - -QWIIC is a plug-and-play I²C Connect System that uses standardized 4-pin connectors: - -- GND -- 3.3V -- SDA (Data) -- SCL (Clock) - -![Connection Guide QWIIC](assets/connection-guide-pixels-qwiik.png) - -The Modulino features two QWIIC connectors, which are internally connected in parallel. This means you can daisy-chain multiple modules easily by connecting additional QWIIC cables between them. - -### Solderable Header - -When QWIIC is not available, you can use the exposed solderable pins on the module. You can solder pins to the unpopulated pads; just remember the pinout provided in this guide to connect to the right pins of your board. - -![Connection Guide Solder Pads](assets/connection-guide-pixels-jumper.png) - -## Daisy-Chaining Multiple Modulino Nodes - -Regardless of whether you connect the first Modulino via QWIIC or through the solderable pins, you can still take advantage of the extra QWIIC connector to daisy-chain additional modules. - -Each Modulino includes two QWIIC connectors wired in parallel, allowing you to connect one module to the next in a chain. As long as each module is configured with a unique I²C address, they can all communicate on the same bus. - -This approach keeps your setup clean, modular, and expandable without adding extra wiring complexity. - -![Modulino Wiring Options](assets/connection-guide-pixels-qwiic-chain.png) - -***The number of modules you can connect will depend on what modules you are chaining together, as this system allows for multiple sensors from different manufacturers to be added. Also, the cables you use for these connections will play a significant role in the setup’s performance. Ensure your cables are properly connected and capable of handling the required data transfer. -Each module should have a unique address on a chain if you plan to address them individually. Later in this article we teach how to [change the address](#how-to-change-i2c-address). Multiple modules with the same address will cause conflicts on the I²C bus and will not allow you to address them individually.*** - -## How To Use Your Modulino - -### Installing The Modulino Library - -You need the official Modulino library available [here](https://github.com/arduino-libraries/Modulino) to use the Modulino Thermo. - -With the Arduino IDE you get some tools that make adding a library easier. To learn how to install the IDE please visit our [page](https://docs.arduino.cc/software/ide-v2/tutorials/getting-started/ide-v2-downloading-and-installing/). - -After opening the IDE, a tab should be visible on the left. Press the book icon for "library" as highlighted in the image. - -![IDE Library Tab](assets/IDE-Left-Tab.png) - -The process should look like this: - -![Library Install](assets/library-install.gif) - -A message will appear after the installation is successful. - -### Set LED Colors - -Controlling RGB LEDs using the **Modulino Pixels** module is straightforward with the `Modulino` library. - -For the **Pixels**, there are two important functions: - -- `set(index, color, brightness)`: Sets a specific LED to a chosen color and brightness level. (`RED`,`BLUE`,`GREEN`,`VIOLET`,`WHITE`) -- `show()`: Applies the changes to the LEDs. -- ```Modulino.begin();```: By default the Modulino library uses ```Wire1``` if your connection is in a different Wire you will have to edit it, check [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/) (by default the Modulino library uses ```Wire1``` if your board model has a different pinout for the dedicated I²C pins you might have to edit it. More information on **Wire** can be found [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/)) for the library's hardware compatibility. More information on **Wire** can be found [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/). - -Here is an example of how to implement these functions to control the LEDs: - -```arduino -#include - -ModulinoPixels leds; - -int brightness = 25; - -void setup(){ - Modulino.begin(); - leds.begin(); -} - -void loop(){ - // Set all LEDs to blue - for (int i = 0; i < 8; i++) { - leds.set(i, BLUE, brightness); - leds.show(); - } -} -``` - -The code example provided demonstrates how to initialize the LED module and set all 8 LEDs to blue with a brightness level of 25%. The for-loop cycles through each LED (indexed 0-7), sets its color and brightness, and then uses the show() function to apply the change. This creates a simple blue light display that can be easily modified to create more complex lighting patterns or visual indicators for your projects. - -### How To Change I²C Address - -An example sketch, AddressChanger, is also included with the library inside the `Utilities` folder and available [here](https://github.com/arduino-libraries/Modulino/blob/main/examples/Utilities/AddressChanger/AddressChanger.ino). This sketch changes the I²C address at a software level on the Module's microcontroller. - -![Example location on the IDE](assets/addressChangeIDE.png) - -- Connect the module to your board, remove any other modules that might be in the chain. Connection must be via I²C. -- Upload the sketch. -- Open the Serial Monitor. -- Text should now appear. Make sure the correct bauld-rate is selected if the displayed characters seem corrupted. - - ![Expected console output](assets/adressChanger.png) - -- Select the address and confirm. -- Your address should now have changed. Make sure to take note of the selected address. - -To keep track of the address in use the module has a white rectangle on the back. Feel free to use this to write the address that was chosen. - -When using a custom address in your sketch, you'll need to specify this address when creating the module object. For example: - -```arduino -ModulinoPixels pixels(0x3E); // Replace 0x3E with your specific address -``` - -## Troubleshooting - -### LEDs Not Lighting - -If your Modulino's power LED isn't on or the RGB LEDs aren't responsive, first check that the board is properly connected: - -- Ensure both the board and the Modulino are connected to your computer, and that the power LEDs on both are lit. -- If the issue persists, make sure the Qwiic cable is properly clicked into place. - -### Library Not Installed Properly - -If you encounter an issue with the `#include "modulino.h"` command, verify that the Modulino library is correctly installed: - -- Check your IDE to ensure the library is installed and up-to-date. -- Re-install the library through the Library Manager. - -### Incorrect Colors or Flickering - -If the LED colors are incorrect or the LEDs are flickering unexpectedly, make sure: - -- The brightness values are within the appropriate range (typically 0-255). -- All exposed electronics are not touching any conductive surfaces, as this could interfere with the LED output. -- The power supply is stable and providing sufficient current for all LEDs at the desired brightness. - -## Conclusion - -The **Modulino Pixels** is a digital RGB LED control module that communicates over I²C and follows the Modulino form factor. It includes standard Qwiic connectors for quick, solderless connections and easy daisy-chaining with other modules. Paired with the Modulino library, it makes generating colorful light effects straightforward, allowing you to focus on experimenting or building your system logic. It's a small, reliable module suited for both visual feedback and creative lighting projects. - -## What Is Next? - -Now that you've learned how to use your Modulino Pixels, you're all set to integrate it into your projects! - -- Create an animated progress bar that visually displays status, or battery charge level using a gradient of colors. -- Build a live sound level indicator that responds to ambient noise. -- Design a pomodoro timer with color coded work and rest periods to boost your productivity. -- Program an interactive game where players must match patterns of colors in the correct sequence, with difficulty increasing as they progress. diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/image.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/image.png deleted file mode 100644 index bceefec75d..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/image.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/Modulino_Pixels_Power_Tree.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/Modulino_Pixels_Power_Tree.png deleted file mode 100644 index 1360acf9f8..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/Modulino_Pixels_Power_Tree.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/PixelsPinouts.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/PixelsPinouts.png deleted file mode 100644 index 753e749422..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/PixelsPinouts.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/connection-guide-pixels-jumper.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/connection-guide-pixels-jumper.png deleted file mode 100644 index 6796fa2911..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/connection-guide-pixels-jumper.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/connection-guide-pixels-qwiic-chain.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/connection-guide-pixels-qwiic-chain.png deleted file mode 100644 index 5899d68721..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/connection-guide-pixels-qwiic-chain.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/connection-guide-pixels-qwiik.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/connection-guide-pixels-qwiik.png deleted file mode 100644 index 621425659d..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/connection-guide-pixels-qwiik.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/connection-guide-pixels.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/connection-guide-pixels.png deleted file mode 100644 index 229410a0c3..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/connection-guide-pixels.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/expansion-guide-pixels.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/expansion-guide-pixels.png deleted file mode 100644 index 427dc10d40..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/expansion-guide-pixels.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/mp-usb-connection.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/mp-usb-connection.png deleted file mode 100644 index fb059f9e8b..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/mp-usb-connection.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/package-installer-overview.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/package-installer-overview.png deleted file mode 100644 index 67678dc808..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/package-installer-overview.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/pixel-expantion-mc.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/pixel-expantion-mc.png deleted file mode 100644 index ef177015f8..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/pixel-expantion-mc.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/schematic.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/schematic.png deleted file mode 100644 index 8f5504efee..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/assets/schematic.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/content.md b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/content.md deleted file mode 100644 index 2ea4fc2ee4..0000000000 --- a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/content.md +++ /dev/null @@ -1,332 +0,0 @@ ---- -title: "How To Use The Modulino Pixels And MicroPython" -description: "Learn how to get the most out of your Modulino Pixels in a MicroPython environment." -tags: - - Modulino - - QWIIC - - I2C -author: 'Pedro Sousa Lima' -hardware: - - hardware/11.modulinos/modulinos/modulino-pixels -software: - - ide-v2 - - web-editor ---- - -The Modulino Pixels is a modular sensor that generates RGB light effects, making it perfect to add colorful visual feedback to your projects! -The Modulino form factor is shaped with two QWIIC connectors and the I²C protocol integration, allowing the connection and programming of multiple Modulino nodes in a very simple way. In addition to the QWIIC's connectors, the Modulino nodes also expose solderable pins that can be used in multiple ways and make them compatible with boards that are not QWIIC compatible. - -## Hardware Specifications - -The Modulino Pixels based on 8 LC8822-2020 addressable LEDs is capable of generating colorful light patterns and effects. Take a look at the following table to know more about its characteristics: - -| Parameter | Condition | Minimum | Typical | Maximum | Unit | -|------------------|-------------------|---------|---------|---------|------| -| Supply Voltage | - | 2.0 | 3.3 | 3.6 | V | -| Resolution (ADC) | Default | - | 12-bit | - | mcd | -| Communication | I²C,USART,SPI | - | I²C | - | - | - -## Pinout - -The LC8822-2020 addressable LEDs are the core components of this module. These RGB light output devices are controlled by an onboard STM32C011F4U6TR microcontroller, which supports digital communication (I²C), meaning it connects directly to the I²C bus on the module without requiring additional conversion circuitry. - -![Modulino Pixels Pinout](assets/PixelsPinouts.png) - -### 1x10 Header (LC8822-2020 and Microcontroller Signals) - -| Pin | Function | -|--------|-----------------| -| GND | Ground | -| GND | Ground | -| 3V3 | 3.3V Power | -| RESET | Reset | -| SWCLK | SWD Clock | -| SWDIO | SWD Data | -| TX1 | USART Transmit | -| RX1 | USART Receive | -| D0 | Pixels Data Out | -| C0 | Pixels Clock Out| - -- **GND: Ground**: Provides ground reference for the circuit. Multiple ground pins ensure stable power distribution. -- **3V3: 3.3V Power**: Supplies 3.3V power to connected components and modules. -- **RESET: Reset**: Used to reset the microcontroller or connected system. -- **SWCLK and SWDIO: SWD Interface**: Used for debugging, programming, and reprogramming the microcontroller via Serial Wire Debug protocol. -- **TX1 and RX1: USART Communication**: Enable serial communication for data transmission and reception with other devices or modules. -- **D0: Pixels Data Out**: Sends pixel data to addressable LED strips in a daisy chain configuration for lighting control. -- **C0: Pixels Clock Out**: Provides clock signal synchronization for addressable LED strips, ensuring proper timing for pixel data. - -### 1x4 Header (I2C) - -The pinout for the Modulino Pixels is shown below. While the recommended connection method is via the QWIIC connectors, this solderable header provides a connection option when using the modulino with a non-QWIIC compatible board. - -| Pin | Function | -|-------|--------------| -| GND | Ground | -| 3.3 V | Power Supply | -| SDA | I²C Data | -| SCL | I²C Clock | - -## I2C Address - -The **Modulino Pixels** module uses **LC8822-2020** addressable LEDs, which do not have native I²C capabilities. Instead, the LED array is controlled by the Modulino's onboard microcontroller (STM32C011F4U6TR). This microcontroller provides I²C communication, allowing for flexible control of the LEDs. - -One unique feature of this setup is the ability to change the I²C address via software. This means the address can be modified based on your application needs, making it adaptable to different system configurations. The default I²C address for the **Modulino Pixels** module is: - -| Modulino I²C Address | Hardware I²C Address | Editable Addresses (HEX) | -|----------------------|----------------------|-----------------------------------| -| 0x6C | 0x36 | Any custom address (via software) | - -When scanning for I²C address on the bus, you might find the modulino using the **Hardware I²C Address**. However, you should always use the **Modulino I²C Address** when using the official Modulino library. - -Later in this article we teach how to [change the address](#how-to-change-i2c-address). - -## Power Specifications - -The board is typically powered by +3.3 VDC when using the QWIIC interface as per the I²C standard. - -| Parameter | Condition | Typical | Maximum | Unit | -|------------------------|----------------|---------|---------|------| -| Operating Voltage | - | 3.3 | - | V | -| Power Dissipation | - | - | 350 | mW | -| Standby Current | No data signal | - | 1 | mA | -| Max LED Output Current | Per Channel | 18 | - | mA | - -The module additionally includes a power LED that draws 1 mA and turns on as soon as it is powered. - -J1 (Qwiic connector), J2 (Qwiic connector), and the headers all share the same power branch. The power distribution of the module is therefore as follows: - -![Power Tree Modulino Pixels](assets/Modulino_Pixels_Power_Tree.png) - -## Schematic - -The Modulino Pixels uses a simple circuit, as shown in the schematic below: - -![Full Schematic Modulino Pixels](assets/schematic.png) - -The main components are the **8 LC8822-2020 addressable LEDs** and the **STM32C011F4U6TR** microcontroller (U1), which handles LED control as well as I²C communication. - -You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, this is the recommended method) or the **solderable pins** (J4). The board runs on **3.3V**, which comes from the QWIIC cable or the **3V3 pin** on J4. - -The **LC8822-2020** LEDs are connected in a daisy chain, with the first LED receiving clock and data signals from the microcontroller. The **CO (Clock Out)** and **DO (Data Out)** of the last LED in the chain are accessible via the **1x10 header**, allowing for expansion. - -![LED Expantion](assets/expansion-guide-pixels.png) - -These can also be found in small pads near the STM32 microcontroller alongside a few user defines pads that can be used by editing the firmware: - -![Exposed user-defined and LED expansion pads](assets/pixel-expantion-mc.png) - -There's also a small power LED indicator that lights up when the board is on. - -You can grab the full schematic and PCB files from the [Modulino Pixels](https://docs.arduino.cc/hardware/modulinos/modulino-pixels) product page. - -## How To Connect Your Modulino - -The easiest and most reliable way to connect your Modulino is through the QWIIC Connect System. It’s plug-and-play, uses standard I²C, and makes it easy to join multiple modules. If your board supports QWIIC, this is the recommended way to go. - -Note that the dedicated I²C pins will differ from board to board meaning it is always a good idea to check your specific model. - - -![Modulino Wiring Options QWIIC(A - recommended) and Header(B)](assets/connection-guide-pixels.png) - -### QWIIC Connector - -Whenever available, the **QWIIC Connect System** is the preferred method. Connecting to the Modulino is extremely simple, just use a standard QWIIC cable to connect your board to either of the QWIIC connectors on the Modulino. Because the cable and connectors are polarized, there is no need to worry about accidentally swapping connections. - -QWIIC is a plug-and-play I²C Connect System that uses standardized 4-pin connectors: - -- GND -- 3.3V -- SDA (Data) -- SCL (Clock) - -![Connection Guide QWIIC](assets/connection-guide-pixels-qwiik.png) - -The Modulino features two QWIIC connectors, which are internally connected in parallel. This means you can daisy-chain multiple modules easily by connecting additional QWIIC cables between them. - -### Solderable Header - -When QWIIC is not available, you can use the exposed solderable pins on the module. You can solder pins to the unpopulated pads; just remember the pinout provided in this guide to connect to the right pins of your board. - -![Connection Guide Solder Pads](assets/connection-guide-pixels-jumper.png) - -## Daisy-Chaining Multiple Modulino Nodes - - -Regardless of whether you connect the first Modulino via QWIIC or through the solderable pins, you can still take advantage of the extra QWIIC connector to daisy-chain additional modules. - -Each Modulino includes two QWIIC connectors wired in parallel, allowing you to connect one module to the next in a chain. As long as each module is configured with a unique I²C address, they can all communicate on the same bus. - -This approach keeps your setup clean, modular, and expandable without adding extra wiring complexity. - -![Modulino Wiring Options](assets/connection-guide-pixels-qwiic-chain.png) - -***The number of modules you can connect will depend on what modules you are chaining together, as this system allows for multiple sensors from different manufacturers to be added. Also, the cables you use for these connections will play a significant role in the setup’s performance. Ensure your cables are properly connected and capable of handling the required data transfer. -Each module should have a unique address on a chain if you plan to address them individually. Later in this article we teach how to [change the address](#how-to-change-i2c-address). Multiple modules with the same address will cause conflicts on the I²C bus and will not allow you to address them individually.*** - -Later in this article we teach how to [change the address](#how-to-change-i2c-address). - -## How To Program Your Modulino - -### Installing The Modulino Library - -To program your Modulino it is recommended you use the official ```Modulino``` micropython library available [here](https://github.com/arduino/arduino-modulino-mpy). The library is fully compatible with the no **Arduino Lab for MicroPython**. - -For information on installing the **Arduino Lab for MicroPython** please visit our [page](https://docs.arduino.cc/micropython/first-steps/install-guide/). - - - -The ```Modulino``` library is not available by default on MicroPython devices hence installation is needed. - -To simplify the process the [MicroPython Package Installer](https://github.com/arduino/lab-micropython-package-installer/releases) is recommended as it will provide a graphical interface to guide installation. - -After installation, you should now be able to: - -1. Open the tool. -2. Plug in your board to the computer. - - ![USB Connection](assets/mp-usb-connection.png) - - If the board does not appear in the Detected Boards section, click Reload. If the board is still undetected, ensure no other programs (e.g., a code editor) are using the board's COM port. - -3. Search for the ```Modulino``` package by filling in the text box on the search feature. -4. Click Install and wait for the installation confirmation. -5. Disconnect the board from the tool before returning to your code editor to avoid conflicts due to a busy COM port. - -![Package Installer Overview](assets/package-installer-overview.png) - -The module should now be includable in your program using: - -```from modulino import ModulinoBuzzer``` - -### Control RGB LEDs with MicroPython - -Getting LED data from the **Modulino Pixels** module is simple using the `Modulino` library. The crucial functions to control the LEDs are: - -- `set_rgb(index, r, g, b, brightness)`: Sets a specific LED to an RGB color with the specified brightness. -- `set_all_rgb(r, g, b, brightness)`: Sets all LEDs to an RGB color with the specified brightness. -- `set_all_color(color, brightness)`: Sets all LEDs to a predefined color. (`RED`,`BLUE`,`GREEN`,`VIOLET`,`WHITE`) -- `clear_all()`: Turns off all LEDs. -- `show()`: Sends the updated data to the LEDs. -- By default the Modulino library uses ```Wire1``` if your board model has a different pinout for the dedicated I²C pins you might have to edit it as instructed [here](https://github.com/arduino/arduino-modulino-mpy/tree/main/docs#%E2%84%B9%EF%B8%8F-using-3rd-party-boards). More information on **Wire** can be found [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/). - -Here’s an example demonstrating how to set colors and create a **Knight Rider animation**: - -```python -from modulino import ModulinoPixels, ModulinoColor -from time import sleep - -pixels = ModulinoPixels() - -# Set each LED to a different color from a color wheel -for index in range(0, 8): - color_wheel_colors = [ - (255, 0, 0), - (255, 85, 0), - (255, 255, 0), - (0, 255, 0), - (0, 255, 255), - (0, 0, 255), - (255, 0, 255), - (255, 0, 0) - ] - pixels.set_rgb(index, *color_wheel_colors[index], 100) -pixels.show() -sleep(1) - -# Set all LEDs to solid colors -pixels.set_all_rgb(255, 0, 0, 100) # Red -pixels.show() -sleep(1) - -pixels.set_all_color(ModulinoColor.GREEN, 100) -pixels.show() -sleep(1) - -pixels.set_all_color(ModulinoColor.BLUE, 100) -pixels.show() -sleep(1) - -# Knight Rider animation -def set_glowing_led(index, r, g, b, brightness): - """ - Set the color of the LED at the given index with its - neighboring LEDs slightly dimmed to create a glowing effect. - """ - pixels.clear_all() - pixels.set_rgb(index, r, g, b, brightness) - - if index > 0: - pixels.set_rgb(index - 1, r, g, b, brightness // 8) # Left LED - if index < 7: - pixels.set_rgb(index + 1, r, g, b, brightness // 8) # Right LED - - pixels.show() - -for j in range(3): - for i in range(8): - set_glowing_led(i, 255, 0, 0, 100) - sleep(0.05) - - for i in range(7, -1, -1): - set_glowing_led(i, 255, 0, 0, 100) - sleep(0.05) - -# Turn off all LEDs -pixels.clear_all().show() -``` - -This example shows different ways to control the Pixels. It starts by creating a rainbow pattern using different colors for each LED. Next, it demonstrates setting all LEDs to the same color, using both RGB values and predefined color constants. The final section implements a Knight Rider animation by lighting one main LED at full brightness while slightly illuminating adjacent LEDs at reduced brightness. The `set_glowing_led()` function handles this effect by managing the primary LED and its neighbors, creating a back-and-forth scanning pattern that repeats three times before turning off all LEDs. - -### How To Change Address - -A sketch is also available included with the library named `AddressChanger` and also available [here](https://github.com/arduino/arduino-modulino-mpy/blob/main/examples/change_address.py). This sketch changes the I2C address at a software level on the Module's microcontroller. - -- Connect the module to your board via I2C, ensuring no other modules are in the chain. -- Run the script in a MicroPython environment. -- Follow the on-screen instructions (REPL) to select the device and enter a new address. Valid I²C addresses range from 0x08 to 0x77 (7-bit values in hexadecimal format, e.g., 0x42). -- The script will attempt to change the address and confirm success. - -To keep track of the address in use, the module has a white rectangle on the back. Feel free to use this to write the address that was chosen. - -When using a custom address in your MicroPython sketch, you'll need to specify this address when creating the module object. For example: - -```python -pixels_module = ModulinoPixels(address=0x45) # Replace 0x45 with your specific address -``` - -## Troubleshooting - -### LEDs Not Lighting - -If your Modulino's power LED isn't on or the RGB LEDs aren't responsive, first check that the board is properly connected: - -- Ensure both the board and the Modulino are connected to your computer, and that the power LEDs on both are lit. -- If the issue persists, make sure the Qwiic cable is properly clicked into place. - -### Library Not Installed Properly - -If you encounter an issue with the `import ModulinoPixels"` command, verify that the Modulino library is correctly installed: - -- Check your IDE to ensure the library is installed and up-to-date. -- Re-install the library through the Library Manager. - -### Incorrect Colors or Flickering - -If the LED colors are incorrect or the LEDs are flickering unexpectedly, make sure: - -- The brightness values are within the appropriate range (typically 0-255). -- All exposed electronics are not touching any conductive surfaces, as this could interfere with the LED output. -- The power supply is stable and providing sufficient current for all LEDs at the desired brightness. - -## Conclusion - -The **Modulino Pixels** is a digital RGB LED control module that communicates over I²C and follows the Modulino form factor. It includes standard Qwiic connectors for quick, solderless connections and easy daisy-chaining with other modules. Paired with the Modulino library, it makes generating colorful light effects straightforward, allowing you to focus on experimenting or building your system logic. It's a small, reliable module suited for both visual feedback and creative lighting projects. - -## What Is Next? - -Now that you've learned how to use your Modulino Pixels, you're all set to integrate it into your projects! - -- Create an animated progress bar that visually displays status, or battery charge level using a gradient of colors. -- Build a live sound level indicator that responds to ambient noise. -- Design a pomodoro timer with color coded work and rest periods to boost your productivity. -- Program an interactive game where players must match patterns of colors in the correct sequence, with difficulty increasing as they progress. diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/image.png b/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/image.png deleted file mode 100644 index bceefec75d..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-mp/image.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/IDE-Left-Tab.png b/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/IDE-Left-Tab.png deleted file mode 100644 index c7bb86575e..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/IDE-Left-Tab.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/Modulino_Thermo_Power_Tree.png b/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/Modulino_Thermo_Power_Tree.png deleted file mode 100644 index 75ecb8a8e7..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/Modulino_Thermo_Power_Tree.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/connection-guide-thermo-jumper.png b/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/connection-guide-thermo-jumper.png deleted file mode 100644 index 0742e36a31..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/connection-guide-thermo-jumper.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/connection-guide-thermo-qwiik.png b/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/connection-guide-thermo-qwiik.png deleted file mode 100644 index e10a27ebdb..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/connection-guide-thermo-qwiik.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/connection-guide-thermo.png b/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/connection-guide-thermo.png deleted file mode 100644 index 35591967a9..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/connection-guide-thermo.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/library-install.gif b/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/library-install.gif deleted file mode 100644 index 16f396c353..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/library-install.gif and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/schematic.png b/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/schematic.png deleted file mode 100644 index b094fac53d..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/schematic.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/content.md b/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/content.md deleted file mode 100644 index f54ced5150..0000000000 --- a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/content.md +++ /dev/null @@ -1,231 +0,0 @@ ---- -title: "How To Use The Modulino Thermo" -description: "Learn how to get the most out of your Modulino Thermo." -tags: - - Modulino - - QWIIC - - I2C -author: 'Pedro Sousa Lima' -hardware: - - hardware/11.modulinos/modulinos/modulino-thermo -software: - - ide-v2 - - web-editor ---- - -The Modulino Thermo is a modular sensor that measures temperature and humidity, making it perfect to add environmental monitoring to your projects! -The Modulino form factor is shaped with two QWIIC connectors and the I²C protocol integration, allowing the connection and programming of multiple Modulino nodes in a very simple way. In addition to the QWIIC's connectors, the Modulino nodes also expose solderable pins that can be used in multiple ways and make them compatible with boards that are not QWIIC compatible. - -## General Characteristics - -The Modulino Thermo is capable of measuring temperature and relative humidity. Take a look at the following table to know more about its measuring ranges: - - -| Parameter | Condition | Minimum | Typical | Maximum | Unit | -|-----------|-------------|---------|---------|---------|------| -| Range | Temperature | \-40 | \- | +125 | °C | -| \- | Humidity | 0 | \- | 100% | φ RH | -| Accuracy | Temperature | \- | ±0,25 | \- | °C | -| \- | Humidity | \- | ±2.8% | \- | φ | - -### Sensor Details - -The HS3003 sensor from Renesas is the core component of this module. This temperature and humidity sensor natively supports digital communication (I²C), meaning it connects directly to the I²C bus on the module without requiring additional conversion circuitry. - -The default address for the Module is: - -| Modulino I²C Address | Hardware I²C Address | -|----------------------|----------------------| -| 0x44 | 0x44 | - -***Note: Since the address cannot be changed on this Modulino specifically, using two or more identical modules on the same I²C bus will result in address conflicts and cause communication issues.*** - -## Pinout - -The pinout for the Modulino Thermo is shown below. Please note that the exposed solderable pins are directly connected to the QWIIC connectors using the same I²C interface. - -![Arduino Thermo Pinout](assets/ThermoPinouts.jpg) - -Depending on the board connected to the modulino, the I²C pin names to program it may differ. Please check the [board tutorials](https://docs.arduino.cc/hardware/) on your modulino's compatible board or the [Modulino library](https://github.com/arduino-libraries/Modulino/tree/main/docs) to learn more. - -### 1x4 Header (I2C) - -The pinout for the Modulino Buzzer is shown below. While the recommended connection method is via the QWIIC connectors, this solderable header provides a connection option when using the modulino with a non-QWIIC compatible board. - -| Pin | Function | -|-------|--------------| -| GND | Ground | -| 3.3 V | Power Supply | -| SDA | I²C Data | -| SCL | I²C Clock | - -## Power Specifications - -The board is typically powered by +3.3 VDC when using the QWIIC interface as per the I²C standard. - -| Parameter | Condition | Minimum | Typical | Maximum | Unit | -|-----------------|-------------------------------------------------------------------|---------|-------------|---------|------| -| Supply Voltage | \- | 2.3 | 3.3 (QWIIC) | 5.5 | V | -| Average Current | 1 humidity + temperature measurement/s 3.3 VDD - Max 5,5@ 3.3 VDD | \- | 1024.4 | 24.4 | µA | - -The module additionally includes a power LED that draws 1 mA and turns on as soon as it is powered. - -J1 (Qwiic connector), J2 (Qwiic connector), and the headers all share the same power branch. The power distribution of the module is therefore as follows: - -![Power Tree Modulino Thermo](assets/Modulino_Thermo_Power_Tree.png) - -## Schematic - -The Modulino Thermo uses a simple circuit, as shown in the schematic below: - -![Full Schematic Modulino Thermo](assets/schematic.png) - -The main component is the **HS3003** sensor (U1), which handles both temperature and humidity measurements, as well as I²C communication. - -You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, this is the recommended method) or the **solderable pins** (J4). The board runs on **3.3V**, which comes from the QWIIC cable or the **3V3 pin** on J4. - -There's also a small power indicator LED that lights up when the board is on. -You can grab the full schematic and PCB files from the [Modulino Thermo](https://docs.arduino.cc/hardware/modulinos/modulino-thermo) product page. - -## How To Connect Your Modulino - -The easiest and most reliable way to connect your Modulino is through the QWIIC Connect System. It’s plug-and-play, uses standard I²C, and makes it easy to join multiple modules. If your board supports QWIIC, this is the recommended way to go. Note that the dedicated I²C pins will differ from board to board meaning it is always a good idea to check your specific model. - -If your board doesn’t have a QWIIC connector, you can still access the same I²C bus and power the module using the solderable header pads just make sure you wire it to 3.3V and match the I²C pinout. - -![Modulino Wiring Options QWIIC(A - recommended) and Header(B)](assets/connection-guide-thermo.png) - -### QWIIC Connector - -Whenever available, the **QWIIC Connect System** is the preferred method. Connecting to the Modulino is extremely simple, just use a standard QWIIC cable to connect your board to either of the QWIIC connectors on the Modulino. Because the cable and connectors are polarized, there is no need to worry about accidentally swapping connections. - -QWIIC is a plug-and-play I²C Connect System that uses standardized 4-pin connectors: - -- GND -- 3.3V -- SDA (Data) -- SCL (Clock) - -![Connection Guide QWIIC](assets/connection-guide-thermo-qwiik.png) - -The Modulino features two QWIIC connectors, which are internally connected in parallel. This means you can daisy-chain multiple modules easily by connecting additional QWIIC cables between them. - -### Solderable Header - -When QWIIC is not available, you can use the exposed solderable pins on the module. You can solder pins to the unpopulated pads; just remember the pinout provided in this guide to connect to the right pins of your board. - -![Connection Guide Solder Pads](assets/connection-guide-thermo-jumper.png) - -## Daisy-Chaining Multiple Modulino Nodes - -Regardless of whether you connect the first Modulino via QWIIC or through the solderable pins, you can still take advantage of the extra QWIIC connector to daisy-chain additional modules. - -Each Modulino includes two QWIIC connectors wired in parallel, allowing you to connect one module to the next in a chain. As long as each module is configured with a unique I²C address, they can all communicate on the same bus as long as you select the correct I²C pins depending on your board. - -This approach keeps your setup clean, modular, and expandable without adding extra wiring complexity. - -![Modulino Wiring Options](assets/connection-guide-thermo-qwiic-chain.png) - -***The number of modules you can connect will depend on what modules you are chaining together, as this system allows for multiple sensors from different manufacturers to be added. Also, the cables you use for these connections will play a significant role in the setup’s performance. Ensure your cables are correctly connected and capable of handling the required data transfer. -Each module should have a unique address on a chain if you plan to address them individually. Multiple modules with the same address will cause conflicts on the I²C bus.*** - -## How To Use Your Modulino - -### Installing The Modulino Library - -You need the official Modulino library available [here](https://docs.arduino.cc/libraries/modulino/) to use the Modulino Thermo. - -With the Arduino IDE you get some tools that make adding a library easier. To learn how to install the IDE please visit our [page](https://docs.arduino.cc/software/ide-v2/tutorials/getting-started/ide-v2-downloading-and-installing/). - -After opening the IDE, a tab should be visible on the left. Press the book icon for "library" as highlighted in the image. - -![IDE Library Tab](assets/IDE-Left-Tab.png) - -The process should look like this: - -![Library Install](assets/library-install.gif) - -A message will appear after the installation is successful. - - -### Getting Temperature And Humidity Data - -Getting data from the sensor is fairly simple using the ```Modulino``` library. For the **Modulino Thermo** there are two important functions: - -- ```getTemperature()```: Provides the temperature measurement from the sensor. (default in Celsius C) -- ```getHumidity()```: Provides the relative humidity measurement from the sensor. (default in Relative Percentage %) -- ```Modulino.begin();```: By default the Modulino library uses ```Wire1``` if your connection is in a different Wire you will have to edit it, check [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/) (by default the Modulino library uses ```Wire1``` if your board model has a different pinout for the dedicated I²C pins you might have to edit it. More information on **Wire** can be found [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/)) for the library's hardware compatibility. More information on **Wire** can be found [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/). - -Here is an example sketch of how to implement these functions to acquire data and show it using the serial monitor: - -```arduino -#include - -// Create object instance -ModulinoThermo thermo; - -// Global Variables -float celsius = 0; -float humidity = 0; - -void setup(){ - // Initialization of the serial port, modulino object and thermo one - - Serial.begin(115200); - Modulino.begin(); - thermo.begin(); -} - -void loop(){ - celsius = thermo.getTemperature(); - humidity = thermo.getHumidity(); - - Serial.print("Temperature (C) is: "); - Serial.println(celsius); - - Serial.print("Humidity (rH) is: "); - Serial.println(humidity); - - delay(1000); -} -``` - -The code example provided shows how to initialize the sensor, read the data, and display it on the serial monitor. The data is updated every second, showing the current temperature and humidity values in real time. - -It can be easily adapted to trigger actions at certain temperature/humidity thresholds or to log data for analysis. - -## Troubleshooting - -### Sensor Not Reachable - -If your Modulino's power LED isn't on or the sensor isn't responsive, first check that the board is properly connected: - -- Ensure both the board and the Modulino are connected to your computer, and that the power LEDs on both are lit. -- If the issue persists, make sure the Qwiic cable is properly clicked into place. - -### Library Not Installed Properly - -If you encounter an issue with the `#include "modulino.h"` command, verify that the Modulino library is correctly installed: - -- Check your IDE to ensure the library is installed and up-to-date. -- Re-install the library through the Library Manager. - -### Inaccurate Values - -If the sensor values are not accurate, make sure: - -- The sensor is not placed near any components that might generate heat (like motors or power supplies). -- All exposed electronics are not touching any conductive surfaces, as this could interfere with readings. - -## Conclusion - -The **Modulino Thermo** is a digital temperature and humidity sensor that communicates over I²C and follows the Modulino form factor. It includes standard Qwiic connectors for quick, solderless connections and easy daisy-chaining with other modules. Paired with the Modulino library, it makes accessing sensor data straightforward, allowing you to focus on experimenting or building your system logic. It’s a small, reliable module suited for both quick tests and longer-term setups. - -## What Is Next? - -Now that you've learned how to use your Modulino Thermo, you're all set to integrate it into your projects! - -- Experiment with temperature and humidity. What happens if you place your Modulino in the refrigerator? -- Try breathing near the sensor. Does the humidity change? -- Place your Modulino on the outside of your mug and fill it with a hot beverage. Can you create an automatic system to know when your tea has cooled down? -- How does the temperature change throughout the day at home? Let your Modulino run for an entire day and check out the data! \ No newline at end of file diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/image.png b/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/image.png deleted file mode 100644 index bceefec75d..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/image.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/Modulino_Thermo_Power_Tree.png b/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/Modulino_Thermo_Power_Tree.png deleted file mode 100644 index 75ecb8a8e7..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/Modulino_Thermo_Power_Tree.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/ThermoPinouts.jpg b/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/ThermoPinouts.jpg deleted file mode 100644 index 22c8b59c70..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/ThermoPinouts.jpg and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/connection-guide-thermo-jumper.png b/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/connection-guide-thermo-jumper.png deleted file mode 100644 index 650231c828..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/connection-guide-thermo-jumper.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/connection-guide-thermo-qwiic-chain.png b/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/connection-guide-thermo-qwiic-chain.png deleted file mode 100644 index 28d62417a5..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/connection-guide-thermo-qwiic-chain.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/connection-guide-thermo-qwiik.png b/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/connection-guide-thermo-qwiik.png deleted file mode 100644 index e10a27ebdb..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/connection-guide-thermo-qwiik.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/connection-guide-thermo.png b/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/connection-guide-thermo.png deleted file mode 100644 index 35591967a9..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/connection-guide-thermo.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/mp-usb-connection.png b/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/mp-usb-connection.png deleted file mode 100644 index fb059f9e8b..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/mp-usb-connection.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/package-installer-overview.png b/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/package-installer-overview.png deleted file mode 100644 index 67678dc808..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/package-installer-overview.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/schematic.png b/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/schematic.png deleted file mode 100644 index b094fac53d..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/assets/schematic.png and /dev/null differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/content.md b/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/content.md deleted file mode 100644 index 0423fa4909..0000000000 --- a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/content.md +++ /dev/null @@ -1,233 +0,0 @@ ---- -title: "How To Use The Modulino Thermo And MicroPython" -description: "Learn how to get the most out of your Modulino Thermo in a MicroPython environment." -tags: - - Modulino - - QWIIC - - I2C -author: 'Pedro Sousa Lima' -hardware: - - hardware/11.modulinos/modulinos/modulino-thermo -software: - - ide-v2 - - web-editor ---- - -The Modulino Thermo is a modular sensor that measures temperature and humidity, making it perfect to add environmental monitoring to your projects! -The Modulino form factor is shaped with two QWIIC connectors and the I²C protocol integration, allowing the connection and programming of multiple Modulino nodes in a very simple way. In addition to the QWIIC's connectors, the Modulino nodes also expose solderable pins that can be used in multiple ways and make them compatible with boards that are not QWIIC compatible. - - -## General Characteristics - -The Modulino Thermo is capable of measuring temperature and relative humidity. Take a look at the following table to know more about its measuring ranges: - - -| Parameter | Condition | Minimum | Typical | Maximum | Unit | -|-----------|-------------|---------|---------|---------|------| -| Range | Temperature | \-40 | \- | +125 | °C | -| \- | Humidity | 0 | \- | 100% | φ RH | -| Accuracy | Temperature | \- | ±0,25 | \- | °C | -| \- | Humidity | \- | ±2.8% | \- | φ | - -### Sensor Details - -The HS3003 sensor from Renesas is the core component of this module. This temperature and humidity sensor natively supports digital communication (I²C), meaning it connects directly to the I²C bus on the module without requiring additional conversion circuitry. - -The default address for the Module is: - -| Modulino I²C Address | Hardware I²C Address | -|----------------------|----------------------| -| 0x44 | 0x44 | - -***Note: Since the address cannot be changed on this Modulino specifically, using two or more identical modules on the same I²C bus will result in address conflicts and cause communication issues.*** - -## Pinout - -The pinout for the Modulino Thermo is shown below. Please note that the exposed solderable pins are directly connected to the QWIIC connectors using the same I²C interface. - -![Arduino Thermo Pinout](assets/ThermoPinouts.jpg) - -### 1x4 Header (I2C) - -The pinout for the Modulino Buzzer is shown below. While the recommended connection method is via the QWIIC connectors, this solderable header provides a connection option when using the modulino with a non-QWIIC compatible board. - -| Pin | Function | -|-------|--------------| -| GND | Ground | -| 3V3 | Power Supply | -| SDA | I²C Data | -| SCL | I²C Clock | - -Depending on the board connected to the modulino, the I²C pin names to program it may differ. Please check the [board tutorials](https://docs.arduino.cc/hardware/) on your modulino's compatible board or the [Modulino library](https://github.com/arduino-libraries/Modulino/tree/main/docs) to learn more. - -## Power Specifications - -The board is typically powered by +3.3 VDC when using the QWIIC interface as per the I²C standard. - -| Parameter | Condition | Minimum | Typical | Maximum | Unit | -|-----------------|-------------------------------------------------------------------|---------|-------------|---------|------| -| Supply Voltage | \- | 2.3 | 3.3 (QWIIC) | 5.5 | V | -| Average Current | 1 humidity + temperature measurement/s 3.3 VDD - Max 5,5@ 3.3 VDD | \- | 1024.4 | 24.4 | µA | - -The module additionally includes a power LED that draws 1 mA and turns on as soon as it is powered. - -J1 (Qwiic connector), J2 (Qwiic connector), and the headers all share the same power branch. The power distribution of the module is therefore as follows: - -![Power Tree Modulino Thermo](assets/Modulino_Thermo_Power_Tree.png) - -## Schematic - -The Modulino Thermo uses a simple circuit, as shown in the schematic below: - -![Full Schematic Modulino Thermo](assets/schematic.png) - -The main component is the **HS3003** sensor (U1), which handles both temperature and humidity measurements, as well as I²C communication. - -You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, this is the recommended method) or the **solderable pins** (J4). The board runs on **3.3V**, which comes from the QWIIC cable or the **3V3 pin** on J4. - -There's also a small power indicator LED that lights up when the board is on. - -You can grab the full schematic and PCB files from the [Modulino Thermo](https://docs.arduino.cc/hardware/modulinos/modulino-thermo) product page. - -## How To Connect Your Modulino - -The easiest and most reliable way to connect your Modulino is through the QWIIC Connect System. It’s plug-and-play, uses standard I²C, and makes it easy to join multiple modules. If your board supports QWIIC, this is the recommended way to go. Note that the dedicated I²C pins will differ from board to board meaning it is always a good idea to check your specific model. - -If your board doesn’t have a QWIIC connector, you can still access the same I²C bus and power the module using the solderable header pads just make sure you wire it to 3.3V and match the I²C pinout. - -![Modulino Wiring Options QWIIC(A - recommended) and Header(B)](assets/connection-guide-thermo.png) - -### QWIIC Connector - -Whenever available, the **QWIIC Connect System** is the preferred method. Connecting to the Modulino is extremely simple, just use a standard QWIIC cable to connect your board to either of the QWIIC connectors on the Modulino. Because the cable and connectors are polarized, there is no need to worry about accidentally swapping connections. - -QWIIC is a plug-and-play I²C Connect System that uses standardized 4-pin connectors: - -- GND -- 3.3V -- SDA (Data) -- SCL (Clock) - -![Connection Guide QWIIC](assets/connection-guide-thermo-qwiik.png) - -The Modulino features two QWIIC connectors, which are internally connected in parallel. This means you can daisy-chain multiple modules easily by connecting additional QWIIC cables between them. - -### Solderable Header - -When QWIIC is not available, you can use the exposed solderable pins on the module. You can solder pins to the unpopulated pads; just remember the pinout provided in this guide to connect to the right pins of your board. - -![Connection Guide Solder Pads](assets/connection-guide-thermo-jumper.png) - -## Daisy-Chaining Multiple Modulino Nodes - -Regardless of whether you connect the first Modulino via QWIIC or through the solderable pins, you can still take advantage of the extra QWIIC connector to daisy-chain additional modules. - -Each Modulino includes two QWIIC connectors wired in parallel, allowing you to connect one module to the next in a chain. As long as each module is configured with a unique I²C address, they can all communicate on the same bus as long as you select the correct I²C pins depending on your board. - -This approach keeps your setup clean, modular, and expandable without adding extra wiring complexity. - -![Modulino Wiring Options](assets/connection-guide-thermo-qwiic-chain.png) - -***The number of modules you can connect will depend on what modules you are chaining together, as this system allows for multiple sensors from different manufacturers to be added. Also, the cables you use for these connections will play a significant role in the setup’s performance. Ensure your cables are correctly connected and capable of handling the required data transfer. -Each module should have a unique address on a chain if you plan to address them individually. Multiple modules with the same address will cause conflicts on the I²C bus.*** - -## How To Program Your Modulino - -### Installing The Modulino Library - -To program your Modulino it is recommended you use the official ```Modulino``` micropython library available [here](https://github.com/arduino/arduino-modulino-mpy). The library is fully compatible with the no **Arduino Lab for MicroPython**. - -For information on installing the **Arduino Lab for MicroPython** please visit our [page](https://docs.arduino.cc/micropython/first-steps/install-guide/). - -The ```Modulino``` library is not available by default on MicroPython devices hence installation is needed. - -To simplify the process the [MicroPython Package Installer](https://github.com/arduino/lab-micropython-package-installer/releases) is recommended as it will provide a graphical interface to guide installation. - -After installation, you should now be able to: - -1. Open the tool. -2. Plug in your board to the computer. - - ![USB Connection](assets/mp-usb-connection.png) - - If the board does not appear in the Detected Boards section, click Reload. If the board is still undetected, ensure no other programs (e.g., a code editor) are using the board's COM port. - -3. Search for the ```Modulino``` package by filling in the text box on the search feature. -4. Click Install and wait for the installation confirmation. -5. Disconnect the board from the tool before returning to your code editor to avoid conflicts due to a busy COM port. - -![Package Installer Overview](assets/package-installer-overview.png) - -The module should now be includable in your program using: - -```from modulino import ModulinoThermo``` - -### Get Temperature And Humidity Data - -Getting data from the sensor is fairly simple using the ```Modulino``` library. - -For the **Thermo** there are two crucial functions: - -- ```.temperature``` - Provides the temperature measurement from the sensor. (Default in °C) -- ```.relative_humidity``` - Provides the relative humidity from the sensor. (Default in %) - -By default the Modulino library uses ```Wire1``` if your board model has a different pinout for the dedicated I²C pins you might have to edit it as instructed [here](https://github.com/arduino/arduino-modulino-mpy/tree/main/docs#%E2%84%B9%EF%B8%8F-using-3rd-party-boards). More information on **Wire** can be found [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/). - -Here is an example of how to implement these functions to acquire data: - -```python -from modulino import ModulinoThermo -from time import sleep - -thermo_module = ModulinoThermo() - -while True:     - temperature = thermo_module.temperature - humidity = thermo_module.relative_humidity -    -    if temperature != None and humidity != None: -        print(f"🌡️ Temperature: {temperature:.1f} °C") -        print(f"💧 Humidity: {humidity:.1f} %")     -        print() -        -    sleep(2) -``` - -The code example provided shows how to initialize the sensor, read the data, and display it on the serial monitor. The data is updated every second, showing the current temperature and humidity values in real time. -It can be easily adapted to trigger actions at certain temperature/humidity thresholds or to log data for analysis. - -## Troubleshooting - -### Sensor Not Reachable - -If your Modulino's power LED isn't on or the sensor isn't responsive, first check that the board is properly connected: - -- Ensure both the board and the Modulino are connected to your computer, and that the power LEDs on both are lit. -- If the issue persists, make sure the Qwiic cable is properly clicked into place. - -### Library Not Installed Properly - -If you encounter an issue with the `#include "modulino.h"` command, verify that the Modulino library is correctly installed: - -- Check your IDE to ensure the library is installed and up-to-date. -- Re-install the library through the Library Manager. - -### Inaccurate Values - -If the sensor values are not accurate, make sure: - -- The sensor is not placed near any components that might generate heat (like motors or power supplies). -- All exposed electronics are not touching any conductive surfaces, as this could interfere with readings. - -## Conclusion - -The **Modulino Thermo** is a digital temperature and humidity sensor that communicates over I²C and follows the Modulino form factor. It includes standard Qwiic connectors for quick, solderless connections and easy daisy-chaining with other modules. Paired with the Modulino library, it makes accessing sensor data straightforward, allowing you to focus on experimenting or building your system logic. It’s a small, reliable module suited for both quick tests and longer-term setups. - -## What Is Next? - -Now that you've learned how to use your Modulino Thermo, you're all set to integrate it into your projects! - -- Experiment with temperature and humidity. What happens if you place your Modulino in the refrigerator? -- Try breathing near the sensor. Does the humidity change? -- Place your Modulino on the outside of your mug and fill it with a hot beverage. Can you create an automatic system to know when your tea has cooled down? -- How does the temperature change throughout the day at home? Let your Modulino run for an entire day and check out the data! \ No newline at end of file diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/image.png b/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/image.png deleted file mode 100644 index bceefec75d..0000000000 Binary files a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-mp/image.png and /dev/null differ diff --git a/content/hardware/11.accessories/family.md b/content/hardware/11.modulino/family.md similarity index 100% rename from content/hardware/11.accessories/family.md rename to content/hardware/11.modulino/family.md diff --git a/content/hardware/11.accessories/modulino-nodes/category.md b/content/hardware/11.modulino/modulino-nodes/category.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/category.md rename to content/hardware/11.modulino/modulino-nodes/category.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-CERT_CE_EMC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-CERT_CE_EMC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-CERT_CE_EMC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-CERT_CE_EMC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-CERT_FCC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-CERT_FCC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-CERT_FCC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-CERT_FCC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-CERT_IC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-CERT_IC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-CERT_IC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-CERT_IC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-CERT_UKCA.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-CERT_UKCA.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-CERT_UKCA.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-CERT_UKCA.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-DoC_CE.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-DoC_CE.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-DoC_CE.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-DoC_CE.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-DoC_FCC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-DoC_FCC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-DoC_FCC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-DoC_FCC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-DoC_UKCA.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-DoC_UKCA.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-DoC_UKCA.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/certifications/Arduino_ABX00110-DoC_UKCA.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/compatibility.yml b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/compatibility.yml similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/compatibility.yml rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/compatibility.yml diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/datasheet/assets/BlockDiagramButtons.png b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/datasheet/assets/BlockDiagramButtons.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/datasheet/assets/BlockDiagramButtons.png rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/datasheet/assets/BlockDiagramButtons.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/datasheet/assets/BtnMec.png b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/datasheet/assets/BtnMec.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/datasheet/assets/BtnMec.png rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/datasheet/assets/BtnMec.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/datasheet/assets/ButtonsPinouts.png b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/datasheet/assets/ButtonsPinouts.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/datasheet/assets/ButtonsPinouts.png rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/datasheet/assets/ButtonsPinouts.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/datasheet/assets/I2CTag.png b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/datasheet/assets/I2CTag.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/datasheet/assets/I2CTag.png rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/datasheet/assets/I2CTag.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/datasheet/assets/Modulino_Buttons_Power_Tree.png b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/datasheet/assets/Modulino_Buttons_Power_Tree.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/datasheet/assets/Modulino_Buttons_Power_Tree.png rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/datasheet/assets/Modulino_Buttons_Power_Tree.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/datasheet/assets/ResistorsPullupBtn.png b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/datasheet/assets/ResistorsPullupBtn.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/datasheet/assets/ResistorsPullupBtn.png rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/datasheet/assets/ResistorsPullupBtn.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/datasheet/assets/featured.png b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/datasheet/assets/featured.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/datasheet/assets/featured.png rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/datasheet/assets/featured.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/datasheet/datasheet.md b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/datasheet/datasheet.md similarity index 97% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/datasheet/datasheet.md rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/datasheet/datasheet.md index e97264c3df..ee6a50189e 100644 --- a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/datasheet/datasheet.md +++ b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/datasheet/datasheet.md @@ -44,9 +44,9 @@ Maker, beginner, education ## Related Products -- *SKU: ASX00027* – [Arduino® Sensor Kit](https://store.arduino.cc/products/arduino-sensor-kit) -- *SKU: K000007* – [Arduino® Starter Kit](https://store.arduino.cc/products/arduino-starter-kit-multi-language) -- *SKU: AKX00026* – [Arduino® Oplà IoT Kit](https://store.arduino.cc/products/opla-iot-kit) +- **SKU: ASX00027** – [Arduino® Sensor Kit](https://store.arduino.cc/products/arduino-sensor-kit) +- **SKU: K000007** – [Arduino® Starter Kit](https://store.arduino.cc/products/arduino-starter-kit-multi-language) +- **SKU: AKX00026** – [Arduino® Oplà IoT Kit](https://store.arduino.cc/products/opla-iot-kit) ## Rating diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/downloads/ABX00110-cad-files.zip b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/downloads/ABX00110-cad-files.zip similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/downloads/ABX00110-cad-files.zip rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/downloads/ABX00110-cad-files.zip diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/downloads/ABX00110-schematics.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/downloads/ABX00110-schematics.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/downloads/ABX00110-schematics.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/downloads/ABX00110-schematics.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/downloads/ABX00110-step.zip b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/downloads/ABX00110-step.zip similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/downloads/ABX00110-step.zip rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/downloads/ABX00110-step.zip diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/essentials.md b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/essentials.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/essentials.md rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/essentials.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/features.md b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/features.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/features.md rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/features.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/image.svg b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/image.svg similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/image.svg rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/image.svg diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/interactive/ABX00110-pinout.png b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/interactive/ABX00110-pinout.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/interactive/ABX00110-pinout.png rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/interactive/ABX00110-pinout.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/product.md b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/product.md similarity index 84% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/product.md rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/product.md index a36cadc128..6d9b9d3b3a 100644 --- a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/product.md +++ b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/product.md @@ -2,10 +2,10 @@ title: Modulino Buttons url_shop: https://store.arduino.cc/products/modulino-buttons url_guide: https://courses.arduino.cc/plugandmake -primary_button_url: https://docs.arduino.cc/tutorials/modulino-buttons/how-buttons-ardu/ -primary_button_title: With Arduino -secondary_button_url: https://docs.arduino.cc/tutorials/modulino-buttons/how-buttons-mp/ -secondary_button_title: With MicroPython +primary_button_url: https://docs.arduino.cc/tutorials/modulino-buttons/how-buttons/ +primary_button_title: Get Started +secondary_button_url: https://docs.arduino.cc/tutorials/modulino-thermo/how-general/ +secondary_button_title: More on Modulino Nodes forumCategorySlug: '/hardware/accessories/modulino-buttons/214' sku: [ABX00110] --- diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tech-specs.md b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/tech-specs.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/tech-specs.md rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/tech-specs.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tech-specs.yml b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/tech-specs.yml similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/tech-specs.yml rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/tech-specs.yml diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/ButtonsPinouts.png b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/tutorials/how-buttons/assets/ButtonsPinouts.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/ButtonsPinouts.png rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/tutorials/how-buttons/assets/ButtonsPinouts.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/connection-guide-buttons.gif b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/tutorials/how-buttons/assets/connection-guide-buttons.gif similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/connection-guide-buttons.gif rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/tutorials/how-buttons/assets/connection-guide-buttons.gif diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/schematic.png b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/tutorials/how-buttons/assets/schematic.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/schematic.png rename to content/hardware/11.modulino/modulino-nodes/modulino-buttons/tutorials/how-buttons/assets/schematic.png diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-buttons/tutorials/how-buttons/content.md b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/tutorials/how-buttons/content.md new file mode 100644 index 0000000000..1b50995333 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/tutorials/how-buttons/content.md @@ -0,0 +1,352 @@ +--- +title: "Getting Started with Modulino Buttons" +description: "Complete guide for the Modulino Buttons and programming with Arduino and MicroPython." +tags: + - Modulino + - Buttons + - Input + - LED + - QWIIC + - I2C +author: 'Pedro Sousa Lima' +hardware: + - hardware/11.modulinos/modulinos/modulino-buttons +software: + - ide-v2 + - web-editor + - micropython +--- + +![Buttons Overview](assets/connection-guide-buttons.gif) + +The Modulino Buttons is a modular sensor that provides tactile input and visual feedback, making it perfect to add interactive controls to your projects! Pressing a button pulls the signal LOW, and each button has an onboard pull-up resistor. The LEDs can be controlled independently through the onboard microcontroller. + +## Hardware Overview + +### General Characteristics + +The **Modulino Buttons** module uses three tactile buttons and LEDs, controlled by the Modulino's onboard microcontroller (STM32C011F4U6TR). This microcontroller provides I²C communication, allowing for flexible reading of button states and control of the LEDs. + +| Specification | Details | +|-------------------|-----------------------------| +| Buttons | 3 × Tactile pushbuttons | +| LEDs | 3 × Indicator LEDs (orange) | +| Power Supply | 3.3 V | +| Interface | UART, SWD, I2C | +| Pull-up Resistors | Integrated on button inputs | + +One unique feature of this setup is the ability to change the I²C address via software, making it adaptable to different system configurations. + +The default I²C address for the **Modulino Buttons** module is: + +| Modulino I²C Address | Hardware I²C Address | Editable Addresses (HEX) | +|----------------------|----------------------|-------------------------------------------------| +| 0x7C | 0x3E | Any custom address (via software configuration) | + +### Pinout + +![Modulino Buttons Pinout](assets/ButtonsPinouts.png) + +#### 1x10 Header + +| Pin | Function | +|-------|----------------| +| A | Button A | +| GND | Ground | +| 3V3 | 3.3 V Power | +| PF2 | RESET | +| SWCLK | SWD Clock | +| SWDIO | SWD Data | +| TX1 | USART Transmit | +| RX1 | USART Receive | +| B | Button B | +| C | Button C | + +#### 1x4 Header (I2C) + +| Pin | Function | +|-------|--------------| +| GND | Ground | +| 3.3 V | Power Supply | +| SDA | I²C Data | +| SCL | I²C Clock | + +### Power Specifications + +| Parameter | Condition | Minimum | Typical | Maximum | Unit | +|------------------|------------------------------|---------|-------------|---------|------| +| Supply Voltage | - | - | 3.3 (QWIIC) | - | V | +| LED Current Draw | Single LED Active (A,B or C) | - | 2.5 | - | mA | + +The module includes a power LED that draws 1 mA and turns on as soon as it is powered. + +### Schematic + +The Modulino Buttons uses a straightforward circuit design featuring three tactile buttons, three user-programmable LEDs, and the STM32C011F4U6TR microcontroller. + +![Full Schematic Modulino Buttons](assets/schematic.png) + +The main components are the **three tactile buttons**, **three user-programmable LEDs** and the **STM32C011F4U6TR** microcontroller (U1), which handles button state reading, LED control, as well as I²C communication. + +You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, this is the recommended method) or the **solderable pins** (J4). The board runs on **3.3V**, which comes from the QWIIC cable or the **3V3 pin** on J4. + +You can grab the full schematic and PCB files from the [Modulino Buttons page](https://docs.arduino.cc/hardware/modulinos/modulino-buttons). + +## Programming with Arduino + +The Modulino Buttons is fully compatible with the Arduino IDE and the official Modulino library. The following examples showcase basic button reading and LED control functionality that can be easily integrated into your interactive projects. + +### Prerequisites + +- Install the Modulino library via the Arduino IDE Library Manager +- Connect your Modulino Buttons via QWIIC or solderable headers + +For detailed instructions on setting up your Arduino environment and installing libraries, please refer to the [Getting Started with Modulinos guide](./how-general). + +Library repository available [here](https://github.com/arduino-libraries/Arduino_Modulino). + +### Basic Example + +```arduino +#include + +// Create object instance +ModulinoButtons buttons; + +void setup() { + Serial.begin(9600); + Modulino.begin(); + buttons.begin(); + + // Function to control the LEDs on top of each button + buttons.setLeds(true, true, true); +} + +void loop() { + // Request new data from the Modulino Buttons + if (buttons.update()) { + // Check if any button has been pressed + if (buttons.isPressed(0)) { + Serial.println("Button A pressed!"); + } else if (buttons.isPressed(1)) { + Serial.println("Button B pressed!"); + } else if (buttons.isPressed(2)) { + Serial.println("Button C pressed!"); + } + } +} +``` + +### Key Functions + +- `update()`: Requests new data from the button module +- `isPressed(index)`: Checks if a specific button (0=A, 1=B, 2=C) is pressed +- `setLeds(A, B, C)`: Sets the state of the LEDs (true=on, false=off) + +### Advanced Example - Button Events with Button2 Library + +The Modulino Buttons can be enhanced with the Button2 library to detect various button events beyond simple presses. + +```arduino +#include "Modulino.h" +#include "Button2.h" + +Button2 button; +ModulinoButtons modulino_buttons; + +uint8_t button0StateHandler() { + modulino_buttons.update(); + return modulino_buttons.isPressed(0) ? LOW : HIGH; // fake a normal button -> LOW = pressed +} + +void handler(Button2& btn) { + switch (btn.getType()) { + case single_click: + break; + case double_click: + Serial.print("double "); + break; + case triple_click: + Serial.print("triple "); + break; + case long_click: + Serial.print("long"); + break; + } + Serial.print("click"); + Serial.print(" ("); + Serial.print(btn.getNumberOfClicks()); + Serial.println(")"); +} + +void setup() { + Serial.begin(115200); + Modulino.begin(); + modulino_buttons.begin(); + + button.setDebounceTime(35); + button.setButtonStateFunction(button0StateHandler); + button.setClickHandler(handler); + button.setDoubleClickHandler(handler); + button.setTripleClickHandler(handler); + button.setLongClickHandler(handler); + button.begin(BTN_VIRTUAL_PIN); +} + +void loop() { + button.loop(); +} +``` + +## Programming with MicroPython + +The Modulino Buttons is fully compatible with MicroPython through the official Modulino MicroPython library. The following examples demonstrate how to detect button presses, handle various button events, and control the integrated LEDs in your MicroPython projects. + +### Prerequisites + +- Install the Modulino MicroPython library +- Ensure Arduino Lab for MicroPython is installed + +For detailed instructions on setting up your MicroPython environment and installing packages, please refer to the [Getting Started with Modulinos guide](./how-general). + +### Basic Example + +```python +from modulino import ModulinoButtons +from time import sleep + +buttons = ModulinoButtons() + +# Define button press actions +buttons.on_button_a_press = lambda : print("Button A pressed") +buttons.on_button_a_long_press = lambda : print("Button A long press") +buttons.on_button_a_release = lambda : print("Button A released") + +buttons.on_button_b_press = lambda : print("Button B pressed") +buttons.on_button_b_long_press = lambda : print("Button B long press") +buttons.on_button_b_release = lambda : print("Button B released") + +buttons.on_button_c_press = lambda : print("Button C pressed") +buttons.on_button_c_long_press = lambda : print("Button C long press") +buttons.on_button_c_release = lambda : print("Button C released") + +# LED Sequence: Turn each LED on with a delay, then turn them off +buttons.led_a.on() +sleep(0.5) +buttons.led_b.on() +sleep(0.5) +buttons.led_c.on() +sleep(0.5) +buttons.set_led_status(False, False, False) # Turn off all LEDs + +while True: + buttons_state_changed = buttons.update() + + if buttons_state_changed: + led_a_status = buttons.is_pressed(0) # Turn LED A on if button A is pressed + led_b_status = buttons.is_pressed(1) # Turn LED B on if button B is pressed + led_c_status = buttons.is_pressed(2) # Turn LED C on if button C is pressed + buttons.set_led_status(led_a_status, led_b_status, led_c_status) +``` + +### Key Functions and Properties + +- `.on_button_x_press`: Callback for button press events +- `.on_button_x_long_press`: Callback for long press events +- `.on_button_x_release`: Callback for button release events +- `.led_x.on()/.off()`: Control individual LEDs +- `.set_led_status(a, b, c)`: Set all LED states at once +- `.is_pressed(index)`: Check if a button is currently pressed +- `.update()`: Check for button state changes + +### Advanced Example - Menu System + +```python +from modulino import ModulinoButtons +from time import sleep + +buttons = ModulinoButtons() + +# Menu system variables +menu_items = ["Option 1", "Option 2", "Option 3", "Settings", "Exit"] +current_index = 0 +in_submenu = False + +def show_menu(): + """Display current menu state via LEDs and serial""" + print("\n--- MENU ---") + for i, item in enumerate(menu_items): + prefix = ">" if i == current_index else " " + print(f"{prefix} {item}") + + # Show position with LEDs + buttons.set_led_status( + current_index == 0, + current_index == 2, + current_index == 4 + ) + +def next_item(): + """Move to next menu item""" + global current_index + current_index = (current_index + 1) % len(menu_items) + show_menu() + +def previous_item(): + """Move to previous menu item""" + global current_index + current_index = (current_index - 1) % len(menu_items) + show_menu() + +def select_item(): + """Select current menu item""" + print(f"\n✓ Selected: {menu_items[current_index]}") + + # Flash all LEDs to confirm selection + for _ in range(3): + buttons.set_led_status(True, True, True) + sleep(0.1) + buttons.set_led_status(False, False, False) + sleep(0.1) + +# Configure button actions +buttons.on_button_a_press = previous_item # Navigate up +buttons.on_button_b_press = select_item # Select +buttons.on_button_c_press = next_item # Navigate down + +# Initialize +print("Menu Navigation System") +print("A: Previous | B: Select | C: Next") +show_menu() + +# Main loop +while True: + buttons.update() + sleep(0.01) +``` + +## Troubleshooting + +### Buttons Not Responding + +If your Modulino's power LED isn't on or the buttons aren't responsive: +- Ensure both the board and the Modulino are connected properly +- Verify that the power LEDs on both are lit +- Check that the QWIIC cable is properly clicked into place + +### LEDs Not Working + +If the LEDs aren't lighting up as expected: +- Verify correct LED states are being set in your code +- Check that exposed electronics are not touching conductive surfaces +- Ensure adequate power supply for LED operation + +## Project Ideas + +- **Simple Menu System**: Each button performs a different function or navigates menus +- **Game Controller**: Build controls for arcade-style games +- **Interactive Control Panel**: Control other Modulino devices in your project +- **Pattern Memory Game**: Create a Simon-style memory game with LED feedback +- **Morse Code Trainer**: Practice Morse code with button input and LED feedback +- **Smart Home Controller**: Three-button interface for home automation +- **Music Box Controller**: Each button plays different notes or controls playback \ No newline at end of file diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-buttons/tutorials/how-general b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/tutorials/how-general new file mode 120000 index 0000000000..3f77534684 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-buttons/tutorials/how-general @@ -0,0 +1 @@ +../../modulino-thermo/tutorials/how-general \ No newline at end of file diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-CERT_CE_EMC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-CERT_CE_EMC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-CERT_CE_EMC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-CERT_CE_EMC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-CERT_FCC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-CERT_FCC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-CERT_FCC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-CERT_FCC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-CERT_IC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-CERT_IC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-CERT_IC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-CERT_IC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-CERT_UKCA.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-CERT_UKCA.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-CERT_UKCA.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-CERT_UKCA.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-DoC_CE.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-DoC_CE.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-DoC_CE.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-DoC_CE.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-DoC_FCC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-DoC_FCC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-DoC_FCC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-DoC_FCC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-DoC_UKCA.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-DoC_UKCA.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-DoC_UKCA.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/certifications/Arduino_ABX00108-DoC_UKCA.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/compatibility.yml b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/compatibility.yml similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/compatibility.yml rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/compatibility.yml diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/datasheet/assets/BlockDiagramBuzzer.png b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/datasheet/assets/BlockDiagramBuzzer.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/datasheet/assets/BlockDiagramBuzzer.png rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/datasheet/assets/BlockDiagramBuzzer.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/datasheet/assets/BuzzMec.png b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/datasheet/assets/BuzzMec.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/datasheet/assets/BuzzMec.png rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/datasheet/assets/BuzzMec.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/datasheet/assets/BuzzerPinouts.png b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/datasheet/assets/BuzzerPinouts.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/datasheet/assets/BuzzerPinouts.png rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/datasheet/assets/BuzzerPinouts.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/datasheet/assets/I2CTag.png b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/datasheet/assets/I2CTag.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/datasheet/assets/I2CTag.png rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/datasheet/assets/I2CTag.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/datasheet/assets/Modulino_Buzzer_Power_Tree.png b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/datasheet/assets/Modulino_Buzzer_Power_Tree.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/datasheet/assets/Modulino_Buzzer_Power_Tree.png rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/datasheet/assets/Modulino_Buzzer_Power_Tree.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/datasheet/assets/ResistorsPullupGen.png b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/datasheet/assets/ResistorsPullupGen.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/datasheet/assets/ResistorsPullupGen.png rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/datasheet/assets/ResistorsPullupGen.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/datasheet/assets/featured.png b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/datasheet/assets/featured.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/datasheet/assets/featured.png rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/datasheet/assets/featured.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/datasheet/datasheet.md b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/datasheet/datasheet.md similarity index 97% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/datasheet/datasheet.md rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/datasheet/datasheet.md index d81d8762fe..75037d7f38 100644 --- a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/datasheet/datasheet.md +++ b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/datasheet/datasheet.md @@ -41,9 +41,9 @@ Maker, beginner, education ## Related Products -- *SKU: ASX00027* – [Arduino® Sensor Kit](https://store.arduino.cc/products/arduino-sensor-kit) -- *SKU: K000007* – [Arduino® Starter Kit](https://store.arduino.cc/products/arduino-starter-kit-multi-language) -- *SKU: AKX00026* – [Arduino® Oplà IoT Kit](https://store.arduino.cc/products/opla-iot-kit) +- **SKU: ASX00027** – [Arduino® Sensor Kit](https://store.arduino.cc/products/arduino-sensor-kit) +- **SKU: K000007** – [Arduino® Starter Kit](https://store.arduino.cc/products/arduino-starter-kit-multi-language) +- **SKU: AKX00026** – [Arduino® Oplà IoT Kit](https://store.arduino.cc/products/opla-iot-kit) ## Rating diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/downloads/ABX00108-cad-files.zip b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/downloads/ABX00108-cad-files.zip similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/downloads/ABX00108-cad-files.zip rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/downloads/ABX00108-cad-files.zip diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/downloads/ABX00108-schematics.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/downloads/ABX00108-schematics.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/downloads/ABX00108-schematics.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/downloads/ABX00108-schematics.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/downloads/ABX00108-step.zip b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/downloads/ABX00108-step.zip similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/downloads/ABX00108-step.zip rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/downloads/ABX00108-step.zip diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/essentials.md b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/essentials.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/essentials.md rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/essentials.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/features.md b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/features.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/features.md rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/features.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/image.svg b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/image.svg similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/image.svg rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/image.svg diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/interactive/ABX00108-pinout.png b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/interactive/ABX00108-pinout.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/interactive/ABX00108-pinout.png rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/interactive/ABX00108-pinout.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/product.md b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/product.md similarity index 83% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/product.md rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/product.md index 44edf0aa4f..56bc464b5d 100644 --- a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/product.md +++ b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/product.md @@ -2,10 +2,10 @@ title: Modulino Buzzer url_shop: https://store.arduino.cc/products/modulino-buzzer url_guide: https://courses.arduino.cc/plugandmake -primary_button_url: https://docs.arduino.cc/tutorials/modulino-buzzer/how-buzzer-ardu/ -primary_button_title: With Arduino -secondary_button_url: https://docs.arduino.cc/tutorials/modulino-buzzer/how-buzzer-mp/ -secondary_button_title: With MicroPython +primary_button_url: https://docs.arduino.cc/tutorials/modulino-buzzer/how-buzzer/ +primary_button_title: Get Started +secondary_button_url: https://docs.arduino.cc/tutorials/modulino-thermo/how-general/ +secondary_button_title: More on Modulino Nodes forumCategorySlug: '/hardware/accessories/modulino-buzzer/215' sku: [ABX00108] --- diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tech-specs.md b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/tech-specs.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tech-specs.md rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/tech-specs.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tech-specs.yml b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/tech-specs.yml similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tech-specs.yml rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/tech-specs.yml diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/tutorials/how-buzzer/assets/BuzzerOverview.png b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/tutorials/how-buzzer/assets/BuzzerOverview.png new file mode 100644 index 0000000000..aa71e573da Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/tutorials/how-buzzer/assets/BuzzerOverview.png differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/BuzzerPinouts.png b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/tutorials/how-buzzer/assets/BuzzerPinouts.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/BuzzerPinouts.png rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/tutorials/how-buzzer/assets/BuzzerPinouts.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/buzzerPA0.gif b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/tutorials/how-buzzer/assets/buzzerPA0.gif similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/buzzerPA0.gif rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/tutorials/how-buzzer/assets/buzzerPA0.gif diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/schematic.png b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/tutorials/how-buzzer/assets/schematic.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buzzer/tutorials/how-buzzer-ardu/assets/schematic.png rename to content/hardware/11.modulino/modulino-nodes/modulino-buzzer/tutorials/how-buzzer/assets/schematic.png diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/tutorials/how-buzzer/content.md b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/tutorials/how-buzzer/content.md new file mode 100644 index 0000000000..4b3bded45f --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/tutorials/how-buzzer/content.md @@ -0,0 +1,340 @@ +--- +title: "Getting Started with Modulino Buzzer" +description: "Complete guide for the Modulino Buzzer audio output module and programming with Arduino and MicroPython." +tags: + - Modulino + - Buzzer + - Audio + - Sound + - QWIIC + - I2C +author: 'Pedro Sousa Lima' +hardware: + - hardware/11.modulinos/modulinos/modulino-buzzer +software: + - ide-v2 + - web-editor + - micropython +--- + +![Buzzer Overview](assets/BuzzerOverview.png) + +The Modulino Buzzer is a modular sensor that generates audio output, making it perfect to add sound feedback to your projects! It uses the standardised Modulino form factor with QWIIC connectors for easy integration. + +## Hardware Overview + +### General Characteristics + +The Modulino Buzzer is based on the PKLCS1212E4001-R1 buzzer, capable of generating different tones and sound patterns. + +| Parameter | Condition | Minimum | Typical | Maximum | Unit | +|----------------------|-----------|---------|---------|---------|------| +| Frequency | - | - | 4,000 | - | Hz | +| Sound Pressure Level | - | 75 | 85 | - | dB | + +### Sensor Details + +The **Modulino Buzzer** module uses the **PKLCS1212E4001-R1** buzzer, which does not have native I²C capabilities. Instead, the buzzer is controlled by the Modulino's onboard microcontroller (STM32C011F4U6T). This microcontroller provides I²C communication, allowing for flexible control of the buzzer. + +One unique feature of this setup is the ability to change the I²C address via software, making it adaptable to different system configurations. + +The default I²C address for the **Modulino Buzzer** module is: + +| Modulino I²C Address | Hardware I²C Address | Editable Addresses (HEX) | +|----------------------|----------------------|--------------------------------------------------| +| 0x3C | 0x1E | Any custom address (via software configuration) | + +### Pinout + +![Modulino Buzzer Pinout](assets/BuzzerPinouts.png) + +#### 1x8 Header + +| Pin | Function | +|--------|-----------------| +| GND | Ground | +| 3V3 | 3.3V Power | +| RESET | Reset | +| SWCLK | SWD Clock | +| SWDIO | SWD Data | +| TX1 | USART Transmit | +| RX1 | USART Receive | +| PA0 | Buzzer | + +**PA0**: This pin can be used to bypass the I²C interface and control the buzzer directly using a square wave. + +![Control through PA0 Pin](assets/buzzerPA0.gif) + +#### 1x4 Header (I2C) + +| Pin | Function | +|-------|--------------| +| GND | Ground | +| 3.3 V | Power Supply | +| SDA | I²C Data | +| SCL | I²C Clock | + +### Power Specifications + +| Parameter | Condition | Typical | Unit | +|---------------------|-----------|---------|------| +| Operating Voltage | - | 3.3 | V | +| Current Consumption | - | ~6.4 | mA | + +The module includes a power LED that draws 1 mA and turns on as soon as it is powered. + +### Schematic + +The Modulino Buzzer features a simple yet effective circuit design for audio generation. + +![Full Schematic Modulino Buzzer](assets/schematic.png) + +The main components are the **PKLCS1212E4001-R1 buzzer** and the **STM32C011F6U6TR** microcontroller (U1), which handles tone generation as well as I²C communication. + +You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, this is the recommended method) or the **solderable pins** (J4). The board runs on **3.3V**, which comes from the QWIIC cable or the **3V3 pin** on J4. + +There's also a small power LED indicator that lights up when the board is on. + +You can grab the full schematic and PCB files from the [Modulino Buzzer page](https://docs.arduino.cc/hardware/modulinos/modulino-buzzer). + +## Programming with Arduino + +The Modulino Buzzer is fully compatible with the Arduino IDE and the official Modulino library. The following examples showcase how to generate tones, create melodies, and add audio feedback to your Arduino projects. + +### Prerequisites + +- Install the Modulino library via the Arduino IDE Library Manager +- Connect your Modulino Buzzer via QWIIC or solderable headers + +For detailed instructions on setting up your Arduino environment and installing libraries, please refer to the [Getting Started with Modulinos guide](./how-general). + +Library repository available [here](https://github.com/arduino-libraries/Arduino_Modulino). + +### Basic Example + +```arduino +#include + +ModulinoBuzzer buzzer; + +int frequency = 440; // Frequency of the tone in Hz +int duration = 1000; // Duration of the tone in milliseconds + +void setup(){ + Modulino.begin(); + buzzer.begin(); +} + +void loop(){ + buzzer.tone(frequency, duration); // Generate the tone + delay(1000); // Wait for 1 second + buzzer.tone(0, duration); // Stop the tone + delay(1000); // Wait for 1 second +} +``` + +### Key Functions + +- `tone(frequency, duration)`: Generates a tone with the specified frequency (in Hz) and duration (in milliseconds) +- Setting frequency to 0 stops the tone + +### Advanced Example - Musical Melody + +```arduino +#include + +ModulinoBuzzer buzzer; + +// Musical notes (frequencies in Hz) +#define NOTE_C4 262 +#define NOTE_D4 294 +#define NOTE_E4 330 +#define NOTE_F4 349 +#define NOTE_G4 392 +#define NOTE_A4 440 +#define NOTE_B4 494 +#define NOTE_C5 523 +#define REST 0 + +// Simple melody: "Twinkle Twinkle Little Star" +int melody[] = { + NOTE_C4, NOTE_C4, NOTE_G4, NOTE_G4, NOTE_A4, NOTE_A4, NOTE_G4, REST, + NOTE_F4, NOTE_F4, NOTE_E4, NOTE_E4, NOTE_D4, NOTE_D4, NOTE_C4, REST +}; + +// Note durations: 4 = quarter note, 8 = eighth note, etc. +int noteDurations[] = { + 4, 4, 4, 4, 4, 4, 2, 4, + 4, 4, 4, 4, 4, 4, 2, 4 +}; + +void setup() { + Serial.begin(9600); + Modulino.begin(); + buzzer.begin(); + + Serial.println("Playing melody..."); + playMelody(); +} + +void playMelody() { + for (int thisNote = 0; thisNote < 16; thisNote++) { + // Calculate the note duration + int noteDuration = 1000 / noteDurations[thisNote]; + + buzzer.tone(melody[thisNote], noteDuration); + + // Pause between notes + int pauseBetweenNotes = noteDuration * 1.30; + delay(pauseBetweenNotes); + + // Stop the tone + buzzer.tone(0, 10); + } +} + +void loop() { + // Play melody every 5 seconds + delay(5000); + playMelody(); +} +``` + +## Programming with MicroPython + +The Modulino Buzzer is fully compatible with MicroPython through the official Modulino MicroPython library. The following examples demonstrate how to generate tones, create sound patterns, and implement audio feedback in your MicroPython projects. + +### Prerequisites + +- Install the Modulino MicroPython library +- Ensure Arduino Lab for MicroPython is installed + +For detailed instructions on setting up your MicroPython environment and installing packages, please refer to the [Getting Started with Modulinos guide](./how-general). + +### Basic Example + +```python +from modulino import ModulinoBuzzer +from time import sleep + +buzzer = ModulinoBuzzer() + +frequency = 440 # Frequency of the tone in Hz +duration = 1000 # Duration of the tone in milliseconds + +# Play the tone +buzzer.tone(frequency, duration, blocking=True) +sleep(1) # Wait for 1 second + +# Stop the tone +buzzer.tone(0, duration, blocking=True) +sleep(1) # Wait for 1 second +``` + +### Key Functions + +- `tone(frequency, duration, blocking)`: Generates a tone with specified frequency and duration + `blocking=True`: Waits for tone to complete before continuing + `blocking=False`: Returns immediately while tone plays + +### Advanced Example - Alarm System + +```python +from modulino import ModulinoBuzzer +from time import sleep + +buzzer = ModulinoBuzzer() + +# Define different alarm patterns +def beep_pattern(): + """Simple beep pattern""" + for _ in range(3): + buzzer.tone(1000, 100, blocking=True) + sleep(0.1) + +def alarm_pattern(): + """Urgent alarm pattern""" + for i in range(5): + frequency = 800 + (i * 100) + buzzer.tone(frequency, 200, blocking=True) + sleep(0.05) + +def siren_pattern(): + """Police siren-like pattern""" + for _ in range(3): + # Rising tone + for freq in range(400, 800, 50): + buzzer.tone(freq, 50, blocking=True) + # Falling tone + for freq in range(800, 400, -50): + buzzer.tone(freq, 50, blocking=True) + +def notification_sound(): + """Pleasant notification sound""" + notes = [523, 659, 784, 1047] # C5, E5, G5, C6 + for note in notes: + buzzer.tone(note, 150, blocking=True) + sleep(0.05) + +def success_sound(): + """Success/completion sound""" + buzzer.tone(523, 100, blocking=True) # C5 + sleep(0.05) + buzzer.tone(659, 100, blocking=True) # E5 + sleep(0.05) + buzzer.tone(784, 200, blocking=True) # G5 + +# Demonstration menu +patterns = { + "1": ("Beep Pattern", beep_pattern), + "2": ("Alarm Pattern", alarm_pattern), + "3": ("Siren Pattern", siren_pattern), + "4": ("Notification", notification_sound), + "5": ("Success Sound", success_sound) +} + +print("🔊 Buzzer Pattern Demo") +print("Select a pattern:") +for key, (name, _) in patterns.items(): + print(f" {key}: {name}") + +while True: + choice = input("\nEnter pattern number (1-5): ") + + if choice in patterns: + name, pattern_func = patterns[choice] + print(f"Playing: {name}") + pattern_func() + print("Done!") + else: + print("Invalid choice. Please enter 1-5.") + + sleep(1) +``` + +## Troubleshooting + +### Buzzer Not Sounding + +If your Modulino's power LED isn't on or the buzzer isn't responsive: +- Ensure both the board and the Modulino are connected properly +- Verify that the power LEDs on both are lit +- Check that the QWIIC cable is properly clicked into place + +### Distorted Sound + +If the buzzer sound is distorted or not playing as expected: +- Verify correct frequency values are being used (typically 20 Hz to 20 kHz for audible sounds) +- Check that exposed electronics are not touching conductive surfaces +- Ensure stable power supply + +## Project Ideas + +- **Simple Alarm System**: Trigger the buzzer when certain conditions are met +- **Music Box**: Play different tunes based on sensor inputs +- **Timer Alert**: Create a pomodoro timer with audio notifications +- **Game Sound Effects**: Add audio feedback to interactive games +- **Morse Code Transmitter**: Send messages using Morse code patterns +- **Parking Sensor**: Combine with Modulino Distance for proximity alerts +- **Temperature Alert**: Use with Modulino Thermo for temperature warnings +- **Interactive Doorbell**: Create custom doorbell melodies \ No newline at end of file diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/tutorials/how-general b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/tutorials/how-general new file mode 120000 index 0000000000..3f77534684 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-buzzer/tutorials/how-general @@ -0,0 +1 @@ +../../modulino-thermo/tutorials/how-general \ No newline at end of file diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-CERT_CE_EMC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-CERT_CE_EMC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-CERT_CE_EMC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-CERT_CE_EMC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-CERT_FCC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-CERT_FCC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-CERT_FCC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-CERT_FCC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-CERT_IC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-CERT_IC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-CERT_IC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-CERT_IC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-CERT_UKCA.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-CERT_UKCA.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-CERT_UKCA.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-CERT_UKCA.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-DoC_CE.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-DoC_CE.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-DoC_CE.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-DoC_CE.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-DoC_FCC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-DoC_FCC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-DoC_FCC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-DoC_FCC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-DoC_UKCA.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-DoC_UKCA.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-DoC_UKCA.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/certifications/Arduino_ABX00102-DoC_UKCA.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/compatibility.yml b/content/hardware/11.modulino/modulino-nodes/modulino-distance/compatibility.yml similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/compatibility.yml rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/compatibility.yml diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/datasheet/assets/BlockDiagramDistance.png b/content/hardware/11.modulino/modulino-nodes/modulino-distance/datasheet/assets/BlockDiagramDistance.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/datasheet/assets/BlockDiagramDistance.png rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/datasheet/assets/BlockDiagramDistance.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/datasheet/assets/DistanceMec.png b/content/hardware/11.modulino/modulino-nodes/modulino-distance/datasheet/assets/DistanceMec.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/datasheet/assets/DistanceMec.png rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/datasheet/assets/DistanceMec.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/datasheet/assets/DistancePinouts.png b/content/hardware/11.modulino/modulino-nodes/modulino-distance/datasheet/assets/DistancePinouts.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/datasheet/assets/DistancePinouts.png rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/datasheet/assets/DistancePinouts.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/datasheet/assets/Modulino_Distance_Power_Tree.png b/content/hardware/11.modulino/modulino-nodes/modulino-distance/datasheet/assets/Modulino_Distance_Power_Tree.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/datasheet/assets/Modulino_Distance_Power_Tree.png rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/datasheet/assets/Modulino_Distance_Power_Tree.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/datasheet/assets/classOneLaserProduct_40.png b/content/hardware/11.modulino/modulino-nodes/modulino-distance/datasheet/assets/classOneLaserProduct_40.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/datasheet/assets/classOneLaserProduct_40.png rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/datasheet/assets/classOneLaserProduct_40.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/datasheet/assets/featuredDist.png b/content/hardware/11.modulino/modulino-nodes/modulino-distance/datasheet/assets/featuredDist.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/datasheet/assets/featuredDist.png rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/datasheet/assets/featuredDist.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/datasheet/datasheet.md b/content/hardware/11.modulino/modulino-nodes/modulino-distance/datasheet/datasheet.md similarity index 97% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/datasheet/datasheet.md rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/datasheet/datasheet.md index 661a550042..c1cb0c2f90 100644 --- a/content/hardware/11.accessories/modulino-nodes/modulino-distance/datasheet/datasheet.md +++ b/content/hardware/11.modulino/modulino-nodes/modulino-distance/datasheet/datasheet.md @@ -41,9 +41,9 @@ Maker, beginner, education ## Related Products -- *SKU: ASX00027* – [Arduino® Sensor Kit](https://store.arduino.cc/products/arduino-sensor-kit) -- *SKU: K000007* – [Arduino® Starter Kit](https://store.arduino.cc/products/arduino-starter-kit-multi-language) -- *SKU: AKX00026* – [Arduino® Oplà IoT Kit](https://store.arduino.cc/products/opla-iot-kit) +- **SKU: ASX00027** – [Arduino® Sensor Kit](https://store.arduino.cc/products/arduino-sensor-kit) +- **SKU: K000007** – [Arduino® Starter Kit](https://store.arduino.cc/products/arduino-starter-kit-multi-language) +- **SKU: AKX00026** – [Arduino® Oplà IoT Kit](https://store.arduino.cc/products/opla-iot-kit) ## Rating diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/downloads/ABX00102-cad-files.zip b/content/hardware/11.modulino/modulino-nodes/modulino-distance/downloads/ABX00102-cad-files.zip similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/downloads/ABX00102-cad-files.zip rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/downloads/ABX00102-cad-files.zip diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/downloads/ABX00102-schematics.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-distance/downloads/ABX00102-schematics.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/downloads/ABX00102-schematics.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/downloads/ABX00102-schematics.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/downloads/ABX00102-step.zip b/content/hardware/11.modulino/modulino-nodes/modulino-distance/downloads/ABX00102-step.zip similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/downloads/ABX00102-step.zip rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/downloads/ABX00102-step.zip diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/essentials.md b/content/hardware/11.modulino/modulino-nodes/modulino-distance/essentials.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/essentials.md rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/essentials.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/features.md b/content/hardware/11.modulino/modulino-nodes/modulino-distance/features.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/features.md rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/features.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/image.svg b/content/hardware/11.modulino/modulino-nodes/modulino-distance/image.svg similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/image.svg rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/image.svg diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/interactive/ABX00102-pinout.png b/content/hardware/11.modulino/modulino-nodes/modulino-distance/interactive/ABX00102-pinout.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/interactive/ABX00102-pinout.png rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/interactive/ABX00102-pinout.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/product.md b/content/hardware/11.modulino/modulino-nodes/modulino-distance/product.md similarity index 83% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/product.md rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/product.md index c99c36391e..585dc52c08 100644 --- a/content/hardware/11.accessories/modulino-nodes/modulino-distance/product.md +++ b/content/hardware/11.modulino/modulino-nodes/modulino-distance/product.md @@ -2,10 +2,10 @@ title: Modulino Distance url_shop: https://store.arduino.cc/products/modulino-distance url_guide: https://courses.arduino.cc/plugandmake -primary_button_url: https://docs.arduino.cc/tutorials/modulino-distance/how-distance-ardu/ -primary_button_title: With Arduino -secondary_button_url: https://docs.arduino.cc/tutorials/modulino-distance/how-distance-mp/ -secondary_button_title: With MicroPython +primary_button_url: https://docs.arduino.cc/tutorials/modulino-distance/how-distance/ +primary_button_title: Get Started +secondary_button_url: https://docs.arduino.cc/tutorials/modulino-thermo/how-general/ +secondary_button_title: More on Modulino Nodes forumCategorySlug: '/hardware/accessories/modulino-distance/216' sku: [ABX00102] --- diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tech-specs.md b/content/hardware/11.modulino/modulino-nodes/modulino-distance/tech-specs.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/tech-specs.md rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/tech-specs.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tech-specs.yml b/content/hardware/11.modulino/modulino-nodes/modulino-distance/tech-specs.yml similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/tech-specs.yml rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/tech-specs.yml diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/DistancePinouts.png b/content/hardware/11.modulino/modulino-nodes/modulino-distance/tutorials/how-distance/assets/DistancePinouts.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/DistancePinouts.png rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/tutorials/how-distance/assets/DistancePinouts.png diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-distance/tutorials/how-distance/assets/distanceOverview.png b/content/hardware/11.modulino/modulino-nodes/modulino-distance/tutorials/how-distance/assets/distanceOverview.png new file mode 100644 index 0000000000..7b3b798588 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-distance/tutorials/how-distance/assets/distanceOverview.png differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/schematic.png b/content/hardware/11.modulino/modulino-nodes/modulino-distance/tutorials/how-distance/assets/schematic.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/assets/schematic.png rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/tutorials/how-distance/assets/schematic.png diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-distance/tutorials/how-distance/content.md b/content/hardware/11.modulino/modulino-nodes/modulino-distance/tutorials/how-distance/content.md new file mode 100644 index 0000000000..4d3825a4dd --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-distance/tutorials/how-distance/content.md @@ -0,0 +1,362 @@ +--- +title: "Getting Started with Modulino Distance" +description: "Complete guide for the Modulino Distance Time-of-Flight sensor module and programming with Arduino and MicroPython." +tags: + - Modulino + - Distance + - ToF + - Sensor + - QWIIC + - I2C +author: 'Pedro Sousa Lima' +hardware: + - hardware/11.modulinos/modulinos/modulino-distance +software: + - ide-v2 + - web-editor + - micropython +--- + +![Distance Overview](assets/distanceOverview.png) + +The Modulino Distance is a modular sensor that measures distance using Time-of-Flight (ToF) technology, making it perfect to add precise distance sensing and depth mapping to your projects! + +## Hardware Overview + +### General Characteristics + +The Modulino Distance is capable of measuring distances using Time-of-Flight technology with the following specifications: + +| Parameter | Condition | Minimum | Typical | Maximum | Unit | +|-----------------------|----------------------|---------|---------|---------|------| +| Range | Distance Measurement | 1 | - | 1300 | mm | +| Resolution | - | - | 1 | - | mm | +| Operating Temperature | - | -30 | - | 85 | °C | + +### Sensor Details + +The VL53L4CDV0DH/1 sensor from STMicroelectronics is the core component of this module. This ToF sensor natively supports digital communication (I²C), meaning it connects directly to the I²C bus on the module without requiring additional conversion circuitry. + +| Parameter | Condition | Minimum | Typical | Maximum | Unit | +|---------------|---------------|---------|---------|---------|------| +| Field of View | - | - | 18 | - | ° | +| Wavelength | Laser Emitter | - | 940 | - | nm | + +The default address for the Module is: + +| Modulino I²C Address | Hardware I²C Address | +|----------------------|----------------------| +| 0x52 | 0x52 | + +***Note: Since the address cannot be changed on this Modulino specifically, using two or more identical modules on the same I²C bus will result in address conflicts and cause communication issues.*** + +### Pinout + +![Modulino Distance Pinout](assets/DistancePinouts.png) + +#### 1x4 Header (Sensor GPIO) + +| Pin | Function | +|-------|----------------| +| GND | Ground | +| 3V3 | 3.3 V Power | +| GPIO1 | Digital Output | +| XSHUT | Xshutdown | + +#### 1x4 Header (I2C) + +| Pin | Function | +|-------|--------------| +| GND | Ground | +| 3.3 V | Power Supply | +| SDA | I²C Data | +| SCL | I²C Clock | + +### Power Specifications + +| Parameter | Condition | Minimum | Typical | Maximum | Unit | +|-----------------------|-------------------------|---------|-------------|---------|------| +| Supply Voltage | - | - | 3.3 (QWIIC) | - | V | +| Current Consumption | Active measurement mode | - | 24 | 40 | mA | +| Operating Temperature | - | -30 | - | 85 | °C | + +The module includes a power LED that draws 1 mA and turns on as soon as it is powered. + +### Schematic + +The Modulino Distance uses a straightforward circuit built around the Time-of-Flight sensor. + +![Full Schematic Modulino Distance](assets/schematic.png) + +The main component is the **VL53L4CDV0DH/1** sensor (U1), which handles distance measurements using Time-of-Flight technology, as well as I²C communication. + +You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, this is the recommended method) or the **solderable pins** (J4). The board runs on **3.3 V**, which comes from the QWIIC cable or the **3V3 pin** on J4. + +There's also a small power indicator LED that lights up when the board is on. + +You can grab the full schematic and PCB files from the [Modulino Distance page](https://docs.arduino.cc/hardware/modulinos/modulino-distance). + +## Programming with Arduino + +The Modulino Distance is fully compatible with the Arduino IDE and the official Modulino library. The following examples showcase how to read distance measurements and implement proximity-based features in your Arduino projects. + +### Prerequisites + +- Install the Modulino library via the Arduino IDE Library Manager +- Connect your Modulino Distance via QWIIC or solderable headers + +For detailed instructions on setting up your Arduino environment and installing libraries, please refer to the [Getting Started with Modulinos guide](./how-general). + +Library repository available [here](https://github.com/arduino-libraries/Arduino_Modulino). + +### Basic Example + +```arduino +#include "Modulino.h" + +// Create object instance +ModulinoDistance distance; + +void setup() { + Serial.begin(9600); + + // Initialize the Modulino system and distance sensor + Modulino.begin(); + distance.begin(); +} + +void loop() { + if (distance.available()) { + int measure = distance.get(); + Serial.println(measure); + } + delay(10); +} +``` + +### Key Functions + +- `available()`: Checks if new distance data is available +- `get()`: Retrieves the measured distance from the sensor (default in cm) + +### Advanced Example - Parking Sensor + +```arduino +#include "Modulino.h" + +ModulinoDistance distance; + +// Distance thresholds in cm +const int DANGER_ZONE = 10; // Less than 10cm +const int WARNING_ZONE = 30; // 10-30cm +const int CAUTION_ZONE = 50; // 30-50cm +const int SAFE_ZONE = 100; // 50-100cm + +void setup() { + Serial.begin(9600); + Modulino.begin(); + distance.begin(); + + Serial.println("Parking Sensor Active"); + Serial.println("==================="); +} + +void loop() { + if (distance.available()) { + int measure = distance.get(); + + // Determine zone and provide feedback + if (measure < DANGER_ZONE) { + Serial.print("🔴 STOP! Distance: "); + Serial.print(measure); + Serial.println(" cm - TOO CLOSE!"); + } + else if (measure < WARNING_ZONE) { + Serial.print("🟠 WARNING - Distance: "); + Serial.print(measure); + Serial.println(" cm - Very close"); + } + else if (measure < CAUTION_ZONE) { + Serial.print("🟡 CAUTION - Distance: "); + Serial.print(measure); + Serial.println(" cm - Getting close"); + } + else if (measure < SAFE_ZONE) { + Serial.print("🟢 SAFE - Distance: "); + Serial.print(measure); + Serial.println(" cm - Good distance"); + } + else { + Serial.print("✓ Clear - Distance: "); + Serial.print(measure); + Serial.println(" cm"); + } + } + + delay(100); // Update 10 times per second +} +``` + +## Programming with MicroPython + +The Modulino Distance is fully compatible with MicroPython through the official Modulino MicroPython library. The following examples demonstrate how to read distance measurements and create proximity-activated systems in your MicroPython projects. + +### Prerequisites + +- Install the Modulino MicroPython library +- Ensure Arduino Lab for MicroPython is installed + +For detailed instructions on setting up your MicroPython environment and installing packages, please refer to the [Getting Started with Modulinos guide](./how-general). + +### Basic Example + +```python +from modulino import ModulinoDistance +from time import sleep_ms + +distance = ModulinoDistance() + +while True: + print(f"📏 Distance: {distance.distance} cm") + sleep_ms(50) +``` + +### Key Properties + +- `.distance`: Provides the distance measurement from the sensor (default in cm) + +### Advanced Example - Proximity-Activated System + +```python +from modulino import ModulinoDistance +from time import sleep, ticks_ms + +distance = ModulinoDistance() + +# Configuration +ACTIVATION_DISTANCE = 20 # cm +DEACTIVATION_DISTANCE = 30 # cm +DEBOUNCE_TIME = 500 # milliseconds + +# State tracking +is_activated = False +last_activation_time = 0 +activation_count = 0 + +def check_proximity(): + """Check distance and manage activation state""" + global is_activated, last_activation_time, activation_count + + current_distance = distance.distance + current_time = ticks_ms() + + # Check if we should activate + if not is_activated and current_distance < ACTIVATION_DISTANCE: + # Debounce check + if current_time - last_activation_time > DEBOUNCE_TIME: + is_activated = True + activation_count += 1 + last_activation_time = current_time + print(f"\n✋ ACTIVATED! Object detected at {current_distance} cm") + print(f" Activation count: {activation_count}") + return True + + # Check if we should deactivate + elif is_activated and current_distance > DEACTIVATION_DISTANCE: + is_activated = False + duration = (current_time - last_activation_time) / 1000 + print(f"\n👋 DEACTIVATED after {duration:.1f} seconds") + return False + + return is_activated + +def hand_wave_detector(): + """Detect hand wave gestures""" + samples = [] + sample_time = 50 # ms + wave_threshold = 5 # minimum changes + + print("\nWave your hand in front of the sensor...") + + for _ in range(20): # Collect 1 second of samples + samples.append(distance.distance) + sleep(sample_time / 1000) + + # Detect changes in distance + changes = 0 + for i in range(1, len(samples)): + if abs(samples[i] - samples[i-1]) > 5: # 5cm change threshold + changes += 1 + + if changes >= wave_threshold: + print(f"👋 Wave detected! ({changes} movements)") + return True + + return False + +# Menu system +print("🎯 Distance Sensor Applications") +print("1. Proximity Activation Demo") +print("2. Hand Wave Detection") +print("3. Distance Monitor") + +while True: + choice = input("\nSelect mode (1-3): ") + + if choice == "1": + print(f"\nProximity activation mode") + print(f"Activation: < {ACTIVATION_DISTANCE} cm") + print(f"Deactivation: > {DEACTIVATION_DISTANCE} cm") + + while True: + activated = check_proximity() + if activated: + print(f" Status: ACTIVE | Distance: {distance.distance} cm", end='\r') + else: + print(f" Status: IDLE | Distance: {distance.distance} cm", end='\r') + sleep(0.1) + + elif choice == "2": + print("\nHand wave detection mode") + while True: + if hand_wave_detector(): + print(" Action triggered by wave!") + sleep(0.5) + + elif choice == "3": + print("\nDistance monitoring mode") + while True: + d = distance.distance + # Create visual bar graph + bar_length = min(d // 2, 50) # Scale to max 50 characters + bar = "█" * bar_length + print(f"Distance: {d:4d} cm |{bar}", end='\r') + sleep(0.05) +``` + +## Troubleshooting + +### Sensor Not Reachable + +If your Modulino's power LED isn't on or the sensor isn't responsive: +- Ensure both the board and the Modulino are connected properly +- Verify that the power LEDs on both are lit +- Check that the QWIIC cable is properly clicked into place + +### Inaccurate Values + +If the sensor values are not accurate: +- Ensure the sensor lens is clean and free from dust or obstructions +- Verify the object being measured is within the sensor's detection range +- Check that exposed electronics are not touching conductive surfaces + +## Project Ideas + +- **Parking Assistance System**: Provide audio feedback as objects get closer +- **Theremin Musical Instrument**: Change pitch based on hand movements +- **Automatic Dispenser**: Activate when hands are detected +- **Security System**: Detect when someone approaches a protected area +- **Liquid Level Monitor**: Measure distance to liquid surface in a tank +- **Robot Obstacle Avoidance**: Help robots navigate around objects +- **Interactive Art Installation**: Trigger effects based on viewer proximity +- **Smart Trash Can**: Automatically open lid when someone approaches \ No newline at end of file diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/image.png b/content/hardware/11.modulino/modulino-nodes/modulino-distance/tutorials/how-distance/image.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/image.png rename to content/hardware/11.modulino/modulino-nodes/modulino-distance/tutorials/how-distance/image.png diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-distance/tutorials/how-general b/content/hardware/11.modulino/modulino-nodes/modulino-distance/tutorials/how-general new file mode 120000 index 0000000000..3f77534684 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-distance/tutorials/how-general @@ -0,0 +1 @@ +../../modulino-thermo/tutorials/how-general \ No newline at end of file diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/compatibility.yml b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/compatibility.yml new file mode 100644 index 0000000000..f0008fc25d --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/compatibility.yml @@ -0,0 +1,17 @@ +software: + - arduino-ide + - arduino-cli + - web-editor +hardware: + boards: + - nano-33-iot + - nano-33-ble + - nano-33-ble-sense + - nano-rp2040-connect + - nano-esp32 + - nano-matter + - uno-r4-wifi + - uno-q + shields: ~ + carriers: + - nano-connector-carrier diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/GenMech.png b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/GenMech.png new file mode 100644 index 0000000000..809a8d6213 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/GenMech.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/I2CTag.png b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/I2CTag.png new file mode 100644 index 0000000000..5e290c908a Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/I2CTag.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/JoyMec.png b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/JoyMec.png new file mode 100644 index 0000000000..715de08195 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/JoyMec.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/JoystickPinout.png b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/JoystickPinout.png new file mode 100644 index 0000000000..7ae139c6a4 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/JoystickPinout.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/Modulino_Joystick_Block_Diagram.png b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/Modulino_Joystick_Block_Diagram.png new file mode 100644 index 0000000000..61a5f6e99d Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/Modulino_Joystick_Block_Diagram.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/Modulino_Joystick_Power_Tree.png b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/Modulino_Joystick_Power_Tree.png new file mode 100644 index 0000000000..cbf5e90dc5 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/Modulino_Joystick_Power_Tree.png differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/datasheet/assets/ResistorsPullupGen.png b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/ResistorsPullupGen.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/datasheet/assets/ResistorsPullupGen.png rename to content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/ResistorsPullupGen.png diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/featured.png b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/featured.png new file mode 100644 index 0000000000..b68f8fa253 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/assets/featured.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/datasheet.md b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/datasheet.md new file mode 100644 index 0000000000..f37e016933 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/datasheet/datasheet.md @@ -0,0 +1,242 @@ +--- +identifier: ABX00135 +title: Arduino® Modulino® Joystick +type: maker +author: Pedro Sousa Lima +--- + +![](assets/featured.png) + +# Description + +The Arduino® Modulino Joystick features a FJN10K-S1B10KD0N analogue joystick with an integrated pushbutton, powered by an on-board STM32C011F4 microcontroller. This dual-axis input device with centre-click functionality enables precise directional control and user interaction for gaming, robotics, and interface applications. + +# Target Areas + +Maker, beginner, education + +# Contents +## Application Examples + +- **Gaming Controllers** + Create custom game controllers or remote control interfaces with precise analogue input and pushbutton functionality for enhanced gaming experiences. + +- **Robotics Control** + Control robot movement, camera positioning, or servo motors with smooth analogue input across horizontal and vertical axes for precise control. + +- **Interactive Interfaces** + Design menu navigation systems, parameter adjustment interfaces, or interactive art installations with intuitive joystick-based user input. + +
+ +## Features +- **Analogue joystick** (FJN10K-S1B10KD0N) with dual-axis control and integrated pushbutton. +- **60° movement angle** providing smooth analogue control across both horizontal and vertical axes. +- Integrated **STM32C011F4** microcontroller providing I2C interface by default. +- **Optional SWD** interface for custom firmware and advanced features. +- Designed for **3.3V** operation via the Qwiic connector (I2C). +- **Breadboard compatible** with 900mil header spacing for prototyping. + +### Contents +| **SKU** | **Name** | **Purpose** | **Quantity** | +| ---------- | --------------------- | -------------------------------------- | ------------ | +| ABX00135 | Modulino® Joystick | Dual-axis analogue joystick with button | 1 | +| | I2C Qwiic cable | Compatible with the Qwiic standard | 1 | + +## Related Products +- *SKU: ASX00027* - [Arduino® Sensor Kit](https://store.arduino.cc/products/arduino-sensor-kit) +- *SKU: K000007* - [Arduino® Starter Kit](https://store.arduino.cc/products/arduino-starter-kit-multi-language) +- *SKU: AKX00026* - [Arduino® Oplà IoT Kit](https://store.arduino.cc/products/opla-iot-kit) +- *SKU: AKX00069* - [Arduino® Plug and Make Kit](https://store.arduino.cc/products/plug-and-make-kit) + +## Rating + +### Recommended Operating Conditions +- **Powered at 3.3 V** through the Qwiic interface (in accordance with the Qwiic standard) +- **Operating temperature:** -40 °C to +85 °C + +**Typical current consumption:** +- Microcontroller + joystick: ~3.4 mA + +## Power Tree +The power tree for the Modulino® node can be consulted below: + +![Modulino® Joystick Power Tree](assets/Modulino_Joystick_Power_Tree.png) + +## Block Diagram +This module includes an STM32C011F4 microcontroller that reads the analogue joystick potentiometers for horizontal and vertical axes, plus the integrated pushbutton. It communicates via I2C by default, but can be reprogrammed via SWD for custom functionality. + +![Modulino® Joystick Block Diagram](assets/Modulino_Joystick_Block_Diagram.png) + +## Functional Overview +The Modulino® Joystick reads the FJN10K-S1B10KD0N analogue joystick's dual potentiometers (horizontal and vertical axes) and the integrated pushbutton state. The STM32C011F4 microcontroller processes these analogue signals and provides digital values via I2C. The joystick offers 60° movement range in both directions with smooth analogue control and reliable centre positioning. + +### Technical Specifications (Module-Specific) +| **Specification** | **Details** | +| ----------------------- | ----------------------------------------------- | +| **Microcontroller** | STM32C011F4 | +| **Joystick Model** | FJN10K-S1B10KD0N | +| **Movement Range** | 60° in both horizontal and vertical axes | +| **Pushbutton** | Integrated centre-click button | +| **Supply Voltage** | Rec: 3.3 V | +| **Power Consumption** | ~3.4 mA (microcontroller + joystick) | +| **Resolution** | 12-bit ADC for both axes | +| **Communication** | I2C (Qwiic), SWD (reprogramming), UART (option) | + +### Pinout + +**Qwiic / I2C (1×4 Header)** +| **Pin** | **Function** | +|---------|---------------------------| +| GND | Ground | +| 3.3 V | Power Supply (3.3 V) | +| SDA | I2C Data | +| SCL | I2C Clock | + +These pads and the Qwiic connectors share the same I2C bus at 3.3 V. + +**Additional 1×4 Header (MCU Debug Signals)** +| **Pin** | **Function** | +|---------|-------------------| +| PF2 | RESET (NRST) | +| SWCLK | SWD Clock (PA14) | +| SWDIO | SWD Data (PA13) | +| TX1 | USART Transmit (PA9) | + +**1×4 Header (Joystick & MCU Signals)** +| **Pin** | **Function** | +|---------|---------------------------| +| RX1 | USART Receive (PA10) | +| PA0 | Joystick Horizontal Axis | +| PA1 | Joystick Vertical Axis | +| PA2 | Joystick Pushbutton | + +**Note:** The board is breadboard compatible with 1×4 headers spaced by 900 mil (22.86 mm). The joystick axes provide analogue values from 0-4095 (12-bit resolution), with centre position at approximately 2048. + +![Pinout Overview](assets/JoystickPinout.png) + +### Power Specifications +- **Nominal operating voltage:** 3.3 V via Qwiic + +### Mechanical Information +![Modulino® Joystick Mechanical Information](assets/JoyMec.png) + +- Board dimensions: 41 mm × 25.36 mm +- Thickness: 1.6 mm (±0.2 mm) +- Four mounting holes (⌀ 3.2 mm) + - Hole spacing: 16 mm vertically, 32 mm horizontally +- **Breadboard compatible:** 1×4 headers spaced by 900 mil (22.86 mm) + +![Modulino® Node Shape](assets/GenMech.png) + +### I2C Address Reference +| **Board Silk Name** | **Sensor/Actuator** | **Modulino® I2C Address (HEX)** | **Editable Addresses (HEX)** | **Hardware I2C Address (HEX)** | +|---------------------|-------------------------|--------------------------------|---------------------------------------------|--------------------------------| +| MODULINO JOYSTICK | Analogue Joystick + MCU | 0x40 | Any custom address (via software config.) | 0x20 | + + **Note:** + - Default I2C address is **0x40**. + - A white rectangle on the bottom silk allows users to write a new address after reconfiguration. + ![Blank silk for identification](assets/I2CTag.png) + +#### Pull-up Resistors + +This module has pads for optional I2C pull-up mounting in both data lines. No resistors are mounted by default but in case the resistors are needed 4.7 K resistors in an SMD 0402 format are recommended. + +These are positioned near the Qwiic connector on the power LED side. +![Generic pull-up resistor position](assets/ResistorsPullupGen.png) + +## Device Operation +By default, the board is an I2C target device. It continuously monitors the joystick's horizontal and vertical potentiometers plus the pushbutton state, providing digital values via I2C registers. The joystick returns to centre position when released, with values ranging from 0-4095 for each axis. Simply connect it to a 3.3 V Qwiic interface and read the axis positions and button state via I2C. + +### Getting Started +Use any standard Arduino workflow-desktop IDE or Arduino Cloud Editor. The official Modulino library provides simple functions to read joystick X/Y coordinates and button state. The joystick values are automatically centred and scaled for easy use in gaming or control applications. + +### Joystick Output Values +- **Horizontal Axis (X):** 0-4095 (left to right), centre ≈ 2048 +- **Vertical Axis (Y):** 0-4095 (down to up), centre ≈ 2048 +- **Pushbutton:** Boolean state (pressed/released) +- **Centre Position:** Joystick returns to centre when released + +# Certifications + +## Certifications Summary + +| **Certification** | **Status** | +|:-----------------:|:----------:| +| CE/RED (Europe) | Yes | +| UKCA (UK) | Yes | +| FCC (USA) | Yes | +| IC (Canada) | Yes | +| RoHS | Yes | +| REACH | Yes | +| WEEE | Yes | + +## 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).

+ +## 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.

+ +| Substance | **Maximum limit (ppm)** | +|----------------------------------------|-------------------------| +| Lead (Pb) | 1000 | +| Cadmium (Cd) | 100 | +| Mercury (Hg) | 1000 | +| Hexavalent Chromium (Cr6+) | 1000 | +| Poly Brominated Biphenyls (PBB) | 1000 | +| Poly Brominated Diphenyl ethers (PBDE) | 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), 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.

+ +## FCC WARNING + +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, and (2) this device must accept any interference received, including interference that may cause undesired operation. + +## IC Caution + +This device complies with Industry Canada licence-exempt RSS standard(s). + +Operation is subject to the following two conditions: + +(1) This device may not cause interference, and (2) this device must accept any interference, including interference that may cause undesired operation of the device. + +## Conflict Minerals Declaration + +

As a global supplier of electronic and electrical components, Arduino is aware of our obligations with regard 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.

+ +# Company Information + +| Company name | Arduino SRL | +|-----------------|-----------------------------------------------| +| Company Address | Via Andrea Appiani, 25 - 20900 MONZA(Italy) | + +# Reference Documentation + +| Ref | Link | +| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Arduino IDE (Desktop) | [https://www.arduino.cc/en/software/](https://www.arduino.cc/en/software/) | +| Arduino Courses | [https://www.arduino.cc/education/courses](https://www.arduino.cc/education/courses) | +| Arduino Documentation | [https://docs.arduino.cc/](https://docs.arduino.cc/) | +| Arduino IDE (Cloud) | [https://create.arduino.cc/editor](https://create.arduino.cc/editor) | +| Cloud IDE Getting Started | [https://docs.arduino.cc/cloud/web-editor/tutorials/getting-started/getting-started-web-editor](https://docs.arduino.cc/cloud/web-editor/tutorials/getting-started/getting-started-web-editor) | +| Project Hub | [https://projecthub.arduino.cc/](https://projecthub.arduino.cc/) | +| Library Reference | [https://github.com/arduino-libraries/](https://github.com/arduino-libraries/) | +| Online Store | [https://store.arduino.cc/](https://store.arduino.cc/) | + +# Revision History +| **Date** | **Revision** | **Changes** | +|------------|--------------|-----------------------------------| +| 14/10/2025 | 1 | First release | \ No newline at end of file diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/downloads/ABX00135-cad-files.zip b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/downloads/ABX00135-cad-files.zip new file mode 100644 index 0000000000..0f47356dfa Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/downloads/ABX00135-cad-files.zip differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/downloads/ABX00135-schematics.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/downloads/ABX00135-schematics.pdf new file mode 100644 index 0000000000..22b6f02645 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/downloads/ABX00135-schematics.pdf differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/downloads/ABX00135-step.zip b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/downloads/ABX00135-step.zip new file mode 100644 index 0000000000..b953f3b985 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/downloads/ABX00135-step.zip differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/essentials.md b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/essentials.md new file mode 100644 index 0000000000..c61bcb5a56 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/essentials.md @@ -0,0 +1,11 @@ + + + +This library allows you to communicate with the Arduino Modulino® nodes. + + + +This library allows you to communicate with the Arduino Modulino® nodes in MicroPython. + + + diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/features.md b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/features.md new file mode 100644 index 0000000000..5898d96eaa --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/features.md @@ -0,0 +1,14 @@ + +The Modulino® Joystick module features a dual-axis analogue joystick with an integrated pushbutton, perfect for gaming, robotics control, and interactive interfaces. It is designed to be used with any compatible board with Qwiic, allowing you to build interactive projects without making complicated connections. The module also includes example projects for you to learn important programming concepts and get inspired. + + + + + +This module provides smooth analogue control across both horizontal and vertical axes with a 60° movement range, perfect for gaming controllers and robotics navigation. + + +The Modulino® Joystick module connects to your UNO R4 WiFi with Qwiic cables, letting you focus on learning programming without building complex circuits. + + + diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/image.svg b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/image.svg new file mode 100644 index 0000000000..e5a538fd00 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/image.svg @@ -0,0 +1,426 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/product.md b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/product.md new file mode 100644 index 0000000000..4d0ef49dad --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/product.md @@ -0,0 +1,13 @@ +--- +title: Modulino Joystick +url_shop: https://store.arduino.cc/products/modulino-joystick +url_guide: https://courses.arduino.cc/plugandmake +primary_button_url: https://docs.arduino.cc/tutorials/modulino-joystick/how-joystick/ +primary_button_title: Get Started +secondary_button_url: https://docs.arduino.cc/tutorials/modulino-thermo/how-general/ +secondary_button_title: More on Modulino Nodes +forumCategorySlug: '/hardware/accessories/213' +sku: [ABX00135] +--- + +A dual-axis analogue joystick with integrated pushbutton for precise directional control. Perfect for gaming controllers, robotics navigation, or interactive interfaces. Compatible with Arduino UNO R4 WiFi or any Qwiic-enabled board, with solderable pins available for custom wiring. Get smooth, responsive control without complex circuitry. diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/tech-specs.md b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/tech-specs.md new file mode 100644 index 0000000000..0c19b9f9bb --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/tech-specs.md @@ -0,0 +1 @@ +Here you will find the technical specifications for the Modulino® Joystick. diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/tech-specs.yml b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/tech-specs.yml new file mode 100644 index 0000000000..7b4e56a0ec --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/tech-specs.yml @@ -0,0 +1,11 @@ +Node: + Name: Modulino Joystick + SKU: ABX00135 + Board recommended: Arduino® UNO R4 WiFi (ABX00087) and Arduino® UNO Q (ABX00162) + Communications: I2C (over Qwiic connector or solderable pin) + Operational voltage: 3.3V + Sensor: + Analogue Joystick (FJN10K-S1B10KD0N) with STM32C011F4: 0x40 (address can change via software) + +Other accessories: + Qwiic cables: 1x diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/tutorials/how-general b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/tutorials/how-general new file mode 120000 index 0000000000..3f77534684 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/tutorials/how-general @@ -0,0 +1 @@ +../../modulino-thermo/tutorials/how-general \ No newline at end of file diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/tutorials/how-joystick/assets/JoystickOverview.png b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/tutorials/how-joystick/assets/JoystickOverview.png new file mode 100644 index 0000000000..20fa5b2a17 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/tutorials/how-joystick/assets/JoystickOverview.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/tutorials/how-joystick/assets/JoystickPinout.png b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/tutorials/how-joystick/assets/JoystickPinout.png new file mode 100644 index 0000000000..7ae139c6a4 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/tutorials/how-joystick/assets/JoystickPinout.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-joystick/tutorials/how-joystick/how-joystick.md b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/tutorials/how-joystick/how-joystick.md new file mode 100644 index 0000000000..3f5e926d1b --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-joystick/tutorials/how-joystick/how-joystick.md @@ -0,0 +1,322 @@ +--- +title: "Getting Started with Modulino Joystick" +description: "Complete guide for the Modulino Joystick input module and programming with Arduino and MicroPython." +tags: + - Modulino + - Joystick + - Input + - Control + - QWIIC + - I2C +author: 'Pedro Sousa Lima' +hardware: + - hardware/11.modulinos/modulinos/modulino-joystick +software: + - ide-v2 + - web-editor + - micropython +--- + +![Joystick Overview](assets/JoystickOverview.png) + +The Modulino Joystick is a modular input device that provides two-axis analogue control with an integrated push button, making it perfect to add intuitive directional input to your projects! It uses the standardised Modulino form factor with QWIIC connectors for easy integration. + +## Hardware Overview + +### General Characteristics + +The Modulino Joystick features a two-axis analogue joystick with push button functionality: + +| Parameter | Condition | Minimum | Typical | Maximum | Unit | +|-----------|-----------|---------|---------|---------|------| +| X-Axis Range | - | 0 | 2048 | 4095 | - | +| Y-Axis Range | - | 0 | 2048 | 4095 | - | +| Resolution | - | - | 12 | - | bit | + +### Sensor Details + +The **Modulino Joystick** module features an analogue joystick with two potentiometers (horizontal and vertical axes) and an integrated push button. The joystick does not have native I²C capabilities. Instead, the readings are processed by the Modulino's onboard microcontroller (STM32C011F4), which provides I²C communication. + +One unique feature of this setup is the ability to change the I²C address via software, making it adaptable to different system configurations. + +The default I²C address for the **Modulino Joystick** module is: + +| Modulino I²C Address | Hardware I²C Address | Editable Addresses (HEX) | +|----------------------|----------------------|--------------------------------------------------| +| 0x40 | 0x20 | Any custom address (via software configuration) | + +### Pinout + +![Modulino Joystick Pinout](assets/JoystickPinout.png) + +**Qwiic / I2C (1×4 Header)** +| **Pin** | **Function** | +|---------|---------------------------| +| GND | Ground | +| 3.3 V | Power Supply (3.3 V) | +| SDA | I2C Data | +| SCL | I2C Clock | + +These pads and the Qwiic connectors share the same I2C bus at 3.3 V. + +**Additional 1×4 Header (MCU Debug Signals)** +| **Pin** | **Function** | +|---------|-------------------| +| PF2 | RESET (NRST) | +| SWCLK | SWD Clock (PA14) | +| SWDIO | SWD Data (PA13) | +| TX1 | USART Transmit (PA9) | + +**1×4 Header (Joystick & MCU Signals)** +| **Pin** | **Function** | +|---------|---------------------------| +| RX1 | USART Receive (PA10) | +| PA0 | Joystick Horizontal Axis | +| PA1 | Joystick Vertical Axis | +| PA2 | Joystick Pushbutton | + +**Note:** The board is breadboard compatible with 1×4 headers spaced by 900 mil (22.86 mm). The joystick axes provide analogue values from 0-4095 (12-bit resolution), with centre position at approximately 2048. + +### Power Specifications + +| Parameter | Condition | Typical | Unit | +|---------------------|-----------|---------|------| +| Operating Voltage | - | 3.3 | V | +| Current Consumption | - | ~3.4 | mA | + +The module includes a power LED that draws 1 mA and turns on as soon as it is powered. + +### Schematic + +The Modulino Joystick features an analogue joystick controlled through a microcontroller for I²C communication. + +The main components are the analogue joystick with two potentiometers and the **STM32C011F4** microcontroller (U1), which reads the analogue values and handles I²C communication. + +You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, this is the recommended method) or the **solderable pins** (J4). The board runs on **3.3V**, which comes from the QWIIC cable or the **3V3 pin** on J4. + +There's also a small power LED indicator that lights up when the board is on. + +You can grab the full schematic and PCB files from the [Modulino Joystick page](https://docs.arduino.cc/hardware/modulinos/modulino-joystick). + +## Programming with Arduino + +The Modulino Joystick is fully compatible with the Arduino IDE and the official Modulino library. The following examples showcase how to read joystick position and button state for gaming and control applications. + +### Prerequisites + +- Install the Modulino library via the Arduino IDE Library Manager +- Connect your Modulino Joystick via QWIIC or solderable headers + +For detailed instructions on setting up your Arduino environment and installing libraries, please refer to the [Getting Started with Modulinos guide](../how-general). + +Library repository available [here](https://github.com/arduino-libraries/Arduino_Modulino). + +### Basic Example + +```arduino +#include + +ModulinoJoystick joystick; + +void setup() { + Serial.begin(9600); + Modulino.begin(); + joystick.begin(); +} + +void loop() { + // Update joystick readings + if (joystick.update()) { + // Read X and Y axes (range: -128 to 127) + int8_t x = joystick.getX(); + int8_t y = joystick.getY(); + + // Check button state + bool pressed = joystick.isPressed(); + + // Display readings + Serial.print("X: "); + Serial.print(x); + Serial.print("\tY: "); + Serial.print(y); + Serial.print("\tButton: "); + Serial.println(pressed ? "PRESSED" : "Released"); + } + + delay(50); +} +``` + +### Key Functions + +- `update()`: Updates joystick state, returns `true` if values changed +- `getX()`: Returns horizontal position (-128 to 127, centre = 0) +- `getY()`: Returns vertical position (-128 to 127, centre = 0) +- `isPressed()`: Returns button state (`HIGH` when pressed) +- `setDeadZone(threshold)`: Sets the centre dead zone threshold (default 26) + +### Advanced Example - Direction Detection + +```arduino +#include + +ModulinoJoystick joystick; + +// Movement thresholds +const int8_t MOVE_THRESHOLD = 50; + +void setup() { + Serial.begin(9600); + Modulino.begin(); + joystick.begin(); + + // Set custom dead zone (smaller = more sensitive) + joystick.setDeadZone(20); + + Serial.println("Joystick Direction Detector"); +} + +void loop() { + if (joystick.update()) { + int8_t x = joystick.getX(); + int8_t y = joystick.getY(); + bool button = joystick.isPressed(); + + // Determine direction + String direction = "CENTRE"; + + if (y > MOVE_THRESHOLD) { + direction = "DOWN"; + } else if (y < -MOVE_THRESHOLD) { + direction = "UP"; + } + + if (x > MOVE_THRESHOLD) { + direction += (direction == "CENTRE") ? "RIGHT" : " RIGHT"; + } else if (x < -MOVE_THRESHOLD) { + direction += (direction == "CENTRE") ? "LEFT" : " LEFT"; + } + + // Display state + Serial.print("Direction: "); + Serial.print(direction); + + if (button) { + Serial.println(" [ACTION!]"); + } else { + Serial.println(); + } + } + + delay(50); +} +``` + +## Programming with MicroPython + +The Modulino Joystick is fully compatible with MicroPython through the official Modulino MicroPython library. The following examples demonstrate how to read joystick position and button state in your MicroPython projects. + +### Prerequisites + +- Install the Modulino MicroPython library (see [Getting Started with Modulinos](./how-general) for detailed instructions) +- Ensure Arduino Lab for MicroPython is installed + +### Basic Example + +```python +from modulino import ModulinoJoystick +from time import sleep + +joystick = ModulinoJoystick() + +while True: + x = joystick.x + y = joystick.y + pressed = joystick.is_pressed + + if x is not None and y is not None: + print(f"X: {x:4d} Y: {y:4d} Button: {'PRESSED' if pressed else 'Released'}") + + sleep(0.1) +``` + +### Key Properties + +- `.x`: Returns horizontal position (-128 to 127, centre = 0) +- `.y`: Returns vertical position (-128 to 127, centre = 0) +- `.is_pressed`: Returns button state (True when pressed) + +### Advanced Example - Game Controller + +```python +from modulino import ModulinoJoystick +from time import sleep + +joystick = ModulinoJoystick() + +MOVE_THRESHOLD = 50 + +def get_direction(x, y): + """Determine joystick direction""" + direction = "CENTRE" + + if y > MOVE_THRESHOLD: + direction = "DOWN" + elif y < -MOVE_THRESHOLD: + direction = "UP" + + if x > MOVE_THRESHOLD: + direction += " RIGHT" if direction == "CENTRE" else " RIGHT" + elif x < -MOVE_THRESHOLD: + direction += " LEFT" if direction == "CENTRE" else " LEFT" + + return direction + +print("🎮 Game Controller Ready") +print("Move joystick to control") + +while True: + x = joystick.x + y = joystick.y + pressed = joystick.is_pressed + + if x is not None and y is not None: + direction = get_direction(x, y) + action = " [ACTION!]" if pressed else "" + print(f"Direction: {direction:15s}{action}") + + sleep(0.1) +``` + +## Troubleshooting + +### Sensor Not Reachable + +If your Modulino's power LED isn't on or the sensor isn't responsive: +- Ensure both the board and the Modulino are connected to your computer +- Verify that the power LEDs on both are lit +- Check that the QWIIC cable is properly clicked into place + +### Inaccurate Values + +If the joystick values are not centred or accurate: +- Allow the joystick to self-centre (release it completely) +- Adjust the dead zone using `setDeadZone()` if needed +- Ensure the module is on a stable surface + +### Library Issues + +See the [Getting Started with Modulinos](./how-general) guide for library installation troubleshooting. + +## Project Ideas + +Now that you've learned how to use your Modulino Joystick, try these projects: + +- **Robot Controller**: Control a wheeled robot with intuitive directional input +- **Game Console**: Build retro-style games with joystick control +- **Camera Pan/Tilt**: Control servo motors for camera movement +- **Drone Controller**: Create a ground station for RC vehicles +- **Menu Navigation**: Navigate through LCD menu systems +- **Drawing Pad**: Control cursor position for digital art applications +- **Lighting Control**: Adjust RGB LED colours by moving the joystick +- **Mechanical Arm**: Control robotic arm positioning diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-CERT_CE_EMC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-CERT_CE_EMC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-CERT_CE_EMC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-CERT_CE_EMC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-CERT_FCC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-CERT_FCC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-CERT_FCC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-CERT_FCC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-CERT_IC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-CERT_IC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-CERT_IC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-CERT_IC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-CERT_UKCA.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-CERT_UKCA.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-CERT_UKCA.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-CERT_UKCA.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-DoC_CE.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-DoC_CE.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-DoC_CE.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-DoC_CE.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-DoC_FCC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-DoC_FCC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-DoC_FCC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-DoC_FCC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-DoC_UKCA.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-DoC_UKCA.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-DoC_UKCA.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/certifications/Arduino_ABX00107-DoC_UKCA.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/compatibility.yml b/content/hardware/11.modulino/modulino-nodes/modulino-knob/compatibility.yml similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/compatibility.yml rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/compatibility.yml diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/datasheet/assets/BlockDiagramKnob.png b/content/hardware/11.modulino/modulino-nodes/modulino-knob/datasheet/assets/BlockDiagramKnob.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/datasheet/assets/BlockDiagramKnob.png rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/datasheet/assets/BlockDiagramKnob.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/datasheet/assets/I2CTag.png b/content/hardware/11.modulino/modulino-nodes/modulino-knob/datasheet/assets/I2CTag.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/datasheet/assets/I2CTag.png rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/datasheet/assets/I2CTag.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/datasheet/assets/KnobMec.png b/content/hardware/11.modulino/modulino-nodes/modulino-knob/datasheet/assets/KnobMec.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/datasheet/assets/KnobMec.png rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/datasheet/assets/KnobMec.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/datasheet/assets/KnobPinouts.png b/content/hardware/11.modulino/modulino-nodes/modulino-knob/datasheet/assets/KnobPinouts.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/datasheet/assets/KnobPinouts.png rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/datasheet/assets/KnobPinouts.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/datasheet/assets/Modulino_Knob_Power_Tree.png b/content/hardware/11.modulino/modulino-nodes/modulino-knob/datasheet/assets/Modulino_Knob_Power_Tree.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/datasheet/assets/Modulino_Knob_Power_Tree.png rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/datasheet/assets/Modulino_Knob_Power_Tree.png diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-knob/datasheet/assets/ResistorsPullupGen.png b/content/hardware/11.modulino/modulino-nodes/modulino-knob/datasheet/assets/ResistorsPullupGen.png new file mode 100644 index 0000000000..7095581413 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-knob/datasheet/assets/ResistorsPullupGen.png differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/datasheet/assets/featuredKnob.png b/content/hardware/11.modulino/modulino-nodes/modulino-knob/datasheet/assets/featuredKnob.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/datasheet/assets/featuredKnob.png rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/datasheet/assets/featuredKnob.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/datasheet/datasheet.md b/content/hardware/11.modulino/modulino-nodes/modulino-knob/datasheet/datasheet.md similarity index 97% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/datasheet/datasheet.md rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/datasheet/datasheet.md index cfd87a3847..4122a745f5 100644 --- a/content/hardware/11.accessories/modulino-nodes/modulino-knob/datasheet/datasheet.md +++ b/content/hardware/11.modulino/modulino-nodes/modulino-knob/datasheet/datasheet.md @@ -43,9 +43,9 @@ Maker, beginner, education ## Related Products -- *SKU: ASX00027* – [Arduino® Sensor Kit](https://store.arduino.cc/products/arduino-sensor-kit) -- *SKU: K000007* – [Arduino® Starter Kit](https://store.arduino.cc/products/arduino-starter-kit-multi-language) -- *SKU: AKX00026* – [Arduino® Oplà IoT Kit](https://store.arduino.cc/products/opla-iot-kit) +- **SKU: ASX00027** – [Arduino® Sensor Kit](https://store.arduino.cc/products/arduino-sensor-kit) +- **SKU: K000007** – [Arduino® Starter Kit](https://store.arduino.cc/products/arduino-starter-kit-multi-language) +- **SKU: AKX00026** – [Arduino® Oplà IoT Kit](https://store.arduino.cc/products/opla-iot-kit) ## Rating diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/downloads/ABX00107-cad-files.zip b/content/hardware/11.modulino/modulino-nodes/modulino-knob/downloads/ABX00107-cad-files.zip similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/downloads/ABX00107-cad-files.zip rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/downloads/ABX00107-cad-files.zip diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/downloads/ABX00107-schematics.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-knob/downloads/ABX00107-schematics.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/downloads/ABX00107-schematics.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/downloads/ABX00107-schematics.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/downloads/ABX00107-step.zip b/content/hardware/11.modulino/modulino-nodes/modulino-knob/downloads/ABX00107-step.zip similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/downloads/ABX00107-step.zip rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/downloads/ABX00107-step.zip diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/essentials.md b/content/hardware/11.modulino/modulino-nodes/modulino-knob/essentials.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/essentials.md rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/essentials.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/features.md b/content/hardware/11.modulino/modulino-nodes/modulino-knob/features.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/features.md rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/features.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/image.svg b/content/hardware/11.modulino/modulino-nodes/modulino-knob/image.svg similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/image.svg rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/image.svg diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/interactive/ABX00107-pinout.png b/content/hardware/11.modulino/modulino-nodes/modulino-knob/interactive/ABX00107-pinout.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/interactive/ABX00107-pinout.png rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/interactive/ABX00107-pinout.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/product.md b/content/hardware/11.modulino/modulino-nodes/modulino-knob/product.md similarity index 84% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/product.md rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/product.md index e2182454ba..ebb1f04e6b 100644 --- a/content/hardware/11.accessories/modulino-nodes/modulino-knob/product.md +++ b/content/hardware/11.modulino/modulino-nodes/modulino-knob/product.md @@ -2,10 +2,10 @@ title: Modulino Knob url_shop: https://store.arduino.cc/products/modulino-knob url_guide: https://courses.arduino.cc/plugandmake -primary_button_url: https://docs.arduino.cc/tutorials/modulino-knob/how-knob-ardu/ -primary_button_title: With Arduino -secondary_button_url: https://docs.arduino.cc/tutorials/modulino-knob/how-knob-mp/ -secondary_button_title: With MicroPython +primary_button_url: https://docs.arduino.cc/tutorials/modulino-knob/how-knob/ +primary_button_title: Get Started +secondary_button_url: https://docs.arduino.cc/tutorials/modulino-thermo/how-general/ +secondary_button_title: More on Modulino Nodes forumCategorySlug: '/hardware/accessories/modulino-knob/217' sku: [ABX00107] --- diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tech-specs.md b/content/hardware/11.modulino/modulino-nodes/modulino-knob/tech-specs.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/tech-specs.md rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/tech-specs.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tech-specs.yml b/content/hardware/11.modulino/modulino-nodes/modulino-knob/tech-specs.yml similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/tech-specs.yml rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/tech-specs.yml diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-knob/tutorials/how-general b/content/hardware/11.modulino/modulino-nodes/modulino-knob/tutorials/how-general new file mode 120000 index 0000000000..3f77534684 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-knob/tutorials/how-general @@ -0,0 +1 @@ +../../modulino-thermo/tutorials/how-general \ No newline at end of file diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-knob/tutorials/how-knob/assets/KnobOverview.png b/content/hardware/11.modulino/modulino-nodes/modulino-knob/tutorials/how-knob/assets/KnobOverview.png new file mode 100644 index 0000000000..5e7a267866 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-knob/tutorials/how-knob/assets/KnobOverview.png differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/KnobPinouts.png b/content/hardware/11.modulino/modulino-nodes/modulino-knob/tutorials/how-knob/assets/KnobPinouts.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/KnobPinouts.png rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/tutorials/how-knob/assets/KnobPinouts.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/schematic.png b/content/hardware/11.modulino/modulino-nodes/modulino-knob/tutorials/how-knob/assets/schematic.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-knob/tutorials/how-knob-ardu/assets/schematic.png rename to content/hardware/11.modulino/modulino-nodes/modulino-knob/tutorials/how-knob/assets/schematic.png diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-knob/tutorials/how-knob/content.md b/content/hardware/11.modulino/modulino-nodes/modulino-knob/tutorials/how-knob/content.md new file mode 100644 index 0000000000..c7b915aab7 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-knob/tutorials/how-knob/content.md @@ -0,0 +1,401 @@ +--- +title: "Getting Started with Modulino Knob" +description: "Complete guide for the Modulino Knob rotary encoder module and programming with Arduino and MicroPython." +tags: + - Modulino + - Knob + - Encoder + - Input + - QWIIC + - I2C +author: 'Christopher Méndez' +hardware: + - hardware/11.modulinos/modulinos/modulino-knob +software: + - ide-v2 + - web-editor + - micropython +--- + +![Knob Overview](assets/KnobOverview.png) + +The Modulino Knob is a modular sensor based on a quadrature rotary encoder that translates angular motion (rotation) into a digital signal. The sensor value will increase or decrease according to the rotation direction. Also, it includes an SPST switch that is activated when the knob is pressed. + +## Hardware Overview + +### General Characteristics + +The Modulino Knob has the following measurement specifications: + +| Parameter | Condition | Minimum | Typical | Maximum | Unit | +|------------|-----------|---------|------------------|---------|------| +| Sensor | Angle | - | 360 (continuous) | - | ° | +| Steps | - | - | 30 | - | - | +| Resolution | - | - | 12 | - | bit | + +### Sensor Details + +The PEC11J-9215F-S0015 rotary encoder is the core component of this module. This sensor output is processed by an STM32C011F4 microcontroller for digital communication (I²C), meaning that the encoder is communicated through the I²C pins using the mentioned microcontroller as an intermediary. + +The default address for the Module is: + +| Modulino I²C Address | Hardware I²C Address | +|----------------------|----------------------| +| 0x76 | 0x3A | + +The I²C address can be changed via software configuration. + +### Pinout + +![Modulino Knob Pinout](assets/KnobPinouts.png) + +#### 1x10 Header + +| Pin | Function | +|-------|----------------| +| PA2 | Button | +| GND | Ground | +| 3V3 | 3.3 V Power | +| PF2 | RESET | +| SWCLK | SWD Clock | +| SWDIO | SWD Data | +| TX1 | USART Transmit | +| RX1 | USART Receive | +| PA0 | Encoder A | +| PA1 | Encoder B | + +The board includes direct connections to the rotary encoder (PA0, PA1, PA2) bypassing the built-in microcontroller. + +#### 1x4 Header (I2C) + +| Pin | Function | +|-------|--------------| +| GND | Ground | +| 3.3 V | Power Supply | +| SDA | I²C Data | +| SCL | I²C Clock | + +### Power Specifications + +| Parameter | Typical | Unit | +|-----------------|---------|------| +| Supply Voltage | 3.3 | V | +| Average Current | 3.4 | mA | + +The module includes a power LED that draws 1 mA and turns on as soon as it is powered. + +### Schematic + +The Modulino Knob features a robust circuit design for rotational input and button detection. + +![Full Schematic Modulino Knob](assets/schematic.png) + +The main components are the **rotary encoder with integrated pushbutton** (PECHL-9215E-S0015) and the **STM32C011F4U6TR** microcontroller (U1), which handles encoder position reading, button state detection, as well as I²C communication. + +You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, this is the recommended method) or the **solderable pins** (J3). The board runs on **3.3V**, which comes from the QWIIC cable or the **3V3 pin** on J3. + +There's also a small power LED indicator (green) that lights up when the board is on. + +You can grab the full schematic and PCB files from the [Modulino Knob page](https://docs.arduino.cc/hardware/modulinos/modulino-knob). + +## Programming with Arduino + +The Modulino Knob is fully compatible with the Arduino IDE and the official Modulino library. The following examples showcase how to read rotational input, detect button presses, and implement user interface controls in your Arduino projects. + +### Prerequisites + +- Install the Modulino library via the Arduino IDE Library Manager +- Connect your Modulino Knob via QWIIC or solderable headers + +For detailed instructions on setting up your Arduino environment and installing libraries, please refer to the [Getting Started with Modulinos guide](./how-general). + +Library repository available [here](https://github.com/arduino-libraries/Arduino_Modulino). + +### Basic Example + +```arduino +#include + +ModulinoKnob knob; + +void setup() { + Serial.begin(9600); + Modulino.begin(); + knob.begin(); +} + +void loop(){ + int position = knob.get(); + bool click = knob.isPressed(); + + Serial.print("Current position is: "); + Serial.println(position); + + if(click){ + Serial.println("Clicked!"); + } +} +``` + +### Key Functions + +- `get()`: Returns a numerical value relative to the knob rotation +- `isPressed()`: Returns the state of the knob's built-in button +- `set()`: Changes the initial position of the encoder + +### Advanced Example - Menu Navigation + +```arduino +#include + +ModulinoKnob knob; + +// Menu configuration +const int MENU_ITEMS = 5; +String menuOptions[] = {"Settings", "Display", "Audio", "Network", "Exit"}; +int currentSelection = 0; +int lastPosition = 0; +bool lastButtonState = false; + +void setup() { + Serial.begin(9600); + Modulino.begin(); + knob.begin(); + + // Set initial position to 0 + knob.set(0); + lastPosition = 0; + + displayMenu(); +} + +void displayMenu() { + Serial.println("\n======= MENU ======="); + for (int i = 0; i < MENU_ITEMS; i++) { + if (i == currentSelection) { + Serial.print("> "); // Selection indicator + } else { + Serial.print(" "); + } + Serial.println(menuOptions[i]); + } + Serial.println("=================="); + Serial.println("Rotate to navigate, press to select"); +} + +void selectMenuItem() { + Serial.print("\n✓ Selected: "); + Serial.println(menuOptions[currentSelection]); + + // Handle selection + switch(currentSelection) { + case 0: + Serial.println("Opening Settings..."); + break; + case 1: + Serial.println("Opening Display options..."); + break; + case 2: + Serial.println("Opening Audio settings..."); + break; + case 3: + Serial.println("Opening Network configuration..."); + break; + case 4: + Serial.println("Exiting menu..."); + break; + } + + delay(1000); + displayMenu(); +} + +void loop() { + int currentPosition = knob.get(); + bool buttonPressed = knob.isPressed(); + + // Check for rotation + int rotation = currentPosition - lastPosition; + + if (rotation != 0) { + // Update selection based on rotation direction + if (rotation > 0) { + currentSelection++; + if (currentSelection >= MENU_ITEMS) { + currentSelection = 0; // Wrap around + } + } else { + currentSelection--; + if (currentSelection < 0) { + currentSelection = MENU_ITEMS - 1; // Wrap around + } + } + + lastPosition = currentPosition; + displayMenu(); + } + + // Check for button press (on release to avoid multiple triggers) + if (!buttonPressed && lastButtonState) { + selectMenuItem(); + } + + lastButtonState = buttonPressed; + + delay(50); // Small delay for debouncing +} +``` + +## Programming with MicroPython + +The Modulino Knob is fully compatible with MicroPython through the official Modulino MicroPython library. The following examples demonstrate how to read rotational input, handle button events, and create interactive controls in your MicroPython projects. + +### Prerequisites + +- Install the Modulino MicroPython library +- Ensure Arduino Lab for MicroPython is installed + +For detailed instructions on setting up your MicroPython environment and installing packages, please refer to the [Getting Started with Modulinos guide](./how-general). + +### Basic Example + +```python +from modulino import ModulinoKnob +from time import sleep + +knob = ModulinoKnob() +knob.value = 0 # (Optional) Set an initial value +knob.range = (-10, 10) # (Optional) Set a value range + +def on_release(): + knob.reset() + print("🔘 Released! Knob's value was reset.") + +knob.on_press = lambda: print("🔘 Pressed!") +knob.on_release = on_release +knob.on_rotate_clockwise = lambda steps, value: print(f"🎛️ Rotated {steps} steps clockwise! Value: {value}") +knob.on_rotate_counter_clockwise = lambda steps, value: print(f"🎛️ Rotated {steps} steps counter clockwise! Value: {value}") + +while True: + if(knob.update()): + print("👀 Knob value or state changed!") + + sleep(0.1) +``` + +### Key Functions and Properties + +- `.value`: Set/get the sensor's current value +- `.range`: Set the minimum and maximum possible value +- `.on_press`: Callback for button press +- `.on_release`: Callback for button release +- `.on_rotate_clockwise`: Callback for clockwise rotation +- `.on_rotate_counter_clockwise`: Callback for counter-clockwise rotation +- `.update()`: Check for new values and trigger callbacks +- `.reset()`: Reset the encoder value + +### Advanced Example - Volume Control with Visual Feedback + +```python +from modulino import ModulinoKnob +from time import sleep + +knob = ModulinoKnob() + +# Volume control configuration +knob.value = 50 # Start at 50% +knob.range = (0, 100) # Volume range 0-100% + +# State tracking +is_muted = False +last_volume = 50 + +def draw_volume_bar(volume, muted=False): + """Draw a visual representation of the volume""" + bar_length = 20 + filled = int((volume / 100) * bar_length) + empty = bar_length - filled + + if muted: + bar = "[" + "X" * bar_length + "]" + status = "🔇 MUTED" + else: + bar = "[" + "█" * filled + "░" * empty + "]" + if volume == 0: + status = "🔈" + elif volume < 33: + status = "🔉" + elif volume < 66: + status = "🔊" + else: + status = "🔊" + + print(f"\rVolume: {bar} {volume:3d}% {status} ", end="") + +def toggle_mute(): + """Toggle mute state""" + global is_muted, last_volume + + is_muted = not is_muted + + if is_muted: + last_volume = knob.value + knob.value = 0 + print("\n🔇 Muted!") + else: + knob.value = last_volume + print(f"\n🔊 Unmuted! Volume: {last_volume}%") + +def volume_change(steps, value): + """Handle volume changes""" + global is_muted + + if is_muted: + is_muted = False # Unmute when rotating + + draw_volume_bar(value) + +# Configure callbacks +knob.on_press = toggle_mute +knob.on_rotate_clockwise = volume_change +knob.on_rotate_counter_clockwise = volume_change + +print("🎛️ Volume Control System") +print("Rotate: Change volume | Press: Mute/Unmute") +print("-" * 40) + +# Initial display +draw_volume_bar(knob.value) + +# Main loop +while True: + knob.update() + sleep(0.01) +``` + +## Troubleshooting + +### Knob Not Responding + +If your Modulino's power LED isn't on or the knob isn't responsive: +- Ensure both the board and the Modulino are connected properly +- Verify that the power LEDs on both are lit +- Check that the QWIIC cable is properly clicked into place + +### Erratic Values + +If the encoder values jump unexpectedly: +- Check for loose connections +- Ensure the module is not near sources of electromagnetic interference +- Try adjusting the debounce time if using button events + +## Project Ideas + +- **Volume Control**: Adjust audio levels with tactile feedback +- **Menu Navigation**: Navigate through LCD or OLED display menus +- **Parameter Adjustment**: Fine-tune values in real-time applications +- **Game Controller**: Use rotation for steering or aiming in games +- **Light Dimmer**: Control LED brightness smoothly +- **Frequency Tuner**: Adjust frequencies for signal generators +- **Camera Control**: Pan/tilt control for camera systems +- **Smart Thermostat**: Set temperature with precise control \ No newline at end of file diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/compatibility.yml b/content/hardware/11.modulino/modulino-nodes/modulino-latch/compatibility.yml new file mode 100644 index 0000000000..f0008fc25d --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-latch/compatibility.yml @@ -0,0 +1,17 @@ +software: + - arduino-ide + - arduino-cli + - web-editor +hardware: + boards: + - nano-33-iot + - nano-33-ble + - nano-33-ble-sense + - nano-rp2040-connect + - nano-esp32 + - nano-matter + - uno-r4-wifi + - uno-q + shields: ~ + carriers: + - nano-connector-carrier diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/GenMech.png b/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/GenMech.png new file mode 100644 index 0000000000..809a8d6213 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/GenMech.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/I2CTag.png b/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/I2CTag.png new file mode 100644 index 0000000000..5e290c908a Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/I2CTag.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/Modulino_Latch_Block_Diagram.png b/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/Modulino_Latch_Block_Diagram.png new file mode 100644 index 0000000000..eea2289c2a Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/Modulino_Latch_Block_Diagram.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/Modulino_Latch_Power_Tree.png b/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/Modulino_Latch_Power_Tree.png new file mode 100644 index 0000000000..01d9db7a25 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/Modulino_Latch_Power_Tree.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/RelayMec.png b/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/RelayMec.png new file mode 100644 index 0000000000..ca2ca44659 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/RelayMec.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/RelayPinouts.png b/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/RelayPinouts.png new file mode 100644 index 0000000000..7b93ddaaff Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/RelayPinouts.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/ResistorsPullupGen.png b/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/ResistorsPullupGen.png new file mode 100644 index 0000000000..7095581413 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/ResistorsPullupGen.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/featured.png b/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/featured.png new file mode 100644 index 0000000000..925e7fd015 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/assets/featured.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/datasheet.md b/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/datasheet.md new file mode 100644 index 0000000000..f3dcef885a --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-latch/datasheet/datasheet.md @@ -0,0 +1,238 @@ +--- +identifier: ABX00138 +title: Arduino® Modulino® Latch Relay +type: maker +author: Pedro Sousa Lima +--- + +![](assets/featured.png) + +# Description + +The Arduino® Modulino Latch Relay, powered by an on-board STM32C011F4 microcontroller, features an electromechanical bistable latching relay (HFE60/3-1HT-L2) capable of switching high-power loads. This setup enables both simple relay control via I2C and maintains its last state even when power is removed. + +**IMPORTANT SAFETY NOTE: This board is NOT SAFE for 250VAC switching and must only be used for DC loads (maximum 30V DC) due to exposed metal contacts.** + +# Target Areas + +Maker, beginner, education + +# Contents +## Application Examples + +- **DC Power Control** + Switch DC motors, pumps, heaters, or lighting systems in automation projects with high current capacity. + +- **Smart Home Automation** + Control appliances and devices that require bistable switching, where maintaining state during power outages is critical. + +- **Industrial Control** + Implement safety interlocks or control systems where the relay state must be maintained regardless of control system power status. + +
+ +## Features +- **Electromechanical bistable latching relay** (HFE60/3-1HT-L2) that maintains state without power. +- Integrated **STM32C011F4** microcontroller providing I2C interface by default. +- **Dual coil design** with SET and RESET functionality controlled via I2C. +- Designed for **3.3V** operation via the Qwiic connector (I2C). + +### Contents +| **SKU** | **Name** | **Purpose** | **Quantity** | +| ---------- | --------------------------- | -------------------------------------------- | ------------ | +| ABX00138 | Modulino® Latch Relay | Bistable relay for high-power switching | 1 | +| | I2C Qwiic cable | Compatible with the Qwiic standard | 1 | + +## Related Products +- *SKU: ASX00027* - [Arduino® Sensor Kit](https://store.arduino.cc/products/arduino-sensor-kit) +- *SKU: K000007* - [Arduino® Starter Kit](https://store.arduino.cc/products/arduino-starter-kit-multi-language) +- *SKU: AKX00026* - [Arduino® Oplà IoT Kit](https://store.arduino.cc/products/opla-iot-kit) +- *SKU: AKX00069* - [Arduino® Plug and Make Kit](https://store.arduino.cc/products/plug-and-make-kit) + +## Rating + +### Recommended Operating Conditions +- **Powered at 3.3 V** through the Qwiic interface (in accordance with the Qwiic standard) +- **Operating temperature:** -40 °C to +85 °C + +**Typical current consumption:** +- Microcontroller: ~3.4mA +- Coil activation: ~100mA for 50ms (during switching only) + +## Power Tree +The power tree for the Modulino® node can be consulted below: + +![Modulino® Latch Relay Power Tree](assets/Modulino_Latch_Power_Tree.png) + +## Block Diagram +This module includes an STM32C011F4 microcontroller handling relay control via dual MOSFETs. The bistable relay maintains its state without continuous power. It communicates via I2C by default, but can be reprogrammed via SWD for custom functionality. + +![Modulino® Latch Relay Block Diagram](assets/Modulino_Latch_Block_Diagram.png) + +## Functional Overview +The Modulino® Latch Relay features a bistable latching relay that retains its last state (OPEN/CLOSED) even when power is removed. The on-board STM32C011F4 controls dual N-MOSFETs (2N7002PS,115) that drive the SET and RESET coils. LED indicators show the current state, and the relay can switch DC loads up to 30V DC. + +### Technical Specifications (Module-Specific) +| **Specification** | **Details** | +| --------------------------- | ----------------------------------------------- | +| **Microcontroller** | STM32C011F4 | +| **Relay Type** | HFE60/3-1HT-L2 bistable latching | +| **Supply Voltage** | Rec: 3.3 V | +| **Power Consumption** | ~3.4 mA idle, ~100 mA during switching | +| **Coil Voltage** | 3 V nominal, 2.4 V min, 3.9 V max | +| **Communication** | I2C (Qwiic), SWD (reprogramming) | + +### Pinout + + +**1×10 Header** + +| **Pin** | **Function** | +|---------|--------------| +| PA0 | SET Coil Control | +| PA1 | RESET Coil Control | +| GND | Ground | +| 3V3 | 3.3 V Power | +| PF2 | RESET | +| SDA | I2C Data | +| SCL | I2C Clock | +| SWCLK | SWD Clock | +| SWDIO | SWD Data | +| PA4 | Additional GPIO | + + **Note:** + - Never set both PA0 and PA1 HIGH simultaneously as this creates an undefined state. + - LED indicators: PA3 (SET yellow LED), PA2 (RESET red LED). + +![Pinout Overview](assets/RelayPinouts.png) + +### Power Specifications +- **Nominal operating voltage:** 3.3 V via Qwiic + +### Mechanical Information +![Modulino® Latch Relay Mechanical Information](assets/RelayMec.png) + +- Board dimensions: 41 mm × 25.36 mm +- Thickness: 1.6 mm (±0.2 mm) +- Four mounting holes (⌀ 3.2 mm) + - Hole spacing: 16 mm vertically, 32 mm horizontally + +![Modulino® Node Shape](assets/GenMech.png) + +### I2C Address Reference +| **Board Silk Name** | **Sensor/Actuator** | **Modulino® I2C Address (HEX)** | **Editable Addresses (HEX)** | **Hardware I2C Address (HEX)** | +|---------------------|-------------------------|--------------------------------|---------------------------------------------|--------------------------------| +| MODULINO LATCH RELAY| Bistable Latch Relay | 0x2A | Any custom address (via software config.) | 0x15 | + + **Note:** + - Default I2C address is **0x2A**. + - A white rectangle on the bottom silk allows users to write a new address after reconfiguration. + ![Blank silk for identification](assets/I2CTag.png) + +#### Pull-up Resistors + +This module has pads for optional I2C pull-up mounting in both data lines. No resistors are mounted by default but in case the resistors are needed 4.7 K resistors in an SMD 0402 format are recommended. + +These are positioned near the Qwiic connector on the power LED side. + +![Generic pull-up resistor position](assets/ResistorsPullupGen.png) + +## Device Operation +By default, the board is an I2C target device. It manages relay switching through integrated firmware that drives the SET and RESET coils via dual MOSFETs. The bistable nature means the relay maintains its state without continuous power. **DANGER: Never activate both SET and RESET coils simultaneously.** + +### Relay Control States +| **PA0 (SET)** | **PA1 (RESET)** | **Relay State** | +|---------------|-----------------|-----------------| +| HIGH (≥50ms) | LOW | CLOSED (Latched) | +| LOW | HIGH (≥50ms) | OPEN (Latched) | +| LOW | LOW | No change | +| HIGH | HIGH | **DANGER - UNDEFINED** | + +# Important Safety Warning + +**The board NODE36 RELAY ABX00138 IS NOT SAFE TO BE USED WHILE SWITCHING AC LOADS AND MUST ONLY BE USED TO SWITCH DC LOADS.** + +**Maximum DC voltage: 30V** + +# Certifications + +## Certifications Summary + +| **Certification** | **Status** | +|:-----------------:|:----------:| +| CE/RED (Europe) | Yes | +| UKCA (UK) | Yes | +| FCC (USA) | Yes | +| IC (Canada) | Yes | +| RoHS | Yes | +| REACH | Yes | +| WEEE | Yes | + +## 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).

+ +## 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.

+ +| Substance | **Maximum limit (ppm)** | +|----------------------------------------|-------------------------| +| Lead (Pb) | 1000 | +| Cadmium (Cd) | 100 | +| Mercury (Hg) | 1000 | +| Hexavalent Chromium (Cr6+) | 1000 | +| Poly Brominated Biphenyls (PBB) | 1000 | +| Poly Brominated Diphenyl ethers (PBDE) | 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), 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.

+ +## FCC WARNING + +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, and (2) this device must accept any interference received, including interference that may cause undesired operation. + +## IC Caution + +This device complies with Industry Canada licence-exempt RSS standard(s). + +Operation is subject to the following two conditions: + +(1) This device may not cause interference, and (2) this device must accept any interference, including interference that may cause undesired operation of the device. + +## Conflict Minerals Declaration + +

As a global supplier of electronic and electrical components, Arduino is aware of our obligations with regard 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.

+ +# Company Information + +| Company name | Arduino SRL | +|-----------------|-----------------------------------------------| +| Company Address | Via Andrea Appiani, 25 - 20900 MONZA(Italy) | + +# Reference Documentation + +| Ref | Link | +| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Arduino IDE (Desktop) | [https://www.arduino.cc/en/software/](https://www.arduino.cc/en/software/) | +| Arduino Courses | [https://www.arduino.cc/education/courses](https://www.arduino.cc/education/courses) | +| Arduino Documentation | [https://docs.arduino.cc/](https://docs.arduino.cc/) | +| Arduino IDE (Cloud) | [https://create.arduino.cc/editor](https://create.arduino.cc/editor) | +| Cloud IDE Getting Started | [https://docs.arduino.cc/cloud/web-editor/tutorials/getting-started/getting-started-web-editor](https://docs.arduino.cc/cloud/web-editor/tutorials/getting-started/getting-started-web-editor) | +| Project Hub | [https://projecthub.arduino.cc/](https://projecthub.arduino.cc/) | +| Library Reference | [https://github.com/arduino-libraries/](https://github.com/arduino-libraries/) | +| Online Store | [https://store.arduino.cc/](https://store.arduino.cc/) | + +# Revision History +| **Date** | **Revision** | **Changes** | +|------------|--------------|-----------------------------------| +| 01/07/2025 | 1 | First release | \ No newline at end of file diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/downloads/ABX00138-cad-files.zip b/content/hardware/11.modulino/modulino-nodes/modulino-latch/downloads/ABX00138-cad-files.zip new file mode 100644 index 0000000000..777dd4b5fb Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-latch/downloads/ABX00138-cad-files.zip differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/downloads/ABX00138-schematics.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-latch/downloads/ABX00138-schematics.pdf new file mode 100644 index 0000000000..d944670140 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-latch/downloads/ABX00138-schematics.pdf differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/downloads/ABX00138-step.zip b/content/hardware/11.modulino/modulino-nodes/modulino-latch/downloads/ABX00138-step.zip new file mode 100644 index 0000000000..0705e9664d Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-latch/downloads/ABX00138-step.zip differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/essentials.md b/content/hardware/11.modulino/modulino-nodes/modulino-latch/essentials.md new file mode 100644 index 0000000000..c61bcb5a56 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-latch/essentials.md @@ -0,0 +1,11 @@ + + + +This library allows you to communicate with the Arduino Modulino® nodes. + + + +This library allows you to communicate with the Arduino Modulino® nodes in MicroPython. + + + diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/features.md b/content/hardware/11.modulino/modulino-nodes/modulino-latch/features.md new file mode 100644 index 0000000000..0af41aa950 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-latch/features.md @@ -0,0 +1,14 @@ + +The Modulino® Latch Relay module features a bistable latching relay that maintains its state without continuous power, capable of switching high-current DC loads up to 30V. It is designed to be used with any compatible board with Qwiic, allowing you to build automation and power control projects without making complicated connections. The module also includes example projects for you to learn important programming concepts and get inspired. + + + + + +This module uses a latching relay that maintains its state even when power is removed, ideal for energy-efficient automation and safety-critical applications. + + +The Modulino® Latch Relay module connects to your UNO R4 WiFi with Qwiic cables, letting you focus on learning programming without building complex circuits. + + + diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/image.svg b/content/hardware/11.modulino/modulino-nodes/modulino-latch/image.svg new file mode 100644 index 0000000000..57e298b1a4 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-latch/image.svg @@ -0,0 +1,283 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/product.md b/content/hardware/11.modulino/modulino-nodes/modulino-latch/product.md new file mode 100644 index 0000000000..ec6d506fba --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-latch/product.md @@ -0,0 +1,13 @@ +--- +title: Modulino Latch Relay +url_shop: https://store.arduino.cc/products/modulino-latch-relay +url_guide: https://courses.arduino.cc/plugandmake +primary_button_url: https://docs.arduino.cc/tutorials/modulino-latch/how-latch/ +primary_button_title: Get Started +secondary_button_url: https://docs.arduino.cc/tutorials/modulino-thermo/how-general/ +secondary_button_title: More on Modulino Nodes +forumCategorySlug: '/hardware/accessories/213' +sku: [ABX00138] +--- + +A bistable latching relay that maintains its state without continuous power, ideal for DC power control and automation. Switch high-current loads up to 30V DC with easy I2C control. Compatible with Arduino UNO R4 WiFi or any Qwiic-enabled board. Control motors, pumps, or lighting systems without complex wiring. diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/tech-specs.md b/content/hardware/11.modulino/modulino-nodes/modulino-latch/tech-specs.md new file mode 100644 index 0000000000..168e54b9ca --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-latch/tech-specs.md @@ -0,0 +1 @@ +Here you will find the technical specifications for the Modulino® Latch Relay. diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/tech-specs.yml b/content/hardware/11.modulino/modulino-nodes/modulino-latch/tech-specs.yml new file mode 100644 index 0000000000..5b8753c13a --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-latch/tech-specs.yml @@ -0,0 +1,11 @@ +Node: + Name: Modulino Latch Relay + SKU: ABX00138 + Board recommended: Arduino® UNO R4 WiFi (ABX00087) and Arduino® UNO Q (ABX00162) + Communications: I2C (over Qwiic connector or solderable pin) + Operational voltage: 3.3V + Sensor: + Bistable Latch Relay (HFE60/3-1HT-L2) with STM32C011F4: 0x2A (address can change via software) + +Other accessories: + Qwiic cables: 1x diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/tutorials/how-general b/content/hardware/11.modulino/modulino-nodes/modulino-latch/tutorials/how-general new file mode 120000 index 0000000000..3f77534684 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-latch/tutorials/how-general @@ -0,0 +1 @@ +../../modulino-thermo/tutorials/how-general \ No newline at end of file diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/tutorials/how-latch/assets/RelayOverview.png b/content/hardware/11.modulino/modulino-nodes/modulino-latch/tutorials/how-latch/assets/RelayOverview.png new file mode 100644 index 0000000000..c7e26f8e4f Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-latch/tutorials/how-latch/assets/RelayOverview.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/tutorials/how-latch/assets/RelayPinouts.png b/content/hardware/11.modulino/modulino-nodes/modulino-latch/tutorials/how-latch/assets/RelayPinouts.png new file mode 100644 index 0000000000..7b93ddaaff Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-latch/tutorials/how-latch/assets/RelayPinouts.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-latch/tutorials/how-latch/how-latch.md b/content/hardware/11.modulino/modulino-nodes/modulino-latch/tutorials/how-latch/how-latch.md new file mode 100644 index 0000000000..b93bf671c4 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-latch/tutorials/how-latch/how-latch.md @@ -0,0 +1,376 @@ +--- +title: "Getting Started with Modulino Relay" +description: "Complete guide for the Modulino Relay switching module and programming with Arduino and MicroPython." +tags: + - Modulino + - Relay + - Switch + - Control + - QWIIC + - I2C +author: 'Pedro Sousa Lima' +hardware: + - hardware/11.modulinos/modulinos/modulino-relay +software: + - ide-v2 + - web-editor + - micropython +--- + +![Relay Overview](assets/RelayOverview.png) + +The Modulino Relay is a modular latching relay that can switch DC electrical loads, making it perfect to add power control to your projects! It uses the standardised Modulino form factor with QWIIC connectors for easy integration. + +**IMPORTANT SAFETY NOTE: This board is NOT SAFE for 250VAC switching and must only be used for DC loads (maximum 30V DC) due to exposed metal contacts.** + +## Hardware Overview + +### General Characteristics + +The Modulino Relay features a bistable latching relay capable of switching DC loads up to 2 A at 30 VDC. + +| Parameter | Condition | Minimum | Typical | Maximum | Unit | +|---------------|-----------|---------|---------|---------|------| +| Voltage (DC) | - | - | - | 30 | VDC | +| Current (DC) | - | - | - | 2 | A | + +### Sensor Details + +The **Modulino Relay** module uses a latching relay, which does not have native I²C capabilities. Instead, the relay is controlled by the Modulino's onboard microcontroller (STM32C011F4), which manages the relay coil switching and provides I²C communication. + +A latching relay maintains its state without continuous power, making it energy-efficient for applications where the relay state changes infrequently. + +One unique feature of this setup is the ability to change the I²C address via software, making it adaptable to different system configurations. + +The default I²C address for the **Modulino Relay** module is: + +| Modulino I²C Address | Hardware I²C Address | Editable Addresses (HEX) | +|----------------------|----------------------|--------------------------------------------------| +| 0x2A | 0x15 | Any custom address (via software configuration) | + +### Pinout + +![Modulino Relay Pinout](assets/RelayPinouts.png) + +**1×10 Header** + +| **Pin** | **Function** | +|---------|--------------| +| PA0 | SET Coil Control | +| PA1 | RESET Coil Control | +| GND | Ground | +| 3V3 | 3.3 V Power | +| PF2 | RESET | +| SDA | I2C Data | +| SCL | I2C Clock | +| SWCLK | SWD Clock | +| SWDIO | SWD Data | +| PA4 | Additional GPIO | + +**Note:** +- Never set both PA0 and PA1 HIGH simultaneously as this creates an undefined state. +- LED indicators: PA3 (SET yellow LED), PA2 (RESET red LED). + +#### Relay Contacts + +The relay provides normally open (NO) and normally closed (NC) contacts for switching loads: + +- **Common (COM)**: Connect to your power source +- **NO (Normally Open)**: Closes when relay is activated +- **NC (Normally Closed)**: Opens when relay is activated + +### Power Specifications + +| Parameter | Condition | Typical | Unit | +|---------------------|-----------|---------|------| +| Operating Voltage | - | 3.3 | V | +| Current Consumption | - | ~3.4 | mA | +| Coil Current | Switching | Brief | mA | + +The module includes a power LED that draws 1 mA and turns on as soon as it is powered. + +***Important Safety Notice:*** This relay must ONLY be used for DC loads up to 30V DC. Never use this module for AC switching or mains voltage applications due to exposed metal contacts which create a safety hazard. + +### Schematic + +The Modulino Relay features a latching relay design for efficient power control. + +The main components are the latching relay and the **STM32C011F4** microcontroller (U1), which controls the relay coils and handles I²C communication. + +You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, this is the recommended method) or the **solderable pins** (J4). The board runs on **3.3V**, which comes from the QWIIC cable or the **3V3 pin** on J4. + +There's also a small power LED indicator that lights up when the board is on. + +You can grab the full schematic and PCB files from the [Modulino Relay page](https://docs.arduino.cc/hardware/modulinos/modulino-relay). + +## Programming with Arduino + +The Modulino Relay is fully compatible with the Arduino IDE and the official Modulino library. The following examples showcase how to control loads and create automated switching systems. + +### Prerequisites + +- Install the Modulino library via the Arduino IDE Library Manager +- Connect your Modulino Relay via QWIIC or solderable headers + +For detailed instructions on setting up your Arduino environment and installing libraries, please refer to the [Getting Started with Modulino Nodes guide](../how-general). + +Library repository available [here](https://github.com/arduino-libraries/Arduino_Modulino). + +### Basic Example + +```arduino +#include + +ModulinoRelay relay; + +void setup() { + Serial.begin(9600); + Modulino.begin(); + relay.begin(); + + Serial.println("Relay Control Started"); +} + +void loop() { + // Turn relay on + Serial.println("Relay ON"); + relay.on(); + delay(2000); + + // Turn relay off + Serial.println("Relay OFF"); + relay.off(); + delay(2000); +} +``` + +### Key Functions + +- `on()`: Activates the relay (closes NO contacts, opens NC contacts) +- `off()`: Deactivates the relay (opens NO contacts, closes NC contacts) +- `update()`: Updates relay state, returns `true` if state changed +- `getStatus()`: Returns current relay state (`true` = on, `false` = off) + +### Advanced Example - Timed Control + +```arduino +#include + +ModulinoRelay relay; + +// Timing configuration +const unsigned long ON_DURATION = 5000; // 5 seconds on +const unsigned long OFF_DURATION = 10000; // 10 seconds off + +// State tracking +unsigned long lastChangeTime = 0; +bool relayState = false; + +void setup() { + Serial.begin(9600); + Modulino.begin(); + relay.begin(); + + Serial.println("Timed Relay Control System"); + Serial.println("ON: 5 seconds, OFF: 10 seconds"); + + // Start with relay off + relay.off(); + lastChangeTime = millis(); +} + +void loop() { + unsigned long currentTime = millis(); + unsigned long elapsed = currentTime - lastChangeTime; + + // Check if it's time to change state + if (relayState) { + // Relay is ON, check if on-duration has elapsed + if (elapsed >= ON_DURATION) { + relay.off(); + relayState = false; + lastChangeTime = currentTime; + + Serial.println("=== Relay switched OFF ==="); + Serial.print("Next cycle in: "); + Serial.print(OFF_DURATION / 1000); + Serial.println(" seconds"); + } + } else { + // Relay is OFF, check if off-duration has elapsed + if (elapsed >= OFF_DURATION) { + relay.on(); + relayState = true; + lastChangeTime = currentTime; + + Serial.println("=== Relay switched ON ==="); + Serial.print("Active for: "); + Serial.print(ON_DURATION / 1000); + Serial.println(" seconds"); + } + } + + // Display status every second + static unsigned long lastStatusTime = 0; + if (currentTime - lastStatusTime >= 1000) { + lastStatusTime = currentTime; + + Serial.print("Status: "); + Serial.print(relayState ? "ON " : "OFF"); + Serial.print(" | Time remaining: "); + + if (relayState) { + Serial.print((ON_DURATION - elapsed) / 1000); + } else { + Serial.print((OFF_DURATION - elapsed) / 1000); + } + Serial.println(" s"); + } + + delay(100); +} +``` + +## Programming with MicroPython + +The Modulino Relay is fully compatible with MicroPython through the official Modulino MicroPython library. The following examples demonstrate how to control loads and create automated systems in your MicroPython projects. + +### Prerequisites + +- Install the Modulino MicroPython library (see [Getting Started with Modulino Nodes](./how-general) for detailed instructions) +- Ensure Arduino Lab for MicroPython is installed + +### Basic Example + +```python +from modulino import ModulinoRelay +from time import sleep + +relay = ModulinoRelay() + +while True: + # Turn relay on + print("Relay ON") + relay.on() + sleep(2) + + # Turn relay off + print("Relay OFF") + relay.off() + sleep(2) +``` + +### Key Methods + +- `.on()`: Activates the relay +- `.off()`: Deactivates the relay +- `.status`: Returns current relay state (True = on, False = off) + +### Advanced Example - Automated Controller + +```python +from modulino import ModulinoRelay +from time import sleep, ticks_ms + +relay = ModulinoRelay() + +# Timing configuration (in milliseconds) +ON_DURATION = 5000 # 5 seconds +OFF_DURATION = 10000 # 10 seconds + +# State tracking +last_change_time = ticks_ms() +relay_state = False + +print("🔌 Timed Relay Control System") +print("ON: 5 seconds, OFF: 10 seconds") + +# Start with relay off +relay.off() + +while True: + current_time = ticks_ms() + elapsed = current_time - last_change_time + + # Check if it's time to change state + if relay_state: + # Relay is ON + if elapsed >= ON_DURATION: + relay.off() + relay_state = False + last_change_time = current_time + print("\n=== Relay switched OFF ===") + print(f"Next cycle in: {OFF_DURATION / 1000:.0f} seconds") + else: + # Relay is OFF + if elapsed >= OFF_DURATION: + relay.on() + relay_state = True + last_change_time = current_time + print("\n=== Relay switched ON ===") + print(f"Active for: {ON_DURATION / 1000:.0f} seconds") + + # Display status + status_text = "ON " if relay_state else "OFF" + if relay_state: + remaining = (ON_DURATION - elapsed) / 1000 + else: + remaining = (OFF_DURATION - elapsed) / 1000 + + print(f"Status: {status_text} | Time remaining: {remaining:.0f} s", end='\r') + + sleep(1) +``` + +## Troubleshooting + +### Sensor Not Reachable + +If your Modulino's power LED isn't on or the sensor isn't responsive: +- Ensure both the board and the Modulino are connected to your computer +- Verify that the power LEDs on both are lit +- Check that the QWIIC cable is properly clicked into place + +### Relay Not Switching + +If the relay doesn't switch: +- Verify that the relay coils are receiving proper signals +- Check that your load doesn't exceed the relay's ratings +- Ensure proper wiring of NO/NC/COM contacts + +### Load Not Operating + +If your connected load doesn't operate: +- Verify correct wiring (check NO vs NC connections) +- Ensure load voltage and current are within relay specifications +- Test relay operation with a multimeter in continuity mode + +### Library Issues + +See the [Getting Started with Modulino nodes](./how-general) guide for library installation troubleshooting. + +## Project Ideas + +Now that you've learned how to use your Modulino Relay, try these projects: + +- **Smart Light Switch**: Control room lighting automatically +- **Irrigation System**: Schedule watering times for gardens +- **Appliance Controller**: Turn coffee makers or heaters on/off remotely +- **Security System**: Control door locks or alarm sirens +- **Temperature Controller**: Switch heating/cooling based on sensor readings +- **Timer Switch**: Create countdown timers for equipment +- **Energy Monitor**: Log when devices are powered on/off +- **Automated Greenhouse**: Control fans, lights, and pumps + +## Safety Warnings + +⚠️ **Important Safety Information:** + +- Never exceed the relay's voltage and current ratings +- Always disconnect power before wiring +- Use appropriate wire gauge for your current requirements +- Provide proper isolation for high-voltage applications +- Consider using a fuse for overcurrent protection +- Never use for mains voltage or AC applications - DC only (max 30V DC) +- Follow all local electrical codes and regulations +- Ensure proper ventilation if switching high-power loads diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-light/compatibility.yml b/content/hardware/11.modulino/modulino-nodes/modulino-light/compatibility.yml new file mode 100644 index 0000000000..f0008fc25d --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-light/compatibility.yml @@ -0,0 +1,17 @@ +software: + - arduino-ide + - arduino-cli + - web-editor +hardware: + boards: + - nano-33-iot + - nano-33-ble + - nano-33-ble-sense + - nano-rp2040-connect + - nano-esp32 + - nano-matter + - uno-r4-wifi + - uno-q + shields: ~ + carriers: + - nano-connector-carrier diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-light/datasheet/assets/GenMech.png b/content/hardware/11.modulino/modulino-nodes/modulino-light/datasheet/assets/GenMech.png new file mode 100644 index 0000000000..809a8d6213 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-light/datasheet/assets/GenMech.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-light/datasheet/assets/LightMec.png b/content/hardware/11.modulino/modulino-nodes/modulino-light/datasheet/assets/LightMec.png new file mode 100644 index 0000000000..c291fe94da Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-light/datasheet/assets/LightMec.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-light/datasheet/assets/LightPinouts.png b/content/hardware/11.modulino/modulino-nodes/modulino-light/datasheet/assets/LightPinouts.png new file mode 100644 index 0000000000..766c333c3d Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-light/datasheet/assets/LightPinouts.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-light/datasheet/assets/Modulino_Light_Block_Diagram.png b/content/hardware/11.modulino/modulino-nodes/modulino-light/datasheet/assets/Modulino_Light_Block_Diagram.png new file mode 100644 index 0000000000..7fad7289a4 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-light/datasheet/assets/Modulino_Light_Block_Diagram.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-light/datasheet/assets/Modulino_Light_Power_Tree.png b/content/hardware/11.modulino/modulino-nodes/modulino-light/datasheet/assets/Modulino_Light_Power_Tree.png new file mode 100644 index 0000000000..505c1af9d8 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-light/datasheet/assets/Modulino_Light_Power_Tree.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-light/datasheet/assets/featured.png b/content/hardware/11.modulino/modulino-nodes/modulino-light/datasheet/assets/featured.png new file mode 100644 index 0000000000..7fb3df7015 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-light/datasheet/assets/featured.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-light/datasheet/datasheet.md b/content/hardware/11.modulino/modulino-nodes/modulino-light/datasheet/datasheet.md new file mode 100644 index 0000000000..1086eb59d9 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-light/datasheet/datasheet.md @@ -0,0 +1,218 @@ +--- +identifier: ABX00111 +title: Arduino® Modulino® Light +type: maker +author: Pedro Sousa Lima +--- + +![](assets/featured.png) + +# Description + +The Arduino Modulino® Light features the LTR-381RGB-01 ambient light, RGB, and infrared sensor, providing comprehensive optical sensing capabilities in a compact form factor. This sensor enables colour recognition, ambient light measurement, and infrared detection for a wide range of interactive and automation applications. + +# Target Areas + +Maker, beginner, education + +# Contents +## Application Examples + +- **Colour Recognition** + Detect and identify colours in objects, liquids, or environments for sorting systems, art projects, or interactive installations. + +- **Ambient Light Control** + Automatically adjust LED brightness, screen intensity, or activate lighting systems based on surrounding light conditions for smart home applications. + +- **Infrared Detection** + Monitor infrared radiation for proximity sensing, temperature indication, or remote control applications in various IoT projects. + +
+ +## Features +- **LTR-381RGB-01 sensor** providing ambient light, RGB colour, and infrared measurements. +- **High-precision colour detection** with separate red, green, and blue channels for accurate colour identification. +- **Ambient light sensing** with wide dynamic range for automatic lighting control. +- **Infrared detection** for proximity and thermal sensing applications. +- **I2C (Qwiic)** interface for solder-free integration; operates at **3.3V**. + +### Contents +| **SKU** | **Name** | **Purpose** | **Quantity** | +| ---------- | ------------------- | --------------------------------------------- | ------------ | +| ABX00111 | Modulino® Light | Ambient light, RGB and infrared sensor | 1 | +| | I2C Qwiic cable | Compatible with the Qwiic standard | 1 | + +## Related Products +- *SKU: ASX00027* - [Arduino® Sensor Kit](https://store.arduino.cc/products/arduino-sensor-kit) +- *SKU: K000007* - [Arduino® Starter Kit](https://store.arduino.cc/products/arduino-starter-kit-multi-language) +- *SKU: AKX00026* - [Arduino® Oplà IoT Kit](https://store.arduino.cc/products/opla-iot-kit) +- *SKU: AKX00069* - [Arduino® Plug and Make Kit](https://store.arduino.cc/products/plug-and-make-kit) + +## Rating + +### Recommended Operating Conditions +- **Powered at 3.3 V** through the Qwiic interface (in accordance with the Qwiic standard) +- **Operating temperature:** -30 °C to +70 °C + +**Typical current consumption:** +- ~200 µA active measurement + + +## Power Tree +The power tree for the Modulino® Light can be consulted below: + +![Modulino® Light Power Tree](assets/Modulino_Light_Power_Tree.png) + +## Block Diagram +This node is designed to be placed on an I2C bus, allowing the on-board LTR-381RGB-01 sensor to communicate with a host microcontroller via I2C. + +![Modulino® Light block diagram](assets/Modulino_Light_Block_Diagram.png) + +## Functional Overview +The Modulino® Light uses the LTR-381RGB-01 sensor to measure ambient light levels, detect RGB colour components, and sense infrared radiation. The sensor communicates via I2C (through the Qwiic connector at 3.3V) and provides an interrupt output for event-driven applications. The sensor can distinguish between different light sources and accurately measure colour characteristics. + +### Technical Specifications +| **Specification** | **Details** | +| ----------------------- | ------------------------------------------------ | +| **Sensor** | LTR-381RGB-01 | +| **Supply Voltage** | Rec:3.3 V | +| **Power Consumption** | ~200 µA active | +| **Ambient Light Range** | 0.01 lux to 120,000 lux | +| **Spectral Response** | Red: 600-700 nm, Green: 500-600 nm, Blue: 400-500 nm | +| **Resolution** | 20-bit ADC | +| **Communication** | I2C | + +### Pinout + +**Qwiic / I2C (1×4 Header)** +| **Pin** | **Function** | +| ------- | ----------------------- | +| GND | Ground | +| 3.3 V | Power Supply (3.3 V) | +| SDA | I2C Data | +| SCL | I2C Clock | + +These pads and the Qwiic connectors share the same I2C bus. You can optionally solder header pins here. + +**Additional 1×4 Header (LTR-381RGB-01 Signals)** +| **Pin** | **Function** | +| ------- | ------------------------------------ | +| GND | Ground | +| GND | Ground | +| 3V3 | 3.3 V Power | +| INT | Interrupt Output | + +**Note:** INT pin features a 10 kΩ pull-up resistor to 3.3 V and provides interrupt signalling for threshold detection and data ready events. + +![Pinout Overview](assets/LightPinouts.png) + +### Power Specifications +- **Nominal operating voltage:** 3.3 V via Qwiic + +### Mechanical Information +### Mechanical Information + +![Modulino® Light Mechanical Information](assets/LightMec.png) + +- Board dimensions: 41 mm × 25.36 mm +- Thickness: 1.6 mm (±0.2 mm) +- Four mounting holes (⌀ 3.2 mm) + - Hole spacing: 16 mm vertically, 32 mm horizontally + +![Modulino® Node Shape](assets/GenMech.png) + +### I2C Address Reference +| **Board Silk Name** | **Sensor** | **Modulino® I2C Address (HEX)** | **Editable Addresses (HEX)** | **Hardware I2C Address (HEX)** | +|---------------------|------------------|--------------------------------|-------------------------------------------|--------------------------------| +| MODULINO LIGHT | LTR-381RGB-01 | 0x53 | Fixed hardware address | 0x53 | + +**Note:** The default and only address is **0x53**. This sensor has a fixed I2C address that cannot be changed. + +## Device Operation +The Modulino® Light operates as an I2C target device on the Qwiic bus. A host microcontroller can read ambient light values, RGB colour components, and infrared levels. The INT pin can be configured to trigger interrupts when measurements exceed programmed thresholds. + +### Getting Started +Use any standard Arduino or microcontroller environment at 3.3 V. The Arduino_LTR381RGB library provides comprehensive functions for colour detection, ambient light measurement, and infrared sensing. The sensor should be positioned to face the light source or object being measured, with the sensing area unobstructed. + +# Certifications + +## Certifications Summary + +| **Certification** | **Status** | +|:-----------------:|:----------:| +| CE/RED (Europe) | Yes | +| UKCA (UK) | Yes | +| FCC (USA) | Yes | +| IC (Canada) | Yes | +| RoHS | Yes | +| REACH | Yes | +| WEEE | Yes | + +## 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).

+ +## 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.

+ +| Substance | **Maximum limit (ppm)** | +|----------------------------------------|-------------------------| +| Lead (Pb) | 1000 | +| Cadmium (Cd) | 100 | +| Mercury (Hg) | 1000 | +| Hexavalent Chromium (Cr6+) | 1000 | +| Poly Brominated Biphenyls (PBB) | 1000 | +| Poly Brominated Diphenyl ethers (PBDE) | 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), 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.

+ +## FCC WARNING + +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, and (2) this device must accept any interference received, including interference that may cause undesired operation. + +## IC Caution + +This device complies with Industry Canada licence-exempt RSS standard(s). + +Operation is subject to the following two conditions: + +(1) This device may not cause interference, and (2) this device must accept any interference, including interference that may cause undesired operation of the device. + +## Conflict Minerals Declaration + +

As a global supplier of electronic and electrical components, Arduino is aware of our obligations with regard 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.

+ +# Company Information + +| Company name | Arduino SRL | +|-----------------|-----------------------------------------------| +| Company Address | Via Andrea Appiani, 25 - 20900 MONZA(Italy) | + +# Reference Documentation + +| Ref | Link | +| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Arduino IDE (Desktop) | [https://www.arduino.cc/en/software/](https://www.arduino.cc/en/software/) | +| Arduino Courses | [https://www.arduino.cc/education/courses](https://www.arduino.cc/education/courses) | +| Arduino Documentation | [https://docs.arduino.cc/](https://docs.arduino.cc/) | +| Arduino IDE (Cloud) | [https://create.arduino.cc/editor](https://create.arduino.cc/editor) | +| Cloud IDE Getting Started | [https://docs.arduino.cc/cloud/web-editor/tutorials/getting-started/getting-started-web-editor](https://docs.arduino.cc/cloud/web-editor/tutorials/getting-started/getting-started-web-editor) | +| Project Hub | [https://projecthub.arduino.cc/](https://projecthub.arduino.cc/) | +| Library Reference | [https://github.com/arduino-libraries/](https://github.com/arduino-libraries/) | +| Online Store | [https://store.arduino.cc/](https://store.arduino.cc/) | + +# Revision History +| **Date** | **Revision** | **Changes** | +|------------|--------------|-----------------------------------| +| 14/10/2025 | 1 | First release | \ No newline at end of file diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-light/downloads/ABX00111-cad-files.zip b/content/hardware/11.modulino/modulino-nodes/modulino-light/downloads/ABX00111-cad-files.zip new file mode 100644 index 0000000000..329d28026c Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-light/downloads/ABX00111-cad-files.zip differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-light/downloads/ABX00111-schematics.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-light/downloads/ABX00111-schematics.pdf new file mode 100644 index 0000000000..de21c7780a Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-light/downloads/ABX00111-schematics.pdf differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-light/downloads/ABX00111-step.zip b/content/hardware/11.modulino/modulino-nodes/modulino-light/downloads/ABX00111-step.zip new file mode 100644 index 0000000000..7cc79fdc73 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-light/downloads/ABX00111-step.zip differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-light/essentials.md b/content/hardware/11.modulino/modulino-nodes/modulino-light/essentials.md new file mode 100644 index 0000000000..c61bcb5a56 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-light/essentials.md @@ -0,0 +1,11 @@ + + + +This library allows you to communicate with the Arduino Modulino® nodes. + + + +This library allows you to communicate with the Arduino Modulino® nodes in MicroPython. + + + diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-light/features.md b/content/hardware/11.modulino/modulino-nodes/modulino-light/features.md new file mode 100644 index 0000000000..b17414adc0 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-light/features.md @@ -0,0 +1,14 @@ + +The Modulino® Light module features an advanced optical sensor providing ambient light, RGB colour detection, and infrared sensing capabilities. It is designed to be used with any compatible board with Qwiic, allowing you to build smart lighting, colour recognition, and optical sensing projects without making complicated connections. The module also includes example projects for you to learn important programming concepts and get inspired. + + + + + +This module provides high-precision colour detection with separate red, green, and blue channels, plus ambient light and infrared sensing for comprehensive optical measurements. + + +The Modulino® Light module connects to your UNO R4 WiFi with Qwiic cables, letting you focus on learning programming without building complex circuits. + + + diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-light/image.svg b/content/hardware/11.modulino/modulino-nodes/modulino-light/image.svg new file mode 100644 index 0000000000..a72900847d --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-light/image.svg @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-light/product.md b/content/hardware/11.modulino/modulino-nodes/modulino-light/product.md new file mode 100644 index 0000000000..7c202ec15a --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-light/product.md @@ -0,0 +1,13 @@ +--- +title: Modulino Light +url_shop: https://store.arduino.cc/products/modulino-light +url_guide: https://courses.arduino.cc/plugandmake +primary_button_url: https://docs.arduino.cc/tutorials/modulino-light/how-light/ +primary_button_title: Get Started +secondary_button_url: https://docs.arduino.cc/tutorials/modulino-thermo/how-general/ +secondary_button_title: More on Modulino Nodes +forumCategorySlug: '/hardware/accessories/213' +sku: [ABX00111] +--- + +An advanced optical sensor featuring ambient light, RGB colour detection, and infrared sensing capabilities. Identify colours, measure light levels, or detect infrared radiation for smart lighting, colour sorting, or interactive projects. Compatible with Arduino UNO R4 WiFi or any Qwiic-enabled board, with simple I2C integration for comprehensive optical sensing. diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-light/tech-specs.md b/content/hardware/11.modulino/modulino-nodes/modulino-light/tech-specs.md new file mode 100644 index 0000000000..18be8b3a38 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-light/tech-specs.md @@ -0,0 +1 @@ +Here you will find the technical specifications for the Modulino® Light. diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-light/tech-specs.yml b/content/hardware/11.modulino/modulino-nodes/modulino-light/tech-specs.yml new file mode 100644 index 0000000000..c0ceb36f48 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-light/tech-specs.yml @@ -0,0 +1,11 @@ +Node: + Name: Modulino Light + SKU: ABX00111 + Board recommended: Arduino® UNO R4 WiFi (ABX00087) and Arduino® UNO Q (ABX00162) + Communications: I2C (over Qwiic connector or solderable pin) + Operational voltage: 3.3V + Sensor: + Ambient Light, RGB & IR Sensor (LTR-381RGB-01): 0x53 (fixed hardware address) + +Other accessories: + Qwiic cables: 1x diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-light/tutorials/how-general b/content/hardware/11.modulino/modulino-nodes/modulino-light/tutorials/how-general new file mode 120000 index 0000000000..3f77534684 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-light/tutorials/how-general @@ -0,0 +1 @@ +../../modulino-thermo/tutorials/how-general \ No newline at end of file diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-light/tutorials/how-light/assets/LightOverview.png b/content/hardware/11.modulino/modulino-nodes/modulino-light/tutorials/how-light/assets/LightOverview.png new file mode 100644 index 0000000000..fc29d47ccb Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-light/tutorials/how-light/assets/LightOverview.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-light/tutorials/how-light/assets/LightPinouts.png b/content/hardware/11.modulino/modulino-nodes/modulino-light/tutorials/how-light/assets/LightPinouts.png new file mode 100644 index 0000000000..766c333c3d Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-light/tutorials/how-light/assets/LightPinouts.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-light/tutorials/how-light/how-light.md b/content/hardware/11.modulino/modulino-nodes/modulino-light/tutorials/how-light/how-light.md new file mode 100644 index 0000000000..ffacfac7d1 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-light/tutorials/how-light/how-light.md @@ -0,0 +1,385 @@ +--- +title: "Getting Started with Modulino Light" +description: "Complete guide for the Modulino Light colour sensor module and programming with Arduino and MicroPython." +tags: + - Modulino + - Light Sensor + - Colour Detection + - RGB + - QWIIC + - I2C +author: 'Pedro Sousa Lima' +hardware: + - hardware/11.modulinos/modulinos/modulino-light +software: + - ide-v2 + - web-editor + - micropython +--- + +![Light Overview](assets/LightOverview.png) + +The Modulino Light is a modular colour sensor that measures ambient light, RGB colour components, and infrared levels, making it perfect to add colour detection and light sensing to your projects! It uses the standardised Modulino form factor with QWIIC connectors for easy integration. + +## Hardware Overview + +### General Characteristics + +The Modulino Light is based on the LTR-381RGB-01 sensor, capable of detecting colours and measuring light intensity. + +| Parameter | Condition | Minimum | Typical | Maximum | Unit | +|-------------------|-----------|---------|---------|---------|------| +| Operating Voltage | - | 1.7 | 3.3 | 3.6 | V | +| Light Range | - | 0 | - | 64,000 | lux | + +### Sensor Details + +The **Modulino Light** module uses the **LTR-381RGB-01** colour sensor from Lite-On. This sensor natively supports digital communication (I²C), meaning it connects directly to the I²C bus without requiring additional conversion circuitry. + +The sensor provides measurements for: +- Red, Green, and Blue colour channels +- Ambient light level +- Infrared (IR) level + +The default address for the module is: + +| Modulino I²C Address | Hardware I²C Address | Editable Addresses (HEX) | +|----------------------|----------------------|--------------------------| +| 0x53 | 0x53 | Fixed hardware address | + +***Note: Since the address cannot be changed on this Modulino specifically, using two or more identical modules on the same I²C bus will result in address conflicts and cause communication issues.*** + +### Pinout + +![Modulino Light Pinout](assets/LightPinouts.png) + +**Qwiic / I2C (1×4 Header)** +| **Pin** | **Function** | +| ------- | ----------------------- | +| GND | Ground | +| 3.3 V | Power Supply (3.3 V) | +| SDA | I2C Data | +| SCL | I2C Clock | + +These pads and the Qwiic connectors share the same I2C bus. You can optionally solder header pins here. + +**Additional 1×4 Header (LTR-381RGB-01 Signals)** +| **Pin** | **Function** | +| ------- | ------------------------------------ | +| GND | Ground | +| GND | Ground | +| 3V3 | 3.3 V Power | +| INT | Interrupt Output | + +**Note:** INT pin features a 10 kΩ pull-up resistor to 3.3 V and provides interrupt signalling for threshold detection and data ready events. + +### Power Specifications + +The board is typically powered by +3.3 VDC when using the QWIIC interface as per the I²C standard. + +| Parameter | Condition | Typical | Unit | +|---------------------|-----------|---------|------| +| Operating Voltage | - | 3.3 | V | +| Current Consumption | - | Variable| µA | + +The module includes a power LED that draws 1 mA and turns on as soon as it is powered. + +### Schematic + +The Modulino Light uses a simple circuit built around the **LTR-381RGB-01** sensor (U1), which handles colour detection, ambient light measurement, and I²C communication. + +You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, recommended) or the **solderable pins** (J4). The board runs on **3.3V** from the QWIIC cable or the **3V3 pin** on J4. + +Full schematic and PCB files are available from the [Modulino Light page](https://docs.arduino.cc/hardware/modulinos/modulino-light). + +## Programming with Arduino + +The Modulino Light is fully compatible with the Arduino IDE and the official Modulino library. The following examples showcase how to detect colours, measure light intensity, and create colour-based applications. + +### Prerequisites + +- Install the Modulino library via the Arduino IDE Library Manager +- Connect your Modulino Light via QWIIC or solderable headers + +For detailed instructions on setting up your Arduino environment and installing libraries, please refer to the [Getting Started with Modulinos guide](../how-general). + +Library repository available [here](https://github.com/arduino-libraries/Arduino_Modulino). + +### Basic Example + +```arduino +#include + +ModulinoLight light; + +void setup() { + Serial.begin(9600); + Modulino.begin(); + light.begin(); +} + +void loop() { + // Update sensor readings + light.update(); + + // Get colour approximation + String colourName = light.getColorApproximate(); + + // Get RGB values + ModulinoColor colour = light.getColor(); + int r = (0xFF000000 & colour) >> 24; + int g = (0x00FF0000 & colour) >> 16; + int b = (0x0000FF00 & colour) >> 8; + + // Get light intensity values + int lux = light.getAL(); // Ambient light (raw) + int luxCalibrated = light.getLux(); // Calibrated lux + int ir = light.getIR(); // Infrared level + + // Display readings + Serial.print("Colour: "); + Serial.print(colourName); + Serial.print("\tRGB: ("); + Serial.print(r); + Serial.print(", "); + Serial.print(g); + Serial.print(", "); + Serial.print(b); + Serial.print(")\tLux: "); + Serial.print(luxCalibrated); + Serial.print("\tIR: "); + Serial.println(ir); + + delay(500); +} +``` + +### Key Functions + +- `update()`: Updates sensor readings, returns `true` if successful +- `getColor()`: Returns colour as ModulinoColor object (extract RGB with bit shifting) +- `getColorApproximate()`: Returns colour name as String (e.g., "RED", "BLUE", "GREEN") +- `getAL()`: Returns raw ambient light value +- `getLux()`: Returns calibrated lux value +- `getIR()`: Returns infrared level + +### Advanced Example - Colour Sorting + +```arduino +#include + +ModulinoLight light; + +// Colour thresholds for sorting +const int MIN_LUX = 50; // Minimum light level for detection + +void setup() { + Serial.begin(9600); + Modulino.begin(); + light.begin(); + + Serial.println("Colour Sorting System"); + Serial.println("Place coloured objects under sensor"); + Serial.println("-------------------------------------"); +} + +void loop() { + light.update(); + + // Check if there's enough light to detect + int lux = light.getLux(); + if (lux < MIN_LUX) { + Serial.println("Waiting for object..."); + delay(1000); + return; + } + + // Get colour information + String colour = light.getColorApproximate(); + ModulinoColor rgb = light.getColor(); + + int r = (0xFF000000 & rgb) >> 24; + int g = (0x00FF0000 & rgb) >> 16; + int b = (0x0000FF00 & rgb) >> 8; + + // Categorise the colour + String category = categoriseColour(colour); + + // Display results + Serial.println("=== OBJECT DETECTED ==="); + Serial.print("Detected Colour: "); + Serial.println(colour); + Serial.print("RGB Values: ("); + Serial.print(r); + Serial.print(", "); + Serial.print(g); + Serial.print(", "); + Serial.print(b); + Serial.println(")"); + Serial.print("Category: "); + Serial.println(category); + Serial.print("Light Level: "); + Serial.print(lux); + Serial.println(" lux"); + Serial.println(); + + delay(2000); +} + +String categoriseColour(String colour) { + // Convert to uppercase for comparison + colour.toUpperCase(); + + if (colour.indexOf("RED") >= 0 || colour.indexOf("ROSE") >= 0 || + colour.indexOf("ORANGE") >= 0) { + return "WARM COLOURS"; + } else if (colour.indexOf("BLUE") >= 0 || colour.indexOf("CYAN") >= 0 || + colour.indexOf("AZURE") >= 0) { + return "COOL COLOURS"; + } else if (colour.indexOf("GREEN") >= 0 || colour.indexOf("LIME") >= 0) { + return "NATURAL COLOURS"; + } else if (colour.indexOf("PURPLE") >= 0 || colour.indexOf("VIOLET") >= 0 || + colour.indexOf("MAGENTA") >= 0) { + return "PURPLE TONES"; + } else if (colour.indexOf("YELLOW") >= 0) { + return "BRIGHT COLOURS"; + } else if (colour.indexOf("WHITE") >= 0 || colour.indexOf("GRAY") >= 0 || + colour.indexOf("BLACK") >= 0) { + return "NEUTRAL COLOURS"; + } else { + return "UNKNOWN"; + } +} +``` + +## Programming with MicroPython + +The Modulino Light is fully compatible with MicroPython through the official Modulino MicroPython library. The following examples demonstrate how to detect colours and measure light intensity in your MicroPython projects. + +### Prerequisites + +- Install the Modulino MicroPython library (see [Getting Started with Modulinos](./how-general) for detailed instructions) +- Ensure Arduino Lab for MicroPython is installed + +### Basic Example + +```python +from modulino import ModulinoLight +from time import sleep + +light = ModulinoLight() + +while True: + # Get colour name + colour_name = light.colour_name + + # Get RGB values + r, g, b = light.colour + + # Get light intensity + lux = light.lux + ir = light.ir + + if colour_name: + print(f"Colour: {colour_name:20s} RGB: ({r:3d}, {g:3d}, {b:3d}) Lux: {lux:5d} IR: {ir:5d}") + + sleep(0.5) +``` + +### Key Properties + +- `.colour_name`: Returns colour name as string +- `.colour`: Returns tuple of (red, green, blue) values +- `.lux`: Returns calibrated lux value +- `.ir`: Returns infrared level + +### Advanced Example - Colour Detection + +```python +from modulino import ModulinoLight +from time import sleep + +light = ModulinoLight() + +MIN_LUX = 50 + +def categorise_colour(colour_name): + """Categorise colour into groups""" + colour_upper = colour_name.upper() + + if any(x in colour_upper for x in ["RED", "ROSE", "ORANGE"]): + return "WARM COLOURS" + elif any(x in colour_upper for x in ["BLUE", "CYAN", "AZURE"]): + return "COOL COLOURS" + elif any(x in colour_upper for x in ["GREEN", "LIME"]): + return "NATURAL COLOURS" + elif any(x in colour_upper for x in ["PURPLE", "VIOLET", "MAGENTA"]): + return "PURPLE TONES" + elif "YELLOW" in colour_upper: + return "BRIGHT COLOURS" + elif any(x in colour_upper for x in ["WHITE", "GRAY", "BLACK"]): + return "NEUTRAL COLOURS" + else: + return "UNKNOWN" + +print("🎨 Colour Detection System") +print("Place coloured objects under sensor") + +while True: + lux = light.lux + + if lux < MIN_LUX: + print("Waiting for object...") + sleep(1) + continue + + # Get colour information + colour_name = light.colour_name + r, g, b = light.colour + + # Categorise + category = categorise_colour(colour_name) + + # Display results + print("\n=== OBJECT DETECTED ===") + print(f"Detected Colour: {colour_name}") + print(f"RGB Values: ({r}, {g}, {b})") + print(f"Category: {category}") + print(f"Light Level: {lux} lux") + + sleep(2) +``` + +## Troubleshooting + +### Sensor Not Reachable + +If your Modulino's power LED isn't on or the sensor isn't responsive: +- Ensure both the board and the Modulino are connected to your computer +- Verify that the power LEDs on both are lit +- Check that the QWIIC cable is properly clicked into place + +### Inaccurate Colour Detection + +If the colour readings are not accurate: +- Ensure adequate lighting conditions +- Position the sensor facing the object directly +- Avoid mixed lighting sources (e.g., daylight + artificial light) +- Keep the sensor at a consistent distance from objects + +### Library Issues + +See the [Getting Started with Modulinos](./how-general) guide for library installation troubleshooting. + +## Project Ideas + +Now that you've learned how to use your Modulino Light, try these projects: + +- **Colour Sorting Machine**: Automatically sort objects by colour +- **Ambient Light Controller**: Adjust LED brightness based on room lighting +- **Colour Matching Game**: Create interactive colour identification games +- **Paint Colour Identifier**: Help identify paint or material colours +- **Plant Monitor**: Track light levels for optimal plant growth +- **Display Calibration**: Measure screen colour output +- **Art Installation**: Create colour-reactive light displays +- **Quality Control**: Detect colour defects in manufacturing diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-CERT_CE_EMC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-CERT_CE_EMC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-CERT_CE_EMC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-CERT_CE_EMC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-CERT_FCC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-CERT_FCC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-CERT_FCC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-CERT_FCC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-CERT_IC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-CERT_IC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-CERT_IC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-CERT_IC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-CERT_UKCA.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-CERT_UKCA.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-CERT_UKCA.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-CERT_UKCA.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-DoC_CE.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-DoC_CE.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-DoC_CE.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-DoC_CE.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-DoC_FCC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-DoC_FCC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-DoC_FCC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-DoC_FCC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-DoC_UKCA.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-DoC_UKCA.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-DoC_UKCA.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/certifications/Arduino_ABX00101-DoC_UKCA.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/compatibility.yml b/content/hardware/11.modulino/modulino-nodes/modulino-movement/compatibility.yml similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/compatibility.yml rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/compatibility.yml diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/datasheet/assets/BlockDiagramMovement.png b/content/hardware/11.modulino/modulino-nodes/modulino-movement/datasheet/assets/BlockDiagramMovement.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/datasheet/assets/BlockDiagramMovement.png rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/datasheet/assets/BlockDiagramMovement.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/datasheet/assets/I2CTag.png b/content/hardware/11.modulino/modulino-nodes/modulino-movement/datasheet/assets/I2CTag.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/datasheet/assets/I2CTag.png rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/datasheet/assets/I2CTag.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/datasheet/assets/IMUMec.png b/content/hardware/11.modulino/modulino-nodes/modulino-movement/datasheet/assets/IMUMec.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/datasheet/assets/IMUMec.png rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/datasheet/assets/IMUMec.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/datasheet/assets/Modulino_Movement_Power_Tree.png b/content/hardware/11.modulino/modulino-nodes/modulino-movement/datasheet/assets/Modulino_Movement_Power_Tree.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/datasheet/assets/Modulino_Movement_Power_Tree.png rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/datasheet/assets/Modulino_Movement_Power_Tree.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/datasheet/assets/MovementPinouts.png b/content/hardware/11.modulino/modulino-nodes/modulino-movement/datasheet/assets/MovementPinouts.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/datasheet/assets/MovementPinouts.png rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/datasheet/assets/MovementPinouts.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/datasheet/assets/VDDIO.png b/content/hardware/11.modulino/modulino-nodes/modulino-movement/datasheet/assets/VDDIO.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/datasheet/assets/VDDIO.png rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/datasheet/assets/VDDIO.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/datasheet/assets/featuredMov.png b/content/hardware/11.modulino/modulino-nodes/modulino-movement/datasheet/assets/featuredMov.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/datasheet/assets/featuredMov.png rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/datasheet/assets/featuredMov.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/datasheet/datasheet.md b/content/hardware/11.modulino/modulino-nodes/modulino-movement/datasheet/datasheet.md similarity index 97% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/datasheet/datasheet.md rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/datasheet/datasheet.md index 3d252ebccf..7b4fcc06d6 100644 --- a/content/hardware/11.accessories/modulino-nodes/modulino-movement/datasheet/datasheet.md +++ b/content/hardware/11.modulino/modulino-nodes/modulino-movement/datasheet/datasheet.md @@ -52,11 +52,9 @@ Below are some project ideas focused on the Modulino® Movement module and its b ## Related Products -- *SKU: ASX00027* - [Arduino® Sensor Kit](https://store.arduino.cc/products/arduino-sensor-kit) - -- *SKU: K000007* - [Arduino® Starter Kit](https://store.arduino.cc/products/arduino-starter-kit-multi-language) - -- *SKU: AKX00026* - [Arduino® Oplà IoT Kit](https://store.arduino.cc/products/opla-iot-kit) +- **SKU: ASX00027** - [Arduino® Sensor Kit](https://store.arduino.cc/products/arduino-sensor-kit) +- **SKU: K000007** - [Arduino® Starter Kit](https://store.arduino.cc/products/arduino-starter-kit-multi-language) +- **SKU: AKX00026** - [Arduino® Oplà IoT Kit](https://store.arduino.cc/products/opla-iot-kit) ## Rating diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/downloads/ABX00101-cad-files.zip b/content/hardware/11.modulino/modulino-nodes/modulino-movement/downloads/ABX00101-cad-files.zip similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/downloads/ABX00101-cad-files.zip rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/downloads/ABX00101-cad-files.zip diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/downloads/ABX00101-schematics.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-movement/downloads/ABX00101-schematics.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/downloads/ABX00101-schematics.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/downloads/ABX00101-schematics.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/downloads/ABX00101-step.zip b/content/hardware/11.modulino/modulino-nodes/modulino-movement/downloads/ABX00101-step.zip similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/downloads/ABX00101-step.zip rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/downloads/ABX00101-step.zip diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/essentials.md b/content/hardware/11.modulino/modulino-nodes/modulino-movement/essentials.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/essentials.md rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/essentials.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/features.md b/content/hardware/11.modulino/modulino-nodes/modulino-movement/features.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/features.md rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/features.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/image.svg b/content/hardware/11.modulino/modulino-nodes/modulino-movement/image.svg similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/image.svg rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/image.svg diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/interactive/ABX00101-pinout.png b/content/hardware/11.modulino/modulino-nodes/modulino-movement/interactive/ABX00101-pinout.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/interactive/ABX00101-pinout.png rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/interactive/ABX00101-pinout.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/product.md b/content/hardware/11.modulino/modulino-nodes/modulino-movement/product.md similarity index 83% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/product.md rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/product.md index abd2e4ecea..aa5734f6a9 100644 --- a/content/hardware/11.accessories/modulino-nodes/modulino-movement/product.md +++ b/content/hardware/11.modulino/modulino-nodes/modulino-movement/product.md @@ -2,10 +2,10 @@ title: Modulino Movement url_shop: https://store.arduino.cc/products/modulino-movement url_guide: https://courses.arduino.cc/plugandmake -primary_button_url: https://docs.arduino.cc/tutorials/modulino-movement/how-movement-ardu/ -primary_button_title: With Arduino -secondary_button_url: https://docs.arduino.cc/tutorials/modulino-movement/how-movement-mp/ -secondary_button_title: With MicroPython +primary_button_url: https://docs.arduino.cc/tutorials/modulino-movement/how-movement/ +primary_button_title: Get Started +secondary_button_url: https://docs.arduino.cc/tutorials/modulino-thermo/how-general/ +secondary_button_title: More on Modulino Nodes forumCategorySlug: '/hardware/accessories/modulino-movement/218' sku: [ABX00101] --- diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tech-specs.md b/content/hardware/11.modulino/modulino-nodes/modulino-movement/tech-specs.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/tech-specs.md rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/tech-specs.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tech-specs.yml b/content/hardware/11.modulino/modulino-nodes/modulino-movement/tech-specs.yml similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/tech-specs.yml rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/tech-specs.yml diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-movement/tutorials/how-general b/content/hardware/11.modulino/modulino-nodes/modulino-movement/tutorials/how-general new file mode 120000 index 0000000000..3f77534684 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-movement/tutorials/how-general @@ -0,0 +1 @@ +../../modulino-thermo/tutorials/how-general \ No newline at end of file diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/I2C-change-movement.png b/content/hardware/11.modulino/modulino-nodes/modulino-movement/tutorials/how-movement/assets/I2C-change-movement.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/I2C-change-movement.png rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/tutorials/how-movement/assets/I2C-change-movement.png diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-movement/tutorials/how-movement/assets/MovementOverview.png b/content/hardware/11.modulino/modulino-nodes/modulino-movement/tutorials/how-movement/assets/MovementOverview.png new file mode 100644 index 0000000000..1dca7e801f Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-movement/tutorials/how-movement/assets/MovementOverview.png differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/MovementPinouts.png b/content/hardware/11.modulino/modulino-nodes/modulino-movement/tutorials/how-movement/assets/MovementPinouts.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/assets/MovementPinouts.png rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/tutorials/how-movement/assets/MovementPinouts.png diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-movement/tutorials/how-movement/content.md b/content/hardware/11.modulino/modulino-nodes/modulino-movement/tutorials/how-movement/content.md new file mode 100644 index 0000000000..6fd9a022aa --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-movement/tutorials/how-movement/content.md @@ -0,0 +1,475 @@ +--- +title: "Getting Started with Modulino Movement" +description: "Complete guide for the Modulino Movement 6-axis IMU sensor module and programming with Arduino and MicroPython." +tags: + - Modulino + - Movement + - IMU + - Accelerometer + - Gyroscope + - QWIIC + - I2C +author: 'Pedro Sousa Lima' +hardware: + - hardware/11.modulinos/modulinos/modulino-movement +software: + - ide-v2 + - web-editor + - micropython +--- + +![Movement Overview](assets/MovementOverview.png) + +The Modulino Movement is a modular sensor that measures acceleration and angular velocity, making it perfect to add motion sensing to your projects! It provides 6-axis motion detection through its integrated accelerometer and gyroscope. + +## Hardware Overview + +### General Characteristics + +The Modulino Movement is capable of measuring acceleration and angular velocity with the following specifications: + +| Parameter | Condition | Minimum | Typical | Maximum | Unit | +|---------------------------------|-------------------------|---------|---------|---------|----------| +| **Accelerometer Range** | Configurable Full Scale | ±2 | ±8 | ±16 | g | +| **Gyroscope Range** | Configurable Full Scale | ±125 | ±1000 | ±2000 | dps | +| **Accelerometer Sensitivity** | @ ±2g | 0.061 | - | - | mg/LSB | +| **Gyroscope Sensitivity** | @ ±125dps | 4.375 | - | - | mdps/LSB | +| **Accelerometer Noise Density** | High-performance mode | - | 70 | - | µg/√Hz | +| **Gyroscope Noise Density** | High-performance mode | - | 3.8 | - | mdps/√Hz | +| **Temperature Sensor Range** | - | -40 | - | +85 | °C | +| **FIFO Buffer** | - | - | 9 | - | KB | +| **Sampling Rate** | Output Data Rate | 1.6 | - | 6664 | Hz | + +### Sensor Details + +The LSM6DSOXTR sensor from STMicroelectronics is the core component of this module. This 6-axis IMU (accelerometer and gyroscope) natively supports digital communication (I²C and SPI), meaning it connects directly to the I²C bus on the module without requiring additional conversion circuitry. + +The default address for the Module is: + +| Modulino I²C Address | Hardware I²C Address | +|----------------------|----------------------| +| 0x6A or 0x7E | 0x6A or 0x7E | + +The address can be changed through hardware modification (see the generic guide for details). + +![Address change hardware](assets/I2C-change-movement.png) + +1. Disconnect all power from the module +2. Locate the address selection solder jumpers on the back of the board +3. Cut the trace on the jumper marked **Default** (0x6A) +4. Solder closed the jumper marked **0x6B** + +**IMPORTANT**: Never have both jumpers closed simultaneously when power is applied, as this will create a short circuit that could damage your module. + +### Pinout + +![Modulino Movement Pinout](assets/MovementPinouts.png) + +#### 1x10 Header + +| Pin | Function | +|---------|------------------| +| VDDIO | Power | +| GND | Ground | +| INT1 | Interrupt 1 | +| INT2 | Interrupt 2 | +| SDO/SA0 | SPI Data Out | +| SCx | SPI Clock | +| SDx | SPI Data | +| CS | SPI Chip Select | +| SDOAUX | Auxiliary Output | +| OCSAUX | Auxiliary Output | + +#### 1x4 Header (I2C) + +| Pin | Function | +|-------|--------------| +| GND | Ground | +| 3.3 V | Power Supply | +| SDA | I²C Data | +| SCL | I²C Clock | + +### Power Specifications + +| Parameter | Condition | Minimum | Typical | Maximum | Unit | +|-----------------------------------------------|---------------------|---------|-------------|---------|------| +| Supply Voltage | - | 1.71 | 3.3 (QWIIC) | 3.6 | V | +| I/O Voltage | - | 1.62 | - | 3.6 | V | +| Gyro + Accel Current (High Performance Mode) | Both sensors active | - | 0.55 | - | mA | +| Accelerometer Current (High Performance Mode) | - | - | 170 | - | µA | +| Accelerometer Current (Low Power Mode) | ODR = 50 Hz | - | 26 | - | µA | +| Accelerometer Current (Ultra-Low Power Mode) | ODR = 50 Hz | - | 9.5 | - | µA | + +## Programming with Arduino + +### Prerequisites + +- Install the Modulino library via the Arduino IDE Library Manager +- Connect your Modulino Knob via QWIIC or solderable headers + +For detailed instructions on setting up your Arduino environment and installing libraries, please refer to the [Getting Started with Modulinos guide](./how-general). + +Library repository available [here](https://github.com/arduino-libraries/Arduino_Modulino). + +### Basic Example + +```arduino +#include "Modulino.h" + +// Create a ModulinoMovement +ModulinoMovement movement; + +float x, y, z; +float roll, pitch, yaw; + +void setup() { + Serial.begin(9600); + // Initialize Modulino I2C communication + Modulino.begin(); + // Detect and connect to movement sensor module + movement.begin(); +} + +void loop() { + // Read new movement data from the sensor + movement.update(); + + // Get acceleration and gyroscope values + x = movement.getX(); + y = movement.getY(); + z = movement.getZ(); + roll = movement.getRoll(); + pitch = movement.getPitch(); + yaw = movement.getYaw(); + + // Print acceleration values + Serial.print("A: "); + Serial.print(x, 3); + Serial.print(", "); + Serial.print(y, 3); + Serial.print(", "); + Serial.print(z, 3); + + // Print divider between acceleration and gyroscope + Serial.print(" | G: "); + + // Print gyroscope values + Serial.print(roll, 1); + Serial.print(", "); + Serial.print(pitch, 1); + Serial.print(", "); + Serial.println(yaw, 1); + + delay(200); +} +``` + +### Key Functions + +- `update()`: Updates the sensor readings +- `getX()`, `getY()`, `getZ()`: Retrieve acceleration values in g +- `getRoll()`, `getPitch()`, `getYaw()`: Retrieve angular rotation in dps + +### Advanced Example - Motion Detection System + +```arduino +#include "Modulino.h" + +ModulinoMovement movement; + +// Motion detection thresholds +const float MOTION_THRESHOLD = 0.15; // g units for acceleration +const float ROTATION_THRESHOLD = 20.0; // degrees per second + +// Calibration variables +float baseX = 0, baseY = 0, baseZ = 1.0; // Expect 1g on Z when flat +float baseRoll = 0, basePitch = 0, baseYaw = 0; +bool isCalibrated = false; + +// Motion state tracking +bool inMotion = false; +unsigned long motionStartTime = 0; +unsigned long stillStartTime = 0; +const unsigned long STILL_TIMEOUT = 2000; // 2 seconds to detect stillness + +void setup() { + Serial.begin(9600); + Modulino.begin(); + movement.begin(); + + Serial.println("Motion Detection System"); + Serial.println("======================"); + Serial.println("Keep device still for calibration..."); + + delay(2000); + calibrateSensor(); +} + +void calibrateSensor() { + const int samples = 50; + float sumX = 0, sumY = 0, sumZ = 0; + float sumRoll = 0, sumPitch = 0, sumYaw = 0; + + for (int i = 0; i < samples; i++) { + movement.update(); + sumX += movement.getX(); + sumY += movement.getY(); + sumZ += movement.getZ(); + sumRoll += movement.getRoll(); + sumPitch += movement.getPitch(); + sumYaw += movement.getYaw(); + delay(20); + } + + baseX = sumX / samples; + baseY = sumY / samples; + baseZ = sumZ / samples; + baseRoll = sumRoll / samples; + basePitch = sumPitch / samples; + baseYaw = sumYaw / samples; + + isCalibrated = true; + Serial.println("✓ Calibration complete!"); + Serial.println(); +} + +void detectMotion() { + movement.update(); + + // Calculate deltas from baseline + float deltaX = abs(movement.getX() - baseX); + float deltaY = abs(movement.getY() - baseY); + float deltaZ = abs(movement.getZ() - baseZ); + float deltaRoll = abs(movement.getRoll() - baseRoll); + float deltaPitch = abs(movement.getPitch() - basePitch); + float deltaYaw = abs(movement.getYaw() - baseYaw); + + // Check if any threshold is exceeded + bool motionDetected = (deltaX > MOTION_THRESHOLD || + deltaY > MOTION_THRESHOLD || + deltaZ > MOTION_THRESHOLD || + deltaRoll > ROTATION_THRESHOLD || + deltaPitch > ROTATION_THRESHOLD || + deltaYaw > ROTATION_THRESHOLD); + + // State machine for motion detection + if (motionDetected && !inMotion) { + // Motion just started + inMotion = true; + motionStartTime = millis(); + Serial.println("🏃 MOTION DETECTED!"); + + // Identify type of motion + if (deltaRoll > ROTATION_THRESHOLD || deltaPitch > ROTATION_THRESHOLD) { + Serial.println(" Type: Rotation"); + } + if (deltaX > MOTION_THRESHOLD || deltaY > MOTION_THRESHOLD) { + Serial.println(" Type: Linear movement"); + } + if (deltaZ > MOTION_THRESHOLD * 2) { + Serial.println(" Type: Vertical movement"); + } + } + else if (!motionDetected && inMotion) { + // Motion might have stopped + if (stillStartTime == 0) { + stillStartTime = millis(); + } + else if (millis() - stillStartTime > STILL_TIMEOUT) { + // Device has been still for timeout period + inMotion = false; + unsigned long duration = (millis() - motionStartTime) / 1000; + Serial.print("✋ Motion stopped. Duration: "); + Serial.print(duration); + Serial.println(" seconds"); + stillStartTime = 0; + } + } + else if (motionDetected && inMotion) { + // Still in motion, reset still timer + stillStartTime = 0; + } +} + +void loop() { + if (isCalibrated) { + detectMotion(); + delay(50); + } +} +``` + +## Programming with MicroPython + +The Modulino Movement is fully compatible with MicroPython through the official Modulino MicroPython library. The following examples demonstrate how to read motion data from the 6-axis IMU and implement motion detection features in your MicroPython projects. + +### Prerequisites + +- Install the Modulino MicroPython library +- Ensure Arduino Lab for MicroPython is installed + +For detailed instructions on setting up your MicroPython environment and installing packages, please refer to the [Getting Started with Modulinos guide](./how-general). + +### Basic Example + +```python +from modulino import ModulinoMovement +from time import sleep_ms + +movement = ModulinoMovement() + +while True: + acc = movement.accelerometer + gyro = movement.gyro + + print(f"🏃 Accelerometer: x:{acc.x:>8.3f} y:{acc.y:>8.3f} z:{acc.z:>8.3f} g") + print(f"🌀 Gyroscope: x:{gyro.x:>8.3f} y:{gyro.y:>8.3f} z:{gyro.z:>8.3f} dps") + print("") + sleep_ms(100) +``` + +### Key Properties + +- `.accelerometer`: Returns acceleration values (x, y, z) in g +- `.gyro`: Returns angular velocity (x, y, z) in dps + +### Advanced Example - Step Counter + +```python +from modulino import ModulinoMovement +from time import sleep_ms, ticks_ms +import math + +movement = ModulinoMovement() + +# Step detection parameters +STEP_THRESHOLD = 1.2 # Magnitude threshold for step detection +MIN_STEP_INTERVAL = 300 # Minimum time between steps (ms) +MAX_STEP_INTERVAL = 2000 # Maximum time between steps (ms) + +# State tracking +step_count = 0 +last_step_time = 0 +last_magnitude = 0 +peak_detected = False + +# Calibration +calibration_samples = [] +baseline_magnitude = 1.0 + +def calculate_magnitude(x, y, z): + """Calculate the magnitude of acceleration vector""" + return math.sqrt(x*x + y*y + z*z) + +def calibrate(): + """Calibrate the baseline acceleration magnitude""" + global baseline_magnitude + + print("Calibrating... Keep device still") + samples = [] + + for _ in range(50): + acc = movement.accelerometer + mag = calculate_magnitude(acc.x, acc.y, acc.z) + samples.append(mag) + sleep_ms(20) + + baseline_magnitude = sum(samples) / len(samples) + print(f"Calibration complete. Baseline: {baseline_magnitude:.3f}g") + +def detect_step(): + """Detect steps based on acceleration patterns""" + global step_count, last_step_time, last_magnitude, peak_detected + + current_time = ticks_ms() + acc = movement.accelerometer + + # Calculate acceleration magnitude + magnitude = calculate_magnitude(acc.x, acc.y, acc.z) + + # Detect peaks in acceleration + if magnitude > STEP_THRESHOLD and magnitude > last_magnitude and not peak_detected: + # Check if enough time has passed since last step + time_since_last = current_time - last_step_time + + if time_since_last > MIN_STEP_INTERVAL: + if time_since_last < MAX_STEP_INTERVAL or step_count == 0: + step_count += 1 + last_step_time = current_time + peak_detected = True + + # Calculate step rate + if step_count > 1: + step_rate = 60000 / time_since_last # steps per minute + print(f"👣 Step {step_count} detected! Rate: {step_rate:.0f} spm") + else: + print(f"👣 Step {step_count} detected!") + + # Reset peak detection when magnitude drops + if magnitude < last_magnitude: + peak_detected = False + + last_magnitude = magnitude + +def calculate_distance(steps, stride_length=0.7): + """Estimate distance traveled based on steps""" + return steps * stride_length + +def calculate_calories(steps, weight_kg=70): + """Estimate calories burned based on steps""" + # Rough estimate: 0.04 calories per step per kg of body weight + return steps * 0.04 * weight_kg / 70 + +# Main program +print("🚶 Step Counter Application") +print("=" * 30) + +calibrate() +print("\nStart walking!") +print("Press Ctrl+C to see statistics\n") + +try: + while True: + detect_step() + sleep_ms(50) + +except KeyboardInterrupt: + # Display statistics + distance = calculate_distance(step_count) + calories = calculate_calories(step_count) + + print("\n" + "=" * 30) + print("📊 Walking Statistics:") + print(f" Total Steps: {step_count}") + print(f" Distance: {distance:.2f} meters") + print(f" Calories: {calories:.1f} kcal") + print("=" * 30) +``` + +## Troubleshooting + +### Sensor Not Reachable + +If your Modulino's power LED isn't on or the sensor isn't responsive: +- Ensure both the board and the Modulino are connected properly +- Verify that the power LEDs on both are lit +- Check that the QWIIC cable is properly clicked into place + +### Inaccurate Values + +If the sensor values are not accurate: +- Ensure the sensor is not on an unstable surface causing unwanted vibrations +- Verify exposed electronics are not touching conductive surfaces +- Mount the board securely when measuring precise movements +- Consider calibrating the sensor before use + +## Project Ideas + +- **Motion-Activated Alarm**: Trigger alerts when unexpected movement is detected +- **Balance Game**: Challenge players to keep the sensor level +- **Pedometer**: Count steps based on characteristic motion patterns +- **Gesture Recognition**: Detect specific motion patterns for control +- **Tilt Controller**: Use tilt angles to control games or robots +- **Vibration Monitor**: Detect and log vibrations in machinery +- **Fall Detection**: Identify sudden acceleration changes indicating falls +- **Orientation Tracker**: Monitor device orientation in 3D space \ No newline at end of file diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/image.png b/content/hardware/11.modulino/modulino-nodes/modulino-movement/tutorials/how-movement/image.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-ardu/image.png rename to content/hardware/11.modulino/modulino-nodes/modulino-movement/tutorials/how-movement/image.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-CERT_CE_EMC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-CERT_CE_EMC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-CERT_CE_EMC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-CERT_CE_EMC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-CERT_FCC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-CERT_FCC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-CERT_FCC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-CERT_FCC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-CERT_IC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-CERT_IC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-CERT_IC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-CERT_IC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-CERT_UKCA.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-CERT_UKCA.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-CERT_UKCA.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-CERT_UKCA.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-DoC_CE.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-DoC_CE.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-DoC_CE.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-DoC_CE.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-DoC_FCC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-DoC_FCC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-DoC_FCC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-DoC_FCC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-DoC_UKCA.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-DoC_UKCA.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-DoC_UKCA.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/certifications/Arduino_ABX00109-DoC_UKCA.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/compatibility.yml b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/compatibility.yml similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/compatibility.yml rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/compatibility.yml diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/datasheet/assets/BlockDiagramPixels.png b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/datasheet/assets/BlockDiagramPixels.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/datasheet/assets/BlockDiagramPixels.png rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/datasheet/assets/BlockDiagramPixels.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/datasheet/assets/I2CTag.png b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/datasheet/assets/I2CTag.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/datasheet/assets/I2CTag.png rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/datasheet/assets/I2CTag.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/datasheet/assets/LEDExtention.png b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/datasheet/assets/LEDExtention.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/datasheet/assets/LEDExtention.png rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/datasheet/assets/LEDExtention.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/datasheet/assets/Modulino_Pixels_Power_Tree.png b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/datasheet/assets/Modulino_Pixels_Power_Tree.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/datasheet/assets/Modulino_Pixels_Power_Tree.png rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/datasheet/assets/Modulino_Pixels_Power_Tree.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/datasheet/assets/PixelMec.png b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/datasheet/assets/PixelMec.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/datasheet/assets/PixelMec.png rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/datasheet/assets/PixelMec.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/datasheet/assets/PixelsPinouts.png b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/datasheet/assets/PixelsPinouts.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/datasheet/assets/PixelsPinouts.png rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/datasheet/assets/PixelsPinouts.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/datasheet/assets/featuredPix.png b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/datasheet/assets/featuredPix.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/datasheet/assets/featuredPix.png rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/datasheet/assets/featuredPix.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/datasheet/datasheet.md b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/datasheet/datasheet.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/datasheet/datasheet.md rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/datasheet/datasheet.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/downloads/ABX00109-cad-files.zip b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/downloads/ABX00109-cad-files.zip similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/downloads/ABX00109-cad-files.zip rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/downloads/ABX00109-cad-files.zip diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/downloads/ABX00109-schematics.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/downloads/ABX00109-schematics.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/downloads/ABX00109-schematics.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/downloads/ABX00109-schematics.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/downloads/ABX00109-step.zip b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/downloads/ABX00109-step.zip similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/downloads/ABX00109-step.zip rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/downloads/ABX00109-step.zip diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/essentials.md b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/essentials.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/essentials.md rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/essentials.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/features.md b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/features.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/features.md rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/features.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/image.svg b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/image.svg similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/image.svg rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/image.svg diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/interactive/ABX00109-pinout.png b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/interactive/ABX00109-pinout.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/interactive/ABX00109-pinout.png rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/interactive/ABX00109-pinout.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/product.md b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/product.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/product.md rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/product.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tech-specs.md b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/tech-specs.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/tech-specs.md rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/tech-specs.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tech-specs.yml b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/tech-specs.yml similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/tech-specs.yml rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/tech-specs.yml diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-pixels/tutorials/how-general b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/tutorials/how-general new file mode 120000 index 0000000000..3f77534684 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/tutorials/how-general @@ -0,0 +1 @@ +../../modulino-thermo/tutorials/how-general \ No newline at end of file diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/PixelsPinouts.png b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/tutorials/how-pixels/assets/PixelsPinouts.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/PixelsPinouts.png rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/tutorials/how-pixels/assets/PixelsPinouts.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/expansion-guide-pixels.png b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/tutorials/how-pixels/assets/expansion-guide-pixels.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-pixels/tutorials/how-pixels-ardu/assets/expansion-guide-pixels.png rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/tutorials/how-pixels/assets/expansion-guide-pixels.png diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-pixels/tutorials/how-pixels/assets/pixelsOverview.png b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/tutorials/how-pixels/assets/pixelsOverview.png new file mode 100644 index 0000000000..13526c3f7d Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/tutorials/how-pixels/assets/pixelsOverview.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-pixels/tutorials/how-pixels/content.md b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/tutorials/how-pixels/content.md new file mode 100644 index 0000000000..606191527c --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/tutorials/how-pixels/content.md @@ -0,0 +1,447 @@ +--- +title: "Getting Started with Modulino Pixels" +description: "Complete guide for the Modulino Pixels RGB LED module and programming with Arduino and MicroPython." +tags: + - Modulino + - LED + - RGB + - QWIIC + - I2C +author: 'Pedro Sousa Lima' +hardware: + - hardware/11.modulinos/modulinos/modulino-pixels +software: + - ide-v2 + - web-editor + - micropython +--- + +![Pixels Overview](assets/pixelsOverview.png) + +The Modulino Pixels is a modular sensor that generates RGB light effects, making it perfect to add colourful visual feedback to your projects! It features 8 individually addressable RGB LEDs controlled through I2C. + +## Hardware Overview + +### General Characteristics + +The Modulino Pixels is based on 8 LC8822-2020 addressable LEDs capable of generating colourful light patterns and effects. + +| Parameter | Condition | Minimum | Typical | Maximum | Unit | +|------------------|----------------|---------|---------|---------|------| +| Supply Voltage | - | 2.0 | 3.3 | 3.6 | V | +| Resolution (ADC) | Default | - | 12-bit | - | - | +| Communication | I2C,USART,SPI | - | I2C | - | - | + +### Module Details + +The **Modulino Pixels** module uses **LC8822-2020** addressable LEDs, which do not have native I2C capabilities. Instead, the LED array is controlled by the Modulino's onboard microcontroller (STM32C011F4U6TR). This microcontroller provides I2C communication, allowing for flexible control of the LEDs. + +One unique feature of this setup is the ability to change the I2C address via software, making it adaptable to different system configurations. + +The default I2C address for the **Modulino Pixels** module is: + +| Modulino I2C Address | Hardware I2C Address | Editable Addresses (HEX) | +|----------------------|----------------------|-----------------------------------| +| 0x6C | 0x36 | Any custom address (via software) | + +### Pinout + +![Modulino Pixels Pinout](assets/PixelsPinouts.png) + +#### 1x10 Header (LC8822-2020 and Microcontroller Signals) + +| Pin | Function | +|--------|-----------------| +| GND | Ground | +| GND | Ground | +| 3V3 | 3.3V Power | +| RESET | Reset | +| SWCLK | SWD Clock | +| SWDIO | SWD Data | +| TX1 | USART Transmit | +| RX1 | USART Receive | +| D0 | Pixels Data Out | +| C0 | Pixels Clock Out| + +The **D0** and **C0** pins allow for expansion by daisy-chaining additional LED strips. +![Expantion Pins](assets/expansion-guide-pixels.png) + +#### 1x4 Header (I2C) + +| Pin | Function | +|-------|--------------| +| GND | Ground | +| 3.3 V | Power Supply | +| SDA | I2C Data | +| SCL | I2C Clock | + +### Power Specifications + +| Parameter | Condition | Typical | Maximum | Unit | +|------------------------|----------------|---------|---------|------| +| Operating Voltage | - | 3.3 | - | V | +| Power Dissipation | - | - | 350 | mW | +| Standby Current | No data signal | - | 1 | mA | +| Max LED Output Current | Per Channel | 18 | - | mA | + +The module includes a power LED that draws 1 mA and turns on as soon as it is powered. + +## Programming with Arduino + +### Prerequisites + +- Install the Modulino library via the Arduino IDE Library Manager +- Connect your Modulino Knob via QWIIC or solderable headers + +For detailed instructions on setting up your Arduino environment and installing libraries, please refer to the [Getting Started with Modulinos guide](./how-general). + +Library repository available [here](https://github.com/arduino-libraries/Arduino_Modulino). + +### Basic Example + +```arduino +#include + +ModulinoPixels leds; + +int brightness = 25; + +void setup(){ + Modulino.begin(); + leds.begin(); +} + +void loop(){ + // Set all LEDs to blue + for (int i = 0; i < 8; i++) { + leds.set(i, BLUE, brightness); + leds.show(); + } +} +``` + +### Key Functions + +- `set(index, color, brightness)`: Sets a specific LED (0-7) to a colour with brightness +- `show()`: Applies the changes to the LEDs +- Available colours: `RED`, `BLUE`, `GREEN`, `VIOLET`, `WHITE` + +### Advanced Example - Rainbow Animation + +```arduino +#include + +ModulinoPixels leds; + +// Color definitions for rainbow +const int NUM_LEDS = 8; +int colors[][3] = { + {255, 0, 0}, // Red + {255, 127, 0}, // Orange + {255, 255, 0}, // Yellow + {0, 255, 0}, // Green + {0, 0, 255}, // Blue + {75, 0, 130}, // Indigo + {148, 0, 211}, // Violet + {255, 0, 0} // Back to Red +}; + +void setup() { + Serial.begin(9600); + Modulino.begin(); + leds.begin(); + + Serial.println("Rainbow Animation Started"); +} + +void rainbowCycle() { + static int offset = 0; + + for (int i = 0; i < NUM_LEDS; i++) { + int colorIndex = (i + offset) % NUM_LEDS; + + // Custom color setting using RGB values + // Since the library uses predefined colors, we'll use + // the closest match or cycle through available colors + switch(colorIndex) { + case 0: + case 7: + leds.set(i, RED, 50); + break; + case 1: + case 2: + leds.set(i, GREEN, 50); + break; + case 3: + case 4: + leds.set(i, BLUE, 50); + break; + case 5: + case 6: + leds.set(i, VIOLET, 50); + break; + } + } + + leds.show(); + offset = (offset + 1) % NUM_LEDS; +} + +void breathingEffect() { + static int brightness = 0; + static int direction = 1; + + // Update brightness + brightness += direction * 5; + + if (brightness >= 100 || brightness <= 0) { + direction = -direction; + } + + // Set all LEDs to same color with varying brightness + for (int i = 0; i < NUM_LEDS; i++) { + leds.set(i, BLUE, brightness); + } + leds.show(); +} + +void chaseEffect() { + static int position = 0; + + // Turn off all LEDs + for (int i = 0; i < NUM_LEDS; i++) { + leds.set(i, WHITE, 0); + } + + // Light up current position and trailing LEDs + leds.set(position, WHITE, 100); + if (position > 0) { + leds.set(position - 1, WHITE, 30); + } else { + leds.set(NUM_LEDS - 1, WHITE, 30); + } + + leds.show(); + position = (position + 1) % NUM_LEDS; +} + +void loop() { + // Cycle through different effects + for (int i = 0; i < 50; i++) { + rainbowCycle(); + delay(100); + } + + for (int i = 0; i < 100; i++) { + breathingEffect(); + delay(30); + } + + for (int i = 0; i < 30; i++) { + chaseEffect(); + delay(80); + } +} +``` + +## Programming with MicroPython + +### Prerequisites + +- Install the Modulino MicroPython library +- Ensure Arduino Lab for MicroPython is installed + +### Basic Example + +```python +from modulino import ModulinoPixels, ModulinoColor +from time import sleep + +pixels = ModulinoPixels() + +# Set all LEDs to green +pixels.set_all_color(ModulinoColor.GREEN, 100) +pixels.show() +sleep(1) + +# Turn off all LEDs +pixels.clear_all().show() +``` + +### Key Functions + +- `set_rgb(index, r, g, b, brightness)`: Set specific LED to RGB colour +- `set_all_rgb(r, g, b, brightness)`: Set all LEDs to RGB colour +- `set_all_color(color, brightness)`: Set all LEDs to predefined colour +- `clear_all()`: Turn off all LEDs +- `show()`: Send updated data to LEDs + +### Advanced Example - Interactive Light Patterns + +```python +from modulino import ModulinoPixels, ModulinoColor +from time import sleep, ticks_ms + +pixels = ModulinoPixels() + +def wheel(pos): + """Generate rainbow colors across 0-255 positions""" + if pos < 85: + return (255 - pos * 3, pos * 3, 0) + elif pos < 170: + pos -= 85 + return (0, 255 - pos * 3, pos * 3) + else: + pos -= 170 + return (pos * 3, 0, 255 - pos * 3) + +def rainbow_cycle(wait=0.01): + """Draw rainbow that uniformly distributes itself across all LEDs""" + for j in range(256): + for i in range(8): + pixel_index = (i * 256 // 8) + j + r, g, b = wheel(pixel_index & 255) + pixels.set_rgb(i, r, g, b, 50) + pixels.show() + sleep(wait) + +def color_wipe(r, g, b, wait=0.05): + """Wipe color across display a pixel at a time""" + for i in range(8): + pixels.set_rgb(i, r, g, b, 100) + pixels.show() + sleep(wait) + +def theater_chase(r, g, b, wait=0.1): + """Movie theater light style chaser animation""" + for q in range(3): + for i in range(0, 8, 3): + if i + q < 8: + pixels.set_rgb(i + q, r, g, b, 100) + pixels.show() + sleep(wait) + + for i in range(0, 8, 3): + if i + q < 8: + pixels.set_rgb(i + q, 0, 0, 0, 0) + +def pulse_color(r, g, b, duration=2): + """Pulse all LEDs with specified color""" + steps = 50 + for i in range(steps): + brightness = int((1 + i) * 100 / steps) + pixels.set_all_rgb(r, g, b, brightness) + pixels.show() + sleep(duration / (steps * 2)) + + for i in range(steps, 0, -1): + brightness = int(i * 100 / steps) + pixels.set_all_rgb(r, g, b, brightness) + pixels.show() + sleep(duration / (steps * 2)) + +def fire_effect(): + """Simulate fire/flame effect""" + import random + + # Base fire colors + base_r = 255 + base_g = 80 + base_b = 0 + + for _ in range(100): + for i in range(8): + # Add random flicker + flicker = random.randint(-40, 40) + r = max(0, min(255, base_r + flicker)) + g = max(0, min(255, base_g + flicker // 2)) + b = base_b + + brightness = random.randint(30, 100) + pixels.set_rgb(i, r, g, b, brightness) + + pixels.show() + sleep(0.05) + +def progress_bar(percentage, color_r=0, color_g=255, color_b=0): + """Display a progress bar""" + pixels.clear_all() + + # Calculate how many LEDs to light + leds_to_light = int((percentage / 100) * 8) + + for i in range(leds_to_light): + pixels.set_rgb(i, color_r, color_g, color_b, 100) + + # Partial LED for precise percentage + if leds_to_light < 8 and percentage > 0: + remainder = (percentage / 100 * 8) - leds_to_light + if remainder > 0: + brightness = int(remainder * 100) + pixels.set_rgb(leds_to_light, color_r, color_g, color_b, brightness) + + pixels.show() + +# Demo menu +print("LED Pattern Showcase") +print("====================") +patterns = [ + ("Rainbow Cycle", lambda: rainbow_cycle()), + ("Color Wipe - Red", lambda: color_wipe(255, 0, 0)), + ("Color Wipe - Green", lambda: color_wipe(0, 255, 0)), + ("Color Wipe - Blue", lambda: color_wipe(0, 0, 255)), + ("Theater Chase", lambda: theater_chase(127, 127, 127)), + ("Pulse White", lambda: pulse_color(255, 255, 255)), + ("Fire Effect", lambda: fire_effect()), + ("Progress Demo", lambda: [progress_bar(i) for i in range(0, 101, 5)]) +] + +for i, (name, _) in enumerate(patterns, 1): + print(f"{i}. {name}") + +while True: + choice = input("\nSelect pattern (1-8): ") + + try: + idx = int(choice) - 1 + if 0 <= idx < len(patterns): + name, pattern_func = patterns[idx] + print(f"Running: {name}") + pattern_func() + pixels.clear_all().show() + else: + print("Invalid selection") + except ValueError: + print("Please enter a number") + except KeyboardInterrupt: + pixels.clear_all().show() + print("\nExiting...") + break +``` + +## Troubleshooting + +### LEDs Not Lighting + +If your Modulino's power LED isn't on or the RGB LEDs aren't responsive: +- Ensure both the board and the Modulino are connected properly +- Verify that the power LEDs on both are lit +- Check that the QWIIC cable is properly clicked into place + +### Incorrect Colours or Flickering + +If the LED colours are incorrect or the LEDs are flickering: +- Verify brightness values are within the appropriate range (0-255) +- Check that exposed electronics are not touching conductive surfaces +- Ensure stable power supply with sufficient current for all LEDs + +## Project Ideas + +- **Progress Bar**: Visually display status or battery charge level +- **Sound Level Indicator**: Respond to ambient noise with light +- **Pomodoro Timer**: Colour-coded work and rest periods +- **Simon Game**: Match colour patterns in sequence +- **Notification System**: Different colours for different alerts +- **Mood Lighting**: Create ambient lighting effects +- **Temperature Indicator**: Use with Modulino Thermo for visual temperature feedback +- **Music Visualiser**: Sync lights to music or sounds \ No newline at end of file diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/image.png b/content/hardware/11.modulino/modulino-nodes/modulino-pixels/tutorials/how-pixels/image.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-distance/tutorials/how-distance-mp/image.png rename to content/hardware/11.modulino/modulino-nodes/modulino-pixels/tutorials/how-pixels/image.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-CERT_CE_EMC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-CERT_CE_EMC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-CERT_CE_EMC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-CERT_CE_EMC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-CERT_FCC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-CERT_FCC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-CERT_FCC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-CERT_FCC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-CERT_IC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-CERT_IC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-CERT_IC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-CERT_IC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-CERT_UKCA.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-CERT_UKCA.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-CERT_UKCA.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-CERT_UKCA.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-DoC_CE.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-DoC_CE.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-DoC_CE.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-DoC_CE.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-DoC_FCC.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-DoC_FCC.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-DoC_FCC.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-DoC_FCC.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-DoC_UKCA.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-DoC_UKCA.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-DoC_UKCA.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/certifications/Arduino_ABX00103-DoC_UKCA.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/compatibility.yml b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/compatibility.yml similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/compatibility.yml rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/compatibility.yml diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/datasheet/assets/BlockDiagramThermo.png b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/datasheet/assets/BlockDiagramThermo.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/datasheet/assets/BlockDiagramThermo.png rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/datasheet/assets/BlockDiagramThermo.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/datasheet/assets/Modulino_Thermo_Power_Tree.png b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/datasheet/assets/Modulino_Thermo_Power_Tree.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/datasheet/assets/Modulino_Thermo_Power_Tree.png rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/datasheet/assets/Modulino_Thermo_Power_Tree.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/datasheet/assets/TempMec.png b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/datasheet/assets/TempMec.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/datasheet/assets/TempMec.png rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/datasheet/assets/TempMec.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/datasheet/assets/ThermoPinouts.png b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/datasheet/assets/ThermoPinouts.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/datasheet/assets/ThermoPinouts.png rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/datasheet/assets/ThermoPinouts.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/datasheet/assets/featuredTherm.png b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/datasheet/assets/featuredTherm.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/datasheet/assets/featuredTherm.png rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/datasheet/assets/featuredTherm.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/datasheet/datasheet.md b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/datasheet/datasheet.md similarity index 95% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/datasheet/datasheet.md rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/datasheet/datasheet.md index fd8f8ebdea..6fc875f6f3 100644 --- a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/datasheet/datasheet.md +++ b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/datasheet/datasheet.md @@ -43,9 +43,9 @@ The Modulino® Thermo node can be used in numerous scenarios within IoT and elec ## Related Products -- *SKU: ASX00027* – [Arduino® Sensor Kit](https://store.arduino.cc/products/arduino-sensor-kit) -- *SKU: K000007* – [Arduino® Starter Kit](https://store.arduino.cc/products/arduino-starter-kit-multi-language) -- *SKU: AKX00026* – [Arduino® Oplà IoT Kit](https://store.arduino.cc/products/opla-iot-kit) +- **SKU: ASX00027** – [Arduino® Sensor Kit](https://store.arduino.cc/products/arduino-sensor-kit) +- **SKU: K000007** – [Arduino® Starter Kit](https://store.arduino.cc/products/arduino-starter-kit-multi-language) +- **SKU: AKX00026** – [Arduino® Oplà IoT Kit](https://store.arduino.cc/products/opla-iot-kit) ## Rating @@ -111,9 +111,8 @@ These pads and the Qwiic connectors share the same I2C bus. You can optionally s ### I2C Address Reference | **Board Silk Name** | **Sensor** | **Modulino® I2C Address (HEX)** | **Editable Addresses (HEX)** | **Hardware I2C Address (HEX)** | |---------------------|-----------|--------------------------------|------------------------------------------|--------------------------------| -| MODULINO THERMO | HS3003 | 0x44 | Any custom address (via software config) | 0x44 | +| MODULINO THERMO | HS3003 | 0x44 | Custom address not supported | 0x44 | -**Note:** Default address is **0x44**. Adjustments may be made via software if multiple identical sensors are on the same bus. ## Device Operation The Modulino® Thermo node acts as an I2C target device on the Qwiic bus. Simply connect it via a Qwiic cable to the 3.3 V I2C interface of your microcontroller. Read humidity and temperature values via standard I2C transactions. @@ -201,6 +200,7 @@ Operation is subject to the following two conditions: # Revision History | **Date** | **Revision** | **Changes** | | ---------- | ------------ | -------------------- | +| 24/11/2025 | 5 | I2C information changed | | 01/07/2025 | 4 | Certification | | 17/06/2025 | 3 | Nomenclature updates | | 23/05/2025 | 2 | Power info | diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/downloads/ABX00103-cad-files.zip b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/downloads/ABX00103-cad-files.zip similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/downloads/ABX00103-cad-files.zip rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/downloads/ABX00103-cad-files.zip diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/downloads/ABX00103-schematics.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/downloads/ABX00103-schematics.pdf similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/downloads/ABX00103-schematics.pdf rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/downloads/ABX00103-schematics.pdf diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/downloads/ABX00103-step.zip b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/downloads/ABX00103-step.zip similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/downloads/ABX00103-step.zip rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/downloads/ABX00103-step.zip diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/essentials.md b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/essentials.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/essentials.md rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/essentials.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/features.md b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/features.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/features.md rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/features.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/image.svg b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/image.svg similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/image.svg rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/image.svg diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/interactive/ABX00103-pinout.png b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/interactive/ABX00103-pinout.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/interactive/ABX00103-pinout.png rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/interactive/ABX00103-pinout.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/product.md b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/product.md similarity index 84% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/product.md rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/product.md index 763c6850f3..dc1c2b5c66 100644 --- a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/product.md +++ b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/product.md @@ -2,10 +2,10 @@ title: Modulino Thermo url_shop: https://store.arduino.cc/products/modulino-thermo url_guide: https://courses.arduino.cc/plugandmake -primary_button_url: https://docs.arduino.cc/tutorials/modulino-thermo/how-thermo-ardu/ -primary_button_title: With Arduino -secondary_button_url: https://docs.arduino.cc/tutorials/modulino-thermo/how-thermo-mp/ -secondary_button_title: With MicroPython +primary_button_url: https://docs.arduino.cc/tutorials/modulino-thermo/how-thermo/ +primary_button_title: Get Started +secondary_button_url: https://docs.arduino.cc/tutorials/modulino-thermo/how-general/ +secondary_button_title: More on Modulino Nodes forumCategorySlug: '/hardware/accessories/modulino-thermo/220' sku: [ABX00103] --- diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tech-specs.md b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tech-specs.md similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/tech-specs.md rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/tech-specs.md diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tech-specs.yml b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tech-specs.yml similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/tech-specs.yml rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/tech-specs.yml diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/ThermoOverview.png b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/ThermoOverview.png new file mode 100644 index 0000000000..31fd0ba8e5 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/ThermoOverview.png differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/IDE-Left-Tab.png b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/assets/IDE-Left-Tab.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/IDE-Left-Tab.png rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/assets/IDE-Left-Tab.png diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/assets/adressChangeFile.png b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/assets/adressChangeFile.png new file mode 100644 index 0000000000..261226b331 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/assets/adressChangeFile.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/assets/connection-guide-gen-jumper.png b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/assets/connection-guide-gen-jumper.png new file mode 100644 index 0000000000..81b8b83eb0 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/assets/connection-guide-gen-jumper.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/assets/connection-guide-gen.png b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/assets/connection-guide-gen.png new file mode 100644 index 0000000000..b9b45cb39f Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/assets/connection-guide-gen.png differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/connection-guide-thermo-qwiic-chain.png b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/assets/connection-guide-thermo-qwiic-chain.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/connection-guide-thermo-qwiic-chain.png rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/assets/connection-guide-thermo-qwiic-chain.png diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/library-install.gif b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/assets/library-install.gif similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-ardu/assets/library-install.gif rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/assets/library-install.gif diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/package-installer-overview.png b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/assets/package-installer-overview.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-buttons/tutorials/how-buttons-mp/assets/package-installer-overview.png rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/assets/package-installer-overview.png diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/connection-guide-gen-qwiic.png b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/connection-guide-gen-qwiic.png new file mode 100644 index 0000000000..c49ac03586 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/connection-guide-gen-qwiic.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/content.md b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/content.md new file mode 100644 index 0000000000..5e0ecfc0cc --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/content.md @@ -0,0 +1,257 @@ +--- +title: "Getting Started with Modulino" +description: "Learn the fundamentals of connecting, configuring, and programming Modulino sensors and actuators." +tags: + - Modulino + - QWIIC + - I2C +author: 'Arduino Team' +hardware: + - hardware/11.modulinos/modulinos +software: + - ide-v2 + - web-editor + - micropython +--- + +The Modulino ecosystem provides modular sensors and actuators that streamline prototyping and development. Each module follows a standardised form factor with QWIIC connectors and I²C protocol integration, allowing simple connection and programming of multiple nodes. In addition to QWIIC connectors, Modulino nodes expose solderable pins for compatibility with boards that don't support QWIIC. + +## The Modulino System + +Modulinos are designed to work seamlessly together through: +- **Standardised QWIIC connectors** for plug-and-play connectivity +- **I²C communication** for simple two-wire data transfer +- **Daisy-chain capability** for connecting multiple nodes +- **Compact form factor** for space-efficient designs +- **Cross-platform support** for Arduino and MicroPython + +## How To Connect Your Modulino + +The easiest and most reliable way to connect your Modulino is through the QWIIC Connect System. It's plug-and-play, uses standard I²C, and makes it easy to join multiple nodes. If your board supports QWIIC, this is the recommended way to go. + +Note that the dedicated I²C pins will differ from board to board, meaning it is always a good idea to check your specific model. + +![Connection Options](assets/connection-guide-gen.png) + +### QWIIC Connector (Recommended) + +Whenever available, the **QWIIC Connect System** is the preferred method. Connecting to the Modulino is extremely simple—just use a standard QWIIC cable to connect your board to either of the QWIIC connectors on the Modulino. Because the cable and connectors are polarised, there is no need to worry about accidentally swapping connections. + +![QWIIC Connection](connection-guide-gen-qwiic.png) + +QWIIC is a plug-and-play I²C Connect System that uses standardised 4-pin connectors: +- GND +- 3.3V +- SDA (Data) +- SCL (Clock) + +The Modulino features two QWIIC connectors, which are internally connected in parallel. This means you can daisy-chain multiple modules easily by connecting additional QWIIC cables between them. + +### Solderable Header + +When QWIIC is not available, you can use the exposed solderable pins on the node. You can solder pins to the unpopulated pads; just remember the pinout provided in each node's guide to connect to the right pins of your board. + +![Solderable Header](assets/connection-guide-gen-jumper.png) + +### Daisy-Chaining Multiple Modulino Nodes + +Regardless of whether you connect the first Modulino via QWIIC or through the solderable pins, you can still take advantage of the extra QWIIC connector to daisy-chain additional nodes. + +![QWIIC Chain](assets/connection-guide-thermo-qwiic-chain.png) + +Each Modulino includes two QWIIC connectors wired in parallel, allowing you to connect one node to the next in a chain. As long as each node is configured with a unique I²C address, they can all communicate on the same bus. + +This approach keeps your setup clean, modular, and expandable without adding extra wiring complexity. + +***Important considerations for daisy-chaining:*** +- The number of nodes you can connect will depend on what nodes you are chaining together, as this system allows for multiple sensors from different manufacturers to be added +- The cables you use for these connections will play a significant role in the setup's performance +- Ensure your cables are properly connected and capable of handling the required data transfer +- Each node should have a unique address on a chain if you plan to address them individually +- Multiple nodes with the same address will cause conflicts on the I²C bus and will not allow you to address them individually + +## Power Specifications + +All Modulino nodes are typically powered by **+3.3 VDC** when using the QWIIC interface as per the I²C standard. Each node includes: +- Power LED indicator (typically draws 1 mA) +- Shared power distribution between QWIIC connectors and headers +- Protection against reverse polarity (on most nodes) + +Always check your specific node's documentation for detailed power consumption specifications. + +## Installing The Modulino Library + +### For Arduino IDE + +You need the official Modulino library to use any Modulino node with Arduino. The Arduino IDE provides tools that make adding a library straightforward. + +To install the IDE, please visit our [getting started page](https://docs.arduino.cc/software/ide-v2/tutorials/getting-started/ide-v2-downloading-and-installing/). + +After opening the IDE: +1. Look for the tab on the left side +2. Click the book icon for "Library Manager" +![Library Tab](assets/IDE-Left-Tab.png) +3. Search for "Modulino" in the search box +4. Click "Install" +![Library Manager](assets/library-install.gif) + +A prompt might appear saying that additional dependencies are required. This is not a problem, as they will be automatically added when you confirm the prompt. + +**Important Wire Configuration:** +By default, the Modulino library uses `Wire1`. If your board model has a different pinout for the dedicated I²C pins, you might have to edit it. Check [here](https://docs.arduino.cc/language-reference/en/functions/communication/wire/) for more information on Wire configuration. + +### For MicroPython + +To program your Modulino with MicroPython, use the official `Modulino` MicroPython library available [here](https://github.com/arduino/arduino-modulino-mpy). The library is fully compatible with the Arduino Lab for MicroPython. + +For information on installing the **Arduino Lab for MicroPython**, please visit our [installation guide](https://docs.arduino.cc/micropython/first-steps/install-guide/). + +The `Modulino` library is not available by default on MicroPython devices, hence installation is needed. + +#### Using the MicroPython Package Installer + +To simplify the process, the [MicroPython Package Installer](https://github.com/arduino/lab-micropython-package-installer/releases) is recommended as it provides a graphical interface to guide installation. + +1. Open the tool +2. Plug in your board to the computer + If the board does not appear in the Detected Boards section, click Reload + If the board is still undetected, ensure no other programs are using the board's COM port + ![alt text](assets/package-installer-overview.png) +1. Search for the `Modulino` package by filling in the text box on the search feature +2. Click Install and wait for the installation confirmation +3. Disconnect the board from the tool before returning to your code editor to avoid conflicts due to a busy COM port + +After installation, you can import modules using: +```python +from modulino import ModulinoThermo, ModulinoBuzzer, ModulinoButtons +# Import the specific modules you need +``` + +**Wire Configuration for MicroPython:** +By default, the Modulino library uses `Wire1`. If your board model has a different pinout for the dedicated I²C pins, you might have to edit it as instructed [here](https://github.com/arduino/arduino-modulino-mpy/tree/main/docs#ℹ️-using-3rd-party-boards). + +## How To Change I²C Address + +Some Modulino nodes support software-configurable I²C addresses, allowing multiple identical nodes to work on the same bus. Nodes with fixed addresses cannot be changed and will require alternative solutions for multiple units. + +### For Arduino (Software-Configurable Modules) + +An example sketch, `AddressChanger`, is included with the library inside the `Utilities` folder and available [here](https://github.com/arduino-libraries/Modulino/blob/main/examples/Utilities/AddressChanger/AddressChanger.ino). + +![Sketch Location](assets/adressChangeFile.png) + +To change the address: +1. Connect the node to your board (remove any other nodes from the chain) +2. Upload the AddressChanger sketch +3. Open the Serial Monitor (115200 baud) +4. The sketch will scan and display all detected Modulino nodes with their current addresses +5. When prompted, enter two hexadecimal numbers separated by a space in the format: ` ` +6. **Important:** Enter addresses **without** the "0x" prefix and with a space between them (example: `3A 3B`) +7. Special commands: Enter `
0` to reset the device at the specified address to its default, or `0 0` to reset all devices to their defaults +8. Valid I²C addresses range from **0x08 to 0x77** (7-bit hexadecimal format) + +**Example usage:** +``` +> 3A 3B (changes address from 0x3A to 0x3B) +> 3C 0 (resets device at 0x3C to default address) +> 0 0 (resets all devices to default addresses) +``` + +When using a custom address in your sketch, specify this address when creating the module object: +```arduino +ModulinoBuzzer buzzer(0x3E); // Replace 0x3E with your specific address +``` + +### For MicroPython (Software-Configurable Modules) + +A script is available [here](https://github.com/arduino/arduino-modulino-mpy/blob/main/examples/change_address.py). + +To change the address: +1. Connect the node to your board via I²C (ensure no other modules are in the chain) +2. Run the script in a MicroPython environment +3. Follow the on-screen instructions (REPL) to select the device and enter a new address +4. The script will attempt to change the address and confirm success + +When using a custom address in MicroPython: +```python +buzzer_module = ModulinoBuzzer(address=0x45) # Replace 0x45 with your specific address +``` + +### Tracking Address Changes + +To keep track of the address in use, nodes have a white rectangle on the back. Use this space to write the selected address for future reference. + +## Node Addressing Reference + +| Node | Default Modulino Address | Hardware Address | Configurable | +|--------|-------------------------|------------------|--------------| +| Buttons | 0x7C | 0x3E | Software | +| Buzzer | 0x3C | 0x1E | Software | +| Distance | 0x52 | 0x52 | No | +| Knob | 0x76 | 0x3A | Software | +| Movement | 0x6A | 0x6A | Hardware (0x6A/0x6B) | +| Pixels | 0x6C | 0x36 | Software | +| Thermo | 0x44 | 0x44 | No | + +When scanning for I²C addresses on the bus, you might find the Modulino node using the **Hardware I²C Address**. However, you should always use the **Modulino I²C Address** when using the official Modulino library. + +## General Troubleshooting + +### Node Not Responding + +If your Modulino's power LED isn't on or the node isn't responsive: +- Ensure both the board and the Modulino are connected to your computer +- Verify that the power LEDs on both are lit +- Check that the QWIIC cable is properly clicked into place +- Verify the node is receiving 3.3V power + +### Library Not Installed Properly + +**Arduino IDE:** +If you encounter an issue with the `#include "Modulino.h"` command: +- Check your IDE to ensure the library is installed and up-to-date +- Re-install the library through the Library Manager +- Verify all dependencies were installed + +**MicroPython:** +If you encounter an issue with `from modulino import` commands: +- Check the package installer to ensure the library is installed +- Re-install the library through the Package Installer +- Ensure the board was disconnected from other programs during installation + +### I²C Communication Issues + +- Verify correct Wire configuration (Wire vs Wire1) +- Check for address conflicts between modules +- Ensure pull-up resistors are present on the I²C bus +- Verify cable length isn't exceeding I²C specifications +- Check that all connections are secure + +### Inaccurate Sensor Values + +- Ensure all exposed electronics are not touching conductive surfaces +- Verify the module is not placed near interference sources +- Check that power supply is stable and within specifications +- Allow sensors time to stabilise after power-on + +## Best Practices + +1. **Power Management**: Always use 3.3V for QWIIC connections. Never exceed voltage specifications. + +2. **Cable Management**: Use appropriate length QWIIC cables. Excessive cable length can cause signal degradation. + +3. **Address Management**: Document all address changes on the white label provided on each node. + +4. **Environmental Considerations**: Keep nodes away from sources of electromagnetic interference, excessive heat, or moisture unless specifically rated for such conditions. + +5. **Development Workflow**: Test nodes individually before connecting them in a chain to isolate any issues. + +## What's Next? + +Now that you understand the fundamentals of the Modulino system: +- Explore individual node guides for specific features and capabilities +- Experiment with combining multiple nodes in your projects +- Share your creations with the Arduino community +- Check for updates and new nodes in the Modulino ecosystem + +For detailed information about specific nodes, refer to their individual documentation pages, which include pinouts, specifications, and programming examples for both Arduino and MicroPython. \ No newline at end of file diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/image.png b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/image.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-ardu/image.png rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-general/image.png diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-thermo/ThermoOverview.png b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-thermo/ThermoOverview.png new file mode 100644 index 0000000000..31fd0ba8e5 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-thermo/ThermoOverview.png differ diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/ThermoPinouts.jpg b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-thermo/assets/ThermoPinouts.jpg similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-thermo/tutorials/how-thermo-ardu/assets/ThermoPinouts.jpg rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-thermo/assets/ThermoPinouts.jpg diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-thermo/content.md b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-thermo/content.md new file mode 100644 index 0000000000..80e56533b6 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-thermo/content.md @@ -0,0 +1,324 @@ +--- +title: "Getting Started with Modulino Thermo" +description: "Complete guide for the Modulino Thermo and programming with Arduino and MicroPython." +tags: + - Modulino + - Temperature + - Humidity + - QWIIC + - I2C +author: 'Pedro Sousa Lima' +hardware: + - hardware/11.modulinos/modulinos/modulino-thermo +software: + - ide-v2 + - web-editor + - micropython +--- + +![Thermo Overview](ThermoOverview.png) + +The Modulino Thermo is a modular sensor that measures temperature and humidity, making it perfect to add environmental monitoring to your projects! It uses the standardised Modulino form factor with QWIIC connectors for easy integration. + +## Hardware Overview + +### General Characteristics + +The Modulino Thermo is capable of measuring temperature and relative humidity with the following specifications: + +| Parameter | Condition | Minimum | Typical | Maximum | Unit | +|-----------|-------------|---------|---------|---------|------| +| Range | Temperature | -40 | - | +125 | °C | +| - | Humidity | 0 | - | 100 | φ RH | +| Accuracy | Temperature | - | ±0.25 | - | °C | +| - | Humidity | - | ±2.8 | - | φ | + +### Sensor Details + +The **HS3003** sensor from Renesas is the core component of this module. This temperature and humidity sensor natively supports digital communication (I2C), meaning it connects directly to the I2C bus on the module without requiring additional conversion circuitry. + +The default address for the Module is: + +| Modulino I2C Address | Hardware I2C Address | +|----------------------|----------------------| +| 0x44 | 0x44 | + +***Note: Since the address cannot be changed on this Modulino specifically, using two or more identical modules on the same I2C bus will result in address conflicts and cause communication issues.*** + +### Pinout + +![Modulino Thermo Pinout](assets/ThermoPinouts.jpg) + +#### 1x4 Header (I2C) + +| Pin | Function | +|-------|--------------| +| GND | Ground | +| 3.3 V | Power Supply | +| SDA | I2C Data | +| SCL | I2C Clock | + +### Power Specifications + +The board is typically powered by +3.3 VDC when using the QWIIC interface as per the I2C standard. + +| Parameter | Condition | Minimum | Typical | Maximum | Unit | +|-----------------|---------------------------------------------------|---------|-------------|---------|------| +| Supply Voltage | - | 2.3 | 3.3 (QWIIC) | 5.5 | V | +| Average Current | 1 humidity + temperature measurement/s @ 3.3 VDD | - | 24.4 | 1024.4 | µA | + +The module includes a power LED that draws 1 mA and turns on as soon as it is powered. J1 (QWIIC connector), J2 (QWIIC connector), and the headers all share the same power branch. + +### Schematic + +The Modulino Thermo uses a simple circuit built around the **HS3003** sensor (U1), which handles both temperature and humidity measurements, as well as I2C communication. + +You can connect to the I2C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, recommended) or the **solderable pins** (J4). The board runs on **3.3V** from the QWIIC cable or the **3V3 pin** on J4. + +Full schematic and PCB files are available from the [Modulino Thermo page](https://docs.arduino.cc/hardware/modulinos/modulino-thermo). + +## Programming with Arduino + +### Prerequisites + +- Install the Modulino library via the Arduino IDE Library Manager +- Connect your Modulino Knob via QWIIC or solderable headers + +For detailed instructions on setting up your Arduino environment and installing libraries, please refer to the [Getting Started with Modulinos guide](./how-general). + +Library repository available [here](https://github.com/arduino-libraries/Arduino_Modulino). + +### Basic Example + +```arduino +#include + +// Create object instance +ModulinoThermo thermo; + +// Global Variables +float celsius = 0; +float humidity = 0; + +void setup(){ + // Initialization of the serial port, modulino object and thermo one + Serial.begin(115200); + Modulino.begin(); + thermo.begin(); +} + +void loop(){ + celsius = thermo.getTemperature(); + humidity = thermo.getHumidity(); + + Serial.print("Temperature (C) is: "); + Serial.println(celsius); + + Serial.print("Humidity (rH) is: "); + Serial.println(humidity); + + delay(1000); +} +``` + +### Key Functions + +- `getTemperature()`: Returns temperature measurement in Celsius +- `getHumidity()`: Returns relative humidity as a percentage +- `Modulino.begin()`: Initialises the Modulino system (uses `Wire1` by default) + +### Advanced Example - Temperature Alert System + +```arduino +#include + +ModulinoThermo thermo; +const float TEMP_THRESHOLD = 25.0; // Alert above 25°C +const float HUMIDITY_THRESHOLD = 70.0; // Alert above 70% humidity + +void setup(){ + Serial.begin(115200); + Modulino.begin(); + thermo.begin(); + + Serial.println("Environmental Monitor Started"); +} + +void loop(){ + float temp = thermo.getTemperature(); + float hum = thermo.getHumidity(); + + // Check temperature threshold + if(temp > TEMP_THRESHOLD) { + Serial.print("⚠️ HIGH TEMPERATURE: "); + Serial.print(temp); + Serial.println("°C"); + } + + // Check humidity threshold + if(hum > HUMIDITY_THRESHOLD) { + Serial.print("⚠️ HIGH HUMIDITY: "); + Serial.print(hum); + Serial.println("%"); + } + + // Normal readings + if(temp <= TEMP_THRESHOLD && hum <= HUMIDITY_THRESHOLD) { + Serial.print("Normal - Temp: "); + Serial.print(temp); + Serial.print("°C, Humidity: "); + Serial.print(hum); + Serial.println("%"); + } + + delay(5000); // Check every 5 seconds +} +``` + +## Programming with MicroPython + +### Prerequisites + +- Install the Modulino MicroPython library (see [Getting Started with Modulinos](./how-general) for detailed instructions) +- Ensure Arduino Lab for MicroPython is installed + +### Basic Example + +```python +from modulino import ModulinoThermo +from time import sleep + +thermo_module = ModulinoThermo() + +while True: + temperature = thermo_module.temperature + humidity = thermo_module.relative_humidity + + if temperature != None and humidity != None: + print(f"🌡️ Temperature: {temperature:.1f} °C") + print(f"💧 Humidity: {humidity:.1f} %") + print() + + sleep(2) +``` + +### Key Properties + +- `.temperature`: Returns temperature measurement in Celsius +- `.relative_humidity`: Returns relative humidity as a percentage + +### Advanced Example - Data Logger + +```python +from modulino import ModulinoThermo +from time import sleep, ticks_ms + +thermo = ModulinoThermo() + +# Configuration +LOG_INTERVAL = 60000 # Log every minute (in milliseconds) +SAMPLES_TO_KEEP = 60 # Keep last hour of data + +# Data storage +data_log = [] +last_log_time = ticks_ms() + +def calculate_average(values): + """Calculate average of a list of values""" + if not values: + return 0 + return sum(values) / len(values) + +def log_data(): + """Log temperature and humidity data""" + temp = thermo.temperature + hum = thermo.relative_humidity + + if temp is not None and hum is not None: + timestamp = ticks_ms() + data_log.append({ + 'time': timestamp, + 'temp': temp, + 'humidity': hum + }) + + # Keep only recent samples + if len(data_log) > SAMPLES_TO_KEEP: + data_log.pop(0) + + return True + return False + +def print_statistics(): + """Print statistics from logged data""" + if not data_log: + print("No data collected yet") + return + + temps = [d['temp'] for d in data_log] + hums = [d['humidity'] for d in data_log] + + print("\n📊 Statistics (last hour):") + print(f" Samples: {len(data_log)}") + print(f" Avg Temp: {calculate_average(temps):.1f}°C") + print(f" Min Temp: {min(temps):.1f}°C") + print(f" Max Temp: {max(temps):.1f}°C") + print(f" Avg Humidity: {calculate_average(hums):.1f}%") + print(f" Min Humidity: {min(hums):.1f}%") + print(f" Max Humidity: {max(hums):.1f}%") + +# Main loop +print("🌡️ Environmental Data Logger Started") +print("Logging data every minute...") + +while True: + current_time = ticks_ms() + + # Log data at intervals + if current_time - last_log_time >= LOG_INTERVAL: + if log_data(): + print(f"✅ Data logged: {thermo.temperature:.1f}°C, {thermo.relative_humidity:.1f}%") + print_statistics() + last_log_time = current_time + + # Show current readings + temp = thermo.temperature + hum = thermo.relative_humidity + if temp is not None and hum is not None: + print(f"Current: {temp:.1f}°C, {hum:.1f}%", end='\r') + + sleep(1) +``` + +## Troubleshooting + +### Sensor Not Reachable + +If your Modulino's power LED isn't on or the sensor isn't responsive: +- Ensure both the board and the Modulino are connected to your computer +- Verify that the power LEDs on both are lit +- Check that the QWIIC cable is properly clicked into place + +### Inaccurate Values + +If the sensor values are not accurate: +- Ensure the sensor is not placed near heat-generating components (motors, power supplies) +- Verify all exposed electronics are not touching conductive surfaces +- Allow the sensor time to stabilise after power-on + +### Library Issues + +See the [Getting Started with Modulinos](./how-general) guide for library installation troubleshooting. + +## Project Ideas + +Now that you've learned how to use your Modulino Thermo, try these projects: + +- **Smart Greenhouse Monitor**: Track temperature and humidity for optimal plant growth +- **Weather Station**: Combine with other Modulinos to create a complete weather monitoring system +- **HVAC Controller**: Monitor room conditions and trigger heating/cooling systems +- **Food Storage Monitor**: Ensure proper conditions in pantries or wine cellars +- **Data Logger**: Record environmental conditions over time for analysis +- **Comfort Zone Indicator**: Use with Modulino Pixels to show comfort levels with colours +- **Morning Routine Assistant**: Check if the bathroom is warm enough before your shower +- **Pet Habitat Monitor**: Ensure reptile or tropical fish environments stay optimal \ No newline at end of file diff --git a/content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/image.png b/content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-thermo/image.png similarity index 100% rename from content/hardware/11.accessories/modulino-nodes/modulino-movement/tutorials/how-movement-mp/image.png rename to content/hardware/11.modulino/modulino-nodes/modulino-thermo/tutorials/how-thermo/image.png diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/compatibility.yml b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/compatibility.yml new file mode 100644 index 0000000000..f0008fc25d --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/compatibility.yml @@ -0,0 +1,17 @@ +software: + - arduino-ide + - arduino-cli + - web-editor +hardware: + boards: + - nano-33-iot + - nano-33-ble + - nano-33-ble-sense + - nano-rp2040-connect + - nano-esp32 + - nano-matter + - uno-r4-wifi + - uno-q + shields: ~ + carriers: + - nano-connector-carrier diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/GenMech.png b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/GenMech.png new file mode 100644 index 0000000000..809a8d6213 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/GenMech.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/I2CTag.png b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/I2CTag.png new file mode 100644 index 0000000000..5e290c908a Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/I2CTag.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/Modulino_Vibro_Block_Diagram.png b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/Modulino_Vibro_Block_Diagram.png new file mode 100644 index 0000000000..d501e73b3f Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/Modulino_Vibro_Block_Diagram.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/Modulino_Vibro_Power_Tree.png b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/Modulino_Vibro_Power_Tree.png new file mode 100644 index 0000000000..ad31ebc3a3 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/Modulino_Vibro_Power_Tree.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/ResistorsPullupGen.png b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/ResistorsPullupGen.png new file mode 100644 index 0000000000..7095581413 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/ResistorsPullupGen.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/VibroMec.png b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/VibroMec.png new file mode 100644 index 0000000000..10f9388699 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/VibroMec.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/VibroPinouts.png b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/VibroPinouts.png new file mode 100644 index 0000000000..62ee93ab74 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/VibroPinouts.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/featured.png b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/featured.png new file mode 100644 index 0000000000..5e189df4b3 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/assets/featured.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/datasheet.md b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/datasheet.md new file mode 100644 index 0000000000..8a8d743722 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/datasheet/datasheet.md @@ -0,0 +1,235 @@ +--- +identifier: ABX00130 +title: Arduino® Modulino® Vibro +type: maker +author: Pedro Sousa Lima +--- + +![](assets/featured.png) + +# Description + +The Arduino Modulino® Vibro, powered by an on-board STM32C011F4 microcontroller, features a compact vibration motor (VZ43FM1B8230001L) for haptic feedback and alert applications. This setup enables simple vibration control via I2C and provides tactile notifications for various interactive projects. + +# Target Areas + +Maker, beginner, education + +# Contents +## Application Examples + +- **Haptic Feedback** + Provide tactile notifications in wearable devices, gaming controllers, or interactive interfaces to enhance user experience. + +- **Alert Systems** + Create vibration-based alerts for notifications, alarms, or status indicators in IoT projects where audio alerts might not be suitable. + +- **Interactive Art** + Integrate tactile feedback into art installations, musical instruments, or sensory experiences to create engaging multi-modal interactions. + +
+ +## Features +- **Compact vibration motor** (VZ43FM1B8230001L) providing strong tactile feedback at 12,000 rpm. +- Integrated **STM32C011F4** microcontroller providing I2C interface by default. +- **N-channel MOSFET** (2N7002KT1G) for efficient motor control.. +- Designed for **3.3V** operation via the Qwiic connector (I2C). +- Ideal for **haptic feedback** and **vibration alerts** in interactive projects. + +### Contents +| **SKU** | **Name** | **Purpose** | **Quantity** | +| ---------- | --------------------- | -------------------------------------- | ------------ | +| ABX00130 | Modulino® Vibro | Vibration motor for haptic feedback | 1 | +| | I2C Qwiic cable | Compatible with the Qwiic standard | 1 | + +## Related Products +- *SKU: ASX00027* - [Arduino® Sensor Kit](https://store.arduino.cc/products/arduino-sensor-kit) +- *SKU: K000007* - [Arduino® Starter Kit](https://store.arduino.cc/products/arduino-starter-kit-multi-language) +- *SKU: AKX00026* - [Arduino® Oplà IoT Kit](https://store.arduino.cc/products/opla-iot-kit) +- *SKU: AKX00069* - [Arduino® Plug and Make Kit](https://store.arduino.cc/products/plug-and-make-kit) + +## Rating + +### Recommended Operating Conditions +- **Powered at 3.3 V** through the Qwiic interface (in accordance with the Qwiic standard) +- **Operating temperature:** -40 °C to +85 °C + +**Typical current consumption:** +- Microcontroller: ~3.4 mA +- Motor active: ~67 mA typical, 85 mA maximum + +## Power Tree +The power tree for the Modulino® Vibro can be consulted below: + +![Modulino® Vibro Power Tree](assets/Modulino_Vibro_Power_Tree.png) + +## Block Diagram +This node includes an STM32C011F4 microcontroller that controls a vibration motor through an N-channel MOSFET. It communicates via I2C by default, but can be reprogrammed via SWD for custom functionality. + +![Modulino® Vibro Block Diagram](assets/Modulino_Vibro_Block_Diagram.png) + +## Functional Overview +The Modulino® Vibro node receives vibration commands via I2C and controls the VZ43FM1B8230001L motor through a 2N7002KT1G N-channel MOSFET. The STM32C011F4 microcontroller manages PWM control for variable intensity vibration patterns. Advanced users can re-flash the microcontroller via SWD for custom vibration sequences or additional logic. + +### Technical Specifications (Module-Specific) +| **Specification** | **Details** | +| ----------------------- | ----------------------------------------------- | +| **Microcontroller** | STM32C011F4 | +| **Motor** | VZ43FM1B8230001L vibration motor | +| **Motor Speed** | 12,000 rpm rated | +| **Supply Voltage** | 3.3 V | +| **Power Consumption** | ~3.4 mA (MCU) + 67 mA typical (motor active) | +| **Motor Current** | 67 mA typical, 85 mA maximum | +| **Communication** | I2C (Qwiic), SWD (reprogramming), UART (option) | + +### Pinout + +**Qwiic / I2C (1×4 Header)** +| **Pin** | **Function** | +|---------|---------------------------| +| GND | Ground | +| 3.3 V | Power Supply (3.3 V) | +| SDA | I2C Data | +| SCL | I2C Clock | + +These pads and the Qwiic connectors share the same I2C bus at 3.3 V. + +**Additional 1×8 Header (Motor & MCU Signals)** +| **Pin** | **Function** | +|---------|----------------| +| GND | Ground | +| 3V3 | 3.3 V Power | +| PF2 | RESET (NRST) | +| SWCLK | SWD Clock (PA14) | +| SWDIO | SWD Data (PA13) | +| TX1 | USART Transmit (PA9) | +| RX1 | USART Receive (PA10) | +| PA2 | Motor Control (MOSFET gate) | + +**Note:** PA0 controls the N-channel MOSFET gate to switch the vibration motor on/off. You can also access additional microcontroller pins (PA1, PA2, PA3, PA5) via test pads for custom applications. + +![Pinout Overview](assets/VibroPinouts.png) + +### Power Specifications +- **Nominal operating voltage:** 3.3 V via Qwiic + +### Mechanical Information + +![Modulino® Vibro Mechanical Information](assets/VibroMec.png) + +- Board dimensions: 41 mm × 25.36 mm +- Thickness: 1.6 mm (±0.2 mm) +- Four mounting holes (⌀ 3.2 mm) + - Hole spacing: 16 mm vertically, 32 mm horizontally +- **Breadboard compatible:** 1×4 header and 1×8 header spaced by 900 mil (22.86 mm) + +![Modulino® Node Shape](assets/GenMech.png) + +### I2C Address Reference +| **Board Silk Name** | **Sensor/Actuator** | **Modulino® I2C Address (HEX)** | **Editable Addresses (HEX)** | **Hardware I2C Address (HEX)** | +|---------------------|-------------------------|--------------------------------|---------------------------------------------|--------------------------------| +| MODULINO VIBRO | Vibration Motor | 0x3A | Any custom address (via software config.) | 0x1D | + + **Note:** + - Default I2C address is **0x3A**. + - A white rectangle on the bottom silk allows users to write a new address after reconfiguration. + + ![Blank silk for identification](assets/I2CTag.png) + +#### Pull-up Resistors + +This module has pads for optional I2C pull-up mounting in both data lines. No resistors are mounted by default but in case the resistors are needed 4.7 K resistors in an SMD 0402 format are recommended. + +These are positioned near the Qwiic connector on the power LED side. +These are positioned near the Qwiic connector on the power LED side. + +![Generic pull-up resistor position](assets/ResistorsPullupGen.png) + +## Device Operation +By default, the board is an I2C target device. It manages motor control through integrated firmware via PWM signals to the MOSFET gate. Simply connect it to a 3.3 V Qwiic interface and send I2C commands for various vibration patterns. If needed, you can reprogram the STM32C011F4 via SWD to modify or extend functionality. + +### Getting Started +Use any standard Arduino workflow-desktop IDE or Arduino Cloud Editor. The official Modulino library provides simple commands for vibration control including intensity and duration settings. Ensure your power supply can handle the additional 67-85 mA current when the motor is active. + +# Certifications + +## Certifications Summary + +| **Certification** | **Status** | +|:-----------------:|:----------:| +| CE/RED (Europe) | Yes | +| UKCA (UK) | Yes | +| FCC (USA) | Yes | +| IC (Canada) | Yes | +| RoHS | Yes | +| REACH | Yes | +| WEEE | Yes | + +## 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).

+ +## 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.

+ +| Substance | **Maximum limit (ppm)** | +|----------------------------------------|-------------------------| +| Lead (Pb) | 1000 | +| Cadmium (Cd) | 100 | +| Mercury (Hg) | 1000 | +| Hexavalent Chromium (Cr6+) | 1000 | +| Poly Brominated Biphenyls (PBB) | 1000 | +| Poly Brominated Diphenyl ethers (PBDE) | 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), 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.

+ +## FCC WARNING + +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, and (2) this device must accept any interference received, including interference that may cause undesired operation. + +## IC Caution + +This device complies with Industry Canada licence-exempt RSS standard(s). + +Operation is subject to the following two conditions: + +(1) This device may not cause interference, and (2) this device must accept any interference, including interference that may cause undesired operation of the device. + +## Conflict Minerals Declaration + +

As a global supplier of electronic and electrical components, Arduino is aware of our obligations with regard 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.

+ +# Company Information + +| Company name | Arduino SRL | +|-----------------|-----------------------------------------------| +| Company Address | Via Andrea Appiani, 25 - 20900 MONZA(Italy) | + +# Reference Documentation + +| Ref | Link | +| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Arduino IDE (Desktop) | [https://www.arduino.cc/en/software/](https://www.arduino.cc/en/software/) | +| Arduino Courses | [https://www.arduino.cc/education/courses](https://www.arduino.cc/education/courses) | +| Arduino Documentation | [https://docs.arduino.cc/](https://docs.arduino.cc/) | +| Arduino IDE (Cloud) | [https://create.arduino.cc/editor](https://create.arduino.cc/editor) | +| Cloud IDE Getting Started | [https://docs.arduino.cc/cloud/web-editor/tutorials/getting-started/getting-started-web-editor](https://docs.arduino.cc/cloud/web-editor/tutorials/getting-started/getting-started-web-editor) | +| Project Hub | [https://projecthub.arduino.cc/](https://projecthub.arduino.cc/) | +| Library Reference | [https://github.com/arduino-libraries/](https://github.com/arduino-libraries/) | +| Online Store | [https://store.arduino.cc/](https://store.arduino.cc/) | + +# Revision History +| **Date** | **Revision** | **Changes** | +|------------|--------------|-----------------------------------| +| 14/10/2025 | 1 | First release | \ No newline at end of file diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/downloads/ABX00130-cad-files.zip b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/downloads/ABX00130-cad-files.zip new file mode 100644 index 0000000000..a4d34a1c81 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/downloads/ABX00130-cad-files.zip differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/downloads/ABX00130-schematics.pdf b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/downloads/ABX00130-schematics.pdf new file mode 100644 index 0000000000..311401c842 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/downloads/ABX00130-schematics.pdf differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/downloads/ABX00130-step.zip b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/downloads/ABX00130-step.zip new file mode 100644 index 0000000000..d115d4e35f Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/downloads/ABX00130-step.zip differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/essentials.md b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/essentials.md new file mode 100644 index 0000000000..c61bcb5a56 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/essentials.md @@ -0,0 +1,11 @@ + + + +This library allows you to communicate with the Arduino Modulino® nodes. + + + +This library allows you to communicate with the Arduino Modulino® nodes in MicroPython. + + + diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/features.md b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/features.md new file mode 100644 index 0000000000..7aeeb44dd6 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/features.md @@ -0,0 +1,14 @@ + +The Modulino® Vibro module features a compact vibration motor for adding haptic feedback and tactile alerts to your projects. It is designed to be used with any compatible board with Qwiic, allowing you to build wearables, gaming controllers, and notification systems without making complicated connections. The module also includes example projects for you to learn important programming concepts and get inspired. + + + + + +This module provides strong tactile feedback at 12,000 rpm with variable intensity control via PWM, perfect for wearable devices and interactive interfaces. + + +The Modulino® Vibro module connects to your UNO R4 WiFi with Qwiic cables, letting you focus on learning programming without building complex circuits. + + + diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/image.svg b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/image.svg new file mode 100644 index 0000000000..9098324955 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/image.svg @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/product.md b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/product.md new file mode 100644 index 0000000000..510093ca88 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/product.md @@ -0,0 +1,13 @@ +--- +title: Modulino Vibro +url_shop: https://store.arduino.cc/products/modulino-vibro +url_guide: https://courses.arduino.cc/plugandmake +primary_button_url: https://docs.arduino.cc/tutorials/modulino-vibro/how-vibro/ +primary_button_title: Get Started +secondary_button_url: https://docs.arduino.cc/tutorials/modulino-thermo/how-general/ +secondary_button_title: More on Modulino Nodes +forumCategorySlug: '/hardware/accessories/213' +sku: [ABX00130] +--- + +A compact vibration motor module for adding haptic feedback and tactile alerts to your projects. Perfect for wearable devices, gaming controllers, notification systems, or interactive art installations. Compatible with Arduino UNO R4 WiFi or any Qwiic-enabled board, with simple I2C control for variable intensity vibration patterns. diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/tech-specs.md b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/tech-specs.md new file mode 100644 index 0000000000..89d1453f79 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/tech-specs.md @@ -0,0 +1 @@ +Here you will find the technical specifications for the Modulino® Vibro. diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/tech-specs.yml b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/tech-specs.yml new file mode 100644 index 0000000000..8e75e6f31b --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/tech-specs.yml @@ -0,0 +1,11 @@ +Node: + Name: Modulino Vibro + SKU: ABX00130 + Board recommended: Arduino® UNO R4 WiFi (ABX00087) and Arduino® UNO Q (ABX00162) + Communications: I2C (over Qwiic connector or solderable pin) + Operational voltage: 3.3V + Sensor: + Vibration Motor (VZ43FM1B8230001L) with STM32C011F4: 0x3A (address can change via software) + +Other accessories: + Qwiic cables: 1x diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/tutorials/how-general b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/tutorials/how-general new file mode 120000 index 0000000000..3f77534684 --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/tutorials/how-general @@ -0,0 +1 @@ +../../modulino-thermo/tutorials/how-general \ No newline at end of file diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/tutorials/how-vibro/assets/VibraOverview.png b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/tutorials/how-vibro/assets/VibraOverview.png new file mode 100644 index 0000000000..8287758dc2 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/tutorials/how-vibro/assets/VibraOverview.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/tutorials/how-vibro/assets/VibroPinouts.png b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/tutorials/how-vibro/assets/VibroPinouts.png new file mode 100644 index 0000000000..62ee93ab74 Binary files /dev/null and b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/tutorials/how-vibro/assets/VibroPinouts.png differ diff --git a/content/hardware/11.modulino/modulino-nodes/modulino-vibro/tutorials/how-vibro/how-vibro.md b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/tutorials/how-vibro/how-vibro.md new file mode 100644 index 0000000000..d8caffbe3e --- /dev/null +++ b/content/hardware/11.modulino/modulino-nodes/modulino-vibro/tutorials/how-vibro/how-vibro.md @@ -0,0 +1,298 @@ +--- +title: "Getting Started with Modulino Vibra" +description: "Complete guide for the Modulino Vibra haptic feedback module and programming with Arduino and MicroPython." +tags: + - Modulino + - Vibration + - Haptic + - Feedback + - QWIIC + - I2C +author: 'Pedro Sousa Lima' +hardware: + - hardware/11.modulinos/modulinos/modulino-vibra +software: + - ide-v2 + - web-editor + - micropython +--- + +![Vibra Overview](assets/VibraOverview.png) + +The Modulino Vibra is a modular haptic feedback device that provides tactile notifications through vibration, making it perfect to add physical feedback to your projects! It uses the standardised Modulino form factor with QWIIC connectors for easy integration. + +## Hardware Overview + +### General Characteristics + +The Modulino Vibra is based on the VZ43FM1B8230001L vibration motor, capable of generating different vibration patterns for haptic feedback. + +| Parameter | Condition | Minimum | Typical | Maximum | Unit | +|------------|-----------|---------|---------|---------|------| +| Speed | - | - | 12,000 | - | rpm | +| Voltage | Motor | 2.3 | 3.3 | 3.6 | V | +| Current | Motor | - | 67 | 85 | mA | + +### Sensor Details + +The **Modulino Vibra** module uses the **VZ43FM1B8230001L** vibration motor, which does not have native I²C capabilities. Instead, the motor is controlled by the Modulino's onboard microcontroller (STM32C011F4), which drives the motor through an N-channel MOSFET. This microcontroller provides I²C communication, allowing for flexible control of vibration intensity and duration. + +One unique feature of this setup is the ability to change the I²C address via software, making it adaptable to different system configurations. + +The default I²C address for the **Modulino Vibra** module is: + +| Modulino I²C Address | Hardware I²C Address | Editable Addresses (HEX) | +|----------------------|----------------------|--------------------------------------------------| +| 0x3A | 0x1D | Any custom address (via software configuration) | + +### Pinout + +![Modulino Vibra Pinout](assets/VibroPinouts.png) + +**Qwiic / I2C (1×4 Header)** +| **Pin** | **Function** | +|---------|---------------------------| +| GND | Ground | +| 3.3 V | Power Supply (3.3 V) | +| SDA | I2C Data | +| SCL | I2C Clock | + +These pads and the Qwiic connectors share the same I2C bus at 3.3 V. + +**Additional 1×8 Header (Motor & MCU Signals)** +| **Pin** | **Function** | +|---------|----------------| +| GND | Ground | +| 3V3 | 3.3 V Power | +| PF2 | RESET (NRST) | +| SWCLK | SWD Clock (PA14) | +| SWDIO | SWD Data (PA13) | +| TX1 | USART Transmit (PA9) | +| RX1 | USART Receive (PA10) | +| PA2 | Motor Control (MOSFET gate) | + +**Note:** PA0 controls the N-channel MOSFET gate to switch the vibration motor on/off. You can also access additional microcontroller pins (PA1, PA2, PA3, PA5) via test pads for custom applications. + +### Power Specifications + +| Parameter | Condition | Typical | Unit | +|---------------------|---------------|---------|------| +| Operating Voltage | - | 3.3 | V | +| Current Consumption | Idle | ~3.4 | mA | +| Current Consumption | Motor Active | 67 | mA | +| Current Consumption | Motor Maximum | 85 | mA | + +The module includes a power LED that draws 1 mA and turns on as soon as it is powered. + +### Schematic + +The Modulino Vibra features a simple yet effective circuit design for haptic feedback. + +The main components are the **VZ43FM1B8230001L** vibration motor and the **STM32C011F4** microcontroller (U1), which handles motor control via PWM signals to the MOSFET gate as well as I²C communication. + +You can connect to the I²C pins (SDA and SCL) using either the **QWIIC connectors** (J1 and J2, this is the recommended method) or the **solderable pins** (J4). The board runs on **3.3V**, which comes from the QWIIC cable or the **3V3 pin** on J4. + +There's also a small power LED indicator that lights up when the board is on. + +You can grab the full schematic and PCB files from the [Modulino Vibra page](https://docs.arduino.cc/hardware/modulinos/modulino-vibra). + +## Programming with Arduino + +The Modulino Vibra is fully compatible with the Arduino IDE and the official Modulino library. The following examples showcase how to generate vibration patterns and add haptic feedback to your Arduino projects. + +### Prerequisites + +- Install the Modulino library via the Arduino IDE Library Manager +- Connect your Modulino Vibra via QWIIC or solderable headers + +For detailed instructions on setting up your Arduino environment and installing libraries, please refer to the [Getting Started with Modulinos guide](../how-general). + +Library repository available [here](https://github.com/arduino-libraries/Arduino_Modulino). + +### Basic Example + +```arduino +#include + +ModulinoVibro vibro; + +void setup() { + Modulino.begin(); + vibro.begin(); +} + +void loop() { + // Vibrate for 1000 milliseconds (1 second) + vibro.on(1000); + delay(1000); + + // Turn off vibration + vibro.off(); + delay(1000); +} +``` + +### Key Functions + +- `on(duration_ms)`: Activates vibration for specified duration in milliseconds +- `on(duration_ms, power)`: Activates vibration with custom power level +- `on(duration_ms, blocking, power)`: Activates vibration, optionally blocking execution +- `off()`: Stops vibration immediately + +**Power Levels:** `STOP`, `GENTLE`, `MODERATE`, `MEDIUM`, `INTENSE`, `POWERFUL`, `MAXIMUM` (default) + +### Advanced Example - Haptic Patterns + +```arduino +#include + +ModulinoVibro vibro; + +void setup() { + Serial.begin(9600); + Modulino.begin(); + vibro.begin(); + + Serial.println("Haptic Pattern Demo"); +} + +void loop() { + // Pattern 1: Quick double pulse + Serial.println("Double Pulse"); + vibro.on(100, INTENSE); + delay(150); + vibro.on(100, INTENSE); + delay(1000); + + // Pattern 2: Escalating intensity + Serial.println("Escalating"); + vibro.on(200, GENTLE); + delay(250); + vibro.on(200, MODERATE); + delay(250); + vibro.on(200, POWERFUL); + delay(1000); + + // Pattern 3: Long gentle pulse + Serial.println("Gentle Wave"); + vibro.on(500, GENTLE); + delay(1000); + + // Pattern 4: Alert pattern + Serial.println("Alert"); + for (int i = 0; i < 3; i++) { + vibro.on(150, MAXIMUM); + delay(200); + } + delay(2000); +} +``` + +## Programming with MicroPython + +The Modulino Vibra is fully compatible with MicroPython through the official Modulino MicroPython library. The following examples demonstrate how to generate vibration patterns and implement haptic feedback in your MicroPython projects. + +### Prerequisites + +- Install the Modulino MicroPython library (see [Getting Started with Modulinos](./how-general) for detailed instructions) +- Ensure Arduino Lab for MicroPython is installed + +### Basic Example + +```python +from modulino import ModulinoVibro +from time import sleep + +vibro = ModulinoVibro() + +while True: + # Vibrate for 1 second + vibro.on(duration=1000) + sleep(1) + + # Turn off + vibro.off() + sleep(1) +``` + +### Key Methods + +- `.on(duration=ms, power=level)`: Activates vibration for specified duration and power +- `.off()`: Stops vibration immediately + +**Power Levels:** Available as constants: `GENTLE`, `MODERATE`, `MEDIUM`, `INTENSE`, `POWERFUL`, `MAXIMUM` + +### Advanced Example - Notification System + +```python +from modulino import ModulinoVibro +from time import sleep + +vibro = ModulinoVibro() + +def double_pulse(): + """Quick double pulse pattern""" + vibro.on(duration=100, power=40) + sleep(0.15) + vibro.on(duration=100, power=40) + +def escalating(): + """Escalating intensity pattern""" + for power in [25, 35, 45]: + vibro.on(duration=200, power=power) + sleep(0.25) + +def alert_pattern(): + """Emergency alert pattern""" + for _ in range(3): + vibro.on(duration=150, power=50) + sleep(0.2) + +print("📳 Haptic Feedback Demo") + +while True: + print("Double Pulse") + double_pulse() + sleep(1) + + print("Escalating") + escalating() + sleep(1) + + print("Alert") + alert_pattern() + sleep(2) +``` + +## Troubleshooting + +### Sensor Not Reachable + +If your Modulino's power LED isn't on or the sensor isn't responsive: +- Ensure both the board and the Modulino are connected to your computer +- Verify that the power LEDs on both are lit +- Check that the QWIIC cable is properly clicked into place + +### Weak Vibration + +If the vibration feels weak: +- Ensure your power supply can provide sufficient current (85 mA peak) +- Try increasing the power level parameter +- Check that all connections are secure + +### Library Issues + +See the [Getting Started with Modulinos](./how-general) guide for library installation troubleshooting. + +## Project Ideas + +Now that you've learned how to use your Modulino Vibra, try these projects: + +- **Notification Device**: Create haptic alerts for incoming messages or calls +- **Game Controller**: Add force feedback to gaming projects +- **Wearable Alert**: Build a silent alarm or reminder system +- **Assistive Device**: Create tactile feedback for accessibility applications +- **Timer Notification**: Add haptic alerts to countdown timers +- **Proximity Alert**: Vibrate when sensors detect obstacles +- **Fitness Tracker**: Provide haptic feedback for workout milestones +- **Musical Metronome**: Feel the beat through vibration patterns diff --git a/content/hardware/12.hero/boards/leonardo/downloads/A000057-full-pinout.pdf b/content/hardware/12.hero/boards/leonardo/downloads/A000057-full-pinout.pdf index 2af30c1cb1..c2554a67f4 100644 Binary files a/content/hardware/12.hero/boards/leonardo/downloads/A000057-full-pinout.pdf and b/content/hardware/12.hero/boards/leonardo/downloads/A000057-full-pinout.pdf differ diff --git a/content/hardware/12.hero/boards/leonardo/interactive/A000057-pinout.png b/content/hardware/12.hero/boards/leonardo/interactive/A000057-pinout.png index f298a30001..0e55e46b68 100644 Binary files a/content/hardware/12.hero/boards/leonardo/interactive/A000057-pinout.png and b/content/hardware/12.hero/boards/leonardo/interactive/A000057-pinout.png differ diff --git a/content/learn/03.programming/00.reference/reference.md b/content/learn/03.programming/00.reference/reference.md index 3aaa6951d1..a918e42a38 100644 --- a/content/learn/03.programming/00.reference/reference.md +++ b/content/learn/03.programming/00.reference/reference.md @@ -352,7 +352,7 @@ Compact version of the [Arduino Language Reference](https://www.arduino.cc/refer | ------------------ | ------------------------------------------------------------------ | | `! (logical not)` | Inverts the logical value, true becomes false and vice versa. | | `&& (logical and)` | Logical AND operator, returns true if both operands are true. | -| `(logical or)` | Logical OR operator, returns true if at least one operand is true. | +| `\|| (logical or)` | Logical OR operator, returns true if at least one operand is true. | ### Pointer Access Operators diff --git a/content/learn/07.built-in-libraries/02.i2s/i2s.md b/content/learn/07.built-in-libraries/02.i2s/i2s.md index 3f9e299fd5..92f5d7eb77 100644 --- a/content/learn/07.built-in-libraries/02.i2s/i2s.md +++ b/content/learn/07.built-in-libraries/02.i2s/i2s.md @@ -110,6 +110,36 @@ None #### Returns The next sample of incoming I2S data available (or 0 if no data is available) + +### `read()` + +#### Description + +Reads incoming I2S data from the I2S interface. This method reads and removes the next sample of incoming I2S data available from the internal I2S buffer. read() inherits from the Stream utility class. + +#### Syntax + +``` +I2S.read() +``` + +``` +I2S.read(buffer, length) +``` + +#### Parameters + +None (for single sample read) + +buffer: an array to read data into + +length: the number of samples to read + +#### Returns + +The first sample of incoming I2S data available (or -1 if no data is available) - int + +For buffer read: the number of samples read into the buffer ### `write()` #### Description diff --git a/content/software/app-lab/tutorials/03.cli/apps-lab-cli.md b/content/software/app-lab/tutorials/03.cli/apps-lab-cli.md index 8ce9ded84c..0ca8340782 100644 --- a/content/software/app-lab/tutorials/03.cli/apps-lab-cli.md +++ b/content/software/app-lab/tutorials/03.cli/apps-lab-cli.md @@ -15,51 +15,15 @@ The following hardware is required: - [Arduino UNO Q](https://store.arduino.cc/products/uno-q) - [USB-C® type cable](https://store.arduino.cc/products/usb-cable2in1-type-c) -You will also need to have the following software installed: +To access the board via `adb` (over USB), you will also need to have the following software installed: - [Android Debug Bridge](https://developer.android.com/tools/releases/platform-tools) -## Installing ADB (Host Computer) - -***Note: if you are using the board as a Single Board Computer (SBC Mode (Preview) without a host computer), you do not need to install ADB. You can run `arduino-app-cli` directly from the terminal.*** - -The ADB command line tool is supported on MacOS, Windows & Linux. For more specific instructions for your OS, see the sections below. - -***You can find more information and download the latest version for the tool for all operating systems directly from the [Android SDK Platform Tools](https://developer.android.com/tools/releases/platform-tools#downloads) page.*** - -### MacOS - -To install the ADB tools on **MacOS**, we can use `homebrew`. Open the terminal and run the following command: - -```sh -brew install android-platform-tools -``` - -To verify the tool is installed, run `adb version`. - -### Windows - -To install the ADB tools on **Windows**, we can use `winget`, supported on Windows 11 and on some earlier Windows 10 versions. - -Open a terminal and run the following: - -```sh -winget install Google.PlatformTools -``` - -To verify the tool is installed, run `adb version`. - -### Linux - -To install ADB tools on a **Debian/Ubuntu Linux distribution**, open a terminal and run the following command: - -```sh -sudo apt-get install android-sdk-platform-tools -``` - -To verify the tool is installed, run `adb version`. +You can also access the board via SSH, which is typically installed on your system by default. ## Connect via ADB +***To learn more about setting up `adb`, check out the [Connect to UNO Q via ADB](/tutorials/uno-q/adb/) tutorial. This guide will walk you through the installation steps.*** + 1. Connect the UNO Q board to your computer via USB-C. 2. Run `adb devices` in the terminal. This should list the connected devices. @@ -67,16 +31,18 @@ To verify the tool is installed, run `adb version`. >Note that it may take up to a minute for the device to appear after connecting it. -3. Run `adb shell`. If you have not set up your board prior to this via the Arduino App Lab, you may be required to provide a password, which is `arduino`. +3. Run `adb shell`. 4. You should now be inside your board's terminal. ![Terminal on the board.](assets/board-terminal.png) 5. You are now able to run commands via the terminal on your board! To exit from the terminal, simply type `exit`. +>Note: If you have not set up your board prior to this via the Arduino App Lab, the first time you run a command that requires authentication (such as `sudo`), you will be prompted to create a new password. + ## Connect via SSH -***Note: to use SSH, the [first setup]() needs to be completed. This is done by connecting your board via USB, open the Arduino App Lab, and select the USB option. Here you will need to give your board a name, a new password as well as providing Wi-Fi® credentials. SSH will be automatically configured during this setup.*** +***Note: to use SSH, the [first setup](/software/app-lab/tutorials/getting-started#install--set-up-arduino-app-lab) needs to be completed. This is done by connecting your board via USB, open the Arduino App Lab, and select the USB option. Here you will need to give your board a name, a new password as well as providing Wi-Fi® credentials. SSH will be automatically configured during this setup.*** 1. Open a terminal on your machine. 2. Run `ssh arduino@.local` @@ -183,15 +149,6 @@ This will list all available Apps (including examples), and their status: ![List Apps.](assets/list-apps.png) -## Set Board Name - -To set a board name using the `arduino-app-cli`, we can use the `set-name` command. - -```sh -arduino-app-cli board set-name "my-board" -``` - -This will change the name of the board, which will take effect after resetting the board. ## System Configuration and Updates @@ -204,6 +161,13 @@ arduino-app-cli system update ``` This will prompt you to install any available updates. +To set the board name, use: + +```sh +arduino-app-cli system set-name "my-board" +``` +This will change the name of the board, which will take effect after resetting the board. + To enable or disable the network mode, use: ```sh diff --git a/content/software/app-lab/tutorials/04.examples/all-examples.md b/content/software/app-lab/tutorials/04.examples/all-examples.md new file mode 100644 index 0000000000..4ddc07ed4d --- /dev/null +++ b/content/software/app-lab/tutorials/04.examples/all-examples.md @@ -0,0 +1,384 @@ +--- +title: Arduino® UNO Q Example Applications +description: An overview of various applications developed for the Arduino® UNO Q platform, showcasing unique functionalities from environmental monitoring to machine learning. +author: Karl Söderby and Christopher Méndez +tags: [AI, Computer Vision, Audio Classification, Arduino App Lab] +--- + +## Overview + +This article provides a comprehensive overview of various applications developed for the Arduino® UNO Q platform. Each application showcases unique functionalities, from environmental monitoring to machine learning, leveraging the capabilities of the Arduino ecosystem. Below is a summary of each example, detailing the App's purpose, functionality, and components used. + +## Requirements + +- [Arduino® UNO Q](https://store.arduino.cc/products/uno-q) +- [USB-C® cable](https://store.arduino.cc/products/usb-c-to-hdmi-multiport-adapter-with-ethernet-and-usb-hub) + +## Examples Without Additional Hardware + +### Air Quality Monitoring App + +![Air Quality Monitoring App](assets/air-quality-monitoring-app-hero.png) + +The **Air Quality Monitoring App** displays real-time air quality data using the AQICN service on an 8x13 LED matrix. It visually represents air quality levels with animated emoji patterns, ranging from "Good" to "Hazardous." + +[**Example Source Code**](https://github.com/arduino/app-bricks-examples/tree/main/examples/air-quality-monitoring) + +#### How it Works + +- **Data Fetching:** The app retrieves air quality data from the AQICN API for a specified city. +- **Visualization:** Numeric AQI values are converted into visual patterns displayed on the LED matrix. +- **Communication:** The Python® script handles API communication, while the Arduino sketch manages the LED display. + +#### Bricks Used + +- **None:** Direct communication between Python® and Arduino is facilitated through the Router Bridge. + +### Blink LED + +![Blink LED](assets/blink-led-hero.png) + +The **Blink** example toggles the onboard LED state every second, illustrating basic LED control and Router Bridge communication. + +[**Example Source Code**](https://github.com/arduino/app-bricks-examples/tree/main/examples/blink) + +#### How it Works + +- **Timing Control:** A Python® script manages the timing and state logic for the LED. +- **LED Control:** The Arduino sketch handles the hardware control. + +#### Bricks Used + +- **None:** Direct communication via Router Bridge. + +### Blinking LED from Arduino Cloud + +![Blinking LED from Arduino Cloud](assets/blinking-led-from-arduino-cloud-hero.png) + +This example allows remote control of the onboard LED from the Arduino Cloud using a dashboard with a switch. + +[**Example Source Code**](https://github.com/arduino/app-bricks-examples/tree/main/examples/cloud-blink) + + +#### How it Works + +- **Cloud Integration:** The `arduino_cloud` Brick connects the device to the Arduino Cloud. +- **LED Control:** Changes in the cloud dashboard update the LED state. + +#### Bricks Used + +- **arduino_cloud:** Brick to create a connection to the Arduino Cloud. + +### Concrete Crack Detector + +![Concrete Crack Detector](assets/concrete-crack-detector-hero.png) + +The **Concrete Crack Detector** uses a pre-trained machine learning model to identify cracks in concrete surfaces. It provides a web interface for image upload and displays results with highlighted crack locations. + +[**Example Source Code**](https://github.com/arduino/app-bricks-examples/tree/main/examples/anomaly-detection) + + +#### How it Works + +- **Image Analysis:** The `VisualAnomalyDetection` Brick processes images to detect structural anomalies. +- **Web Interface:** Users can upload images or select samples, adjust detection sensitivity, and view results. + +#### Bricks Used + +- **visual_anomaly_detection:** Brick to detect cracks and structural defects in concrete surfaces using computer vision and machine learning. +- **web_ui:** Brick to create a web interface with image upload capabilities, confidence controls, and real-time result visualization. + +### Glass Breaking Sensor + +![Glass Breaking Sensor](assets/glass-breaking-sensor-hero.png) + +The **Glass Breaking Sensor** classifies audio files to detect glass breaking sounds using a machine learning model. It features a web interface for audio upload and real-time classification results. + +[**Example Source Code**](https://github.com/arduino/app-bricks-examples/tree/main/examples/audio-classification) + + +#### How it Works + +- **Audio Classification:** The `audio_classification` Brick analyzes audio files for specific sound patterns. +- **Web Interface:** Supports audio file upload and displays classification results with confidence scores. + +#### Bricks Used + +- **audio_classification:** Brick to classify audio files using a pre-trained model for sound detection and analysis. +- **web_ui:** Brick to create a web interface with audio upload capabilities, confidence controls, and real-time result display. + +### Image Classification + +![Image Classification](assets/image-classification-hero.png) + +The **Image Classification** example lets you perform image classification using a pre-trained neural network model. It features a web-based interface that allows you to upload images for classification, set the confidence threshold and see the inference results. + +[**Example Source Code**](https://github.com/arduino/app-bricks-examples/tree/main/examples/image-classification) + + +#### How it Works + +- **Image Classification:** The `image_classification` Brick classifies objects within an image file. +- **Web Interface:** Supports image file upload and displays classification results with confidence scores. + +#### Bricks Used + +- `image_classification`: Brick to classify objects within an image. +- `web_ui`: Brick to create a web interface to display the image classification dashboard. + +### Linux® Blink with UI (JavaScript) + +![Linux® Blink with UI (JavaScript)](assets/linux-blink-with-ui-javascript-hero.png) + +The **Linux® Blink** example toggles an LED state on the board through a web-based interface, demonstrating basic event handling and UI updates. + +[**Example Source Code**](https://github.com/arduino/app-bricks-examples/tree/main/examples/blink-with-ui) + + +#### How it Works + +- **Web Interface:** A toggle switch controls the LED state via WebSocket communication. +- **LED Control:** The Arduino sketch manages the LED hardware. + +#### Bricks Used + +- **web_ui:** Brick to create a web interface to display the LED control toggle switch. + +### Object Detection + +![Object Detection](assets/object-detection-hero.png) + +The **Object Detection** example lets you perform object detection using a pre-trained machine learning model. It shows how to process input images, run inference, and visualize detected objects with bounding boxes and labels. + +[**Example Source Code**](https://github.com/arduino/app-bricks-examples/tree/main/examples/object-detection) + + +#### How it Works + +- **Object Detection:** The `object_detection` Brick to locate and classify objects within an image file. +- **Web Interface:** Supports image file upload and displays classification results with confidence scores. + +#### Bricks Used + +- **object_detection:** Brick to identify objects within an image. +- **web_ui:** Brick to create a web interface. + +### System Resources Logger + +![System Resources Logger](assets/system-resources-logger-hero.png) + +The **System Resources Logger** monitors and displays real-time system performance data from your Arduino UNO Q board. + +[**Example Source Code**](https://github.com/arduino/app-bricks-examples/tree/main/examples/system-resources-logger) + +#### How it Works + +- **Data Collection:** Uses the `psutil` library to gather CPU and memory usage statistics every 5 seconds. +- **Data Storage:** The `dbstorage_tsstore` Brick stores performance metrics with timestamp. +- **Web Interface:** Provides interactive visualization with real-time updates via WebSocket communication. + +#### Bricks Used + +- **dbstorage_tsstore:** Brick to store CPU and memory usage data in a time series database with retention and aggregation capability. +- **web_ui:** Brick to create a web interface with real-time charts and historical data visualization. + +### UNO Q Pin Toggle + +![UNO Q Pin Toggle](assets/uno-q-pin-toggle-hero.png) + +The **UNO Q Pin Toggle** example lets you control the state of every pin of the Arduino UNO Q through an interactive web interface. + +[**Example Source Code**](https://github.com/arduino/app-bricks-examples/tree/main/examples/unoq-pin-toggle) + +#### How it Works + +- **Web Interface:** Displays the board pins control dashboard with toggle switches. +- **Pin Control:** The backend processes toggle requests and broadcasts updates. + +#### Bricks Used + +- **web_ui:** Brick to create a web interface with the UNO Q illustration and allow real-time pin control. + +### Weather Forecast on LED Matrix + +![Weather Forecast on LED Matrix](assets/weather-forecast-on-led-matrix-hero.png) + +The **Weather Forecasting System** displays real-time weather information from the *open-meteo.com* service on the Arduino UNO Q LED matrix. + +[**Example Source Code**](https://github.com/arduino/app-bricks-examples/tree/main/examples/weather-forecast) + +#### How it Works + +- **Weather Data:** The `weather_forecast` Brick fetches data from the *open-meteo.com* API. +- **LED Display:** The Arduino sketch manages LED matrix animations based on weather conditions. + +#### Bricks Used + +- **weather_forecast:** Brick to fetch weather data from the open-meteo.com API and convert weather codes into simple categories. + +## Examples Using Additional Hardware + +### Code Detector + +![Code Detector](assets/code-detector-hero.png) + +The **Code Detector** scans barcodes and QR codes using a USB camera, displaying results on a web interface and storing them in a local database. + +[**Example Source Code**](https://github.com/arduino/app-bricks-examples/tree/main/examples/code-detector) + +#### Additional Hardware + +- USB camera +- USB-C® dongle +- External Power Supply (for powering the dongle) + +#### How it Works + +- **Code Detection:** The `camera_code_detection` Brick processes video input for code detection. +- **Web Interface:** Displays live camera feed and detected codes. + +#### Bricks Used + +- **camera_code_detection:** Brick to detect barcodes and QR codes using a camera. +- **dbstorage_sqlstore:** Brick to store the detected codes in a database. +- **web_ui:** Brick to create a web interface to display the detected codes and the camera live feed. + +### Detect Objects on Camera + +![Detect Objects on Camera](assets/detect-objects-on-camera-hero.png) + +The **Detect Objects on Camera** example lets you detect objects on a live feed from a USB camera and visualize bounding boxes around the detections in real-time. + +[**Example Source Code**](https://github.com/arduino/app-bricks-examples/tree/main/examples/video-generic-object-detection) + +#### Additional Hardware + +- USB camera +- USB-C® dongle +- External Power Supply (for powering the dongle) + +#### How it Works + +- **Video Stream:** Processes frames from a USB camera using the `video_objectdetection` Brick. +- **Web Interface:** Displays the classification results and model controls. + +#### Bricks Used + +- **web_ui:** Brick to create a web interface to display the classification results and model controls. +- **video_objectdetection:** Brick to classify objects within a live video feed from a camera. + +### Face Detector on Camera + +![Face Detector on Camera](assets/face-detector-on-camera-hero.png) + +The **Face Detector on Camera** example lets you detect faces on a live feed from a USB camera and visualize bounding boxes around the detections in real-time. + +[**Example Source Code**](https://github.com/arduino/app-bricks-examples/tree/main/examples/video-face-detection) + +#### Additional Hardware + +- USB camera +- USB-C® dongle +- External Power Supply (for powering the dongle) + +#### How it Works + +- **Video Stream:** Processes frames from a USB camera using the `video_objectdetection` Brick. +- **Web Interface:** Displays the classification results and model controls. + +#### Bricks Used + +- **web_ui:** Brick to create a web interface to display the classification results and model controls. +- **video_objectdetection:** Brick to classify faces within a live video feed from a camera. + +### Hey Arduino! + +![Hey Arduino!](assets/hey-arduino-hero.png) + +The **Hey Arduino!** example triggers an LED matrix animation whenever the keyword "Hey Arduino" is detected through a microphone. + +[**Example Source Code**](https://github.com/arduino/app-bricks-examples/tree/main/examples/keyword-spotting) + +#### Additional Hardware + +- USB microphone (or headset) +- USB-C® dongle +- External Power Supply (for powering the dongle) + +#### How it Works + +- **Keyword spotting:** Monitors the audio continuously, and when it detects the keyword, it calls the microcontroller to activate an animation on the LED matrix, using the Bridge tool. + +#### Bricks Used + +- **keyword_spotting:** this Brick is designed to detect sound patterns, triggering an event in case of a match. + +### Home Climate Monitoring + +![Home Climate Monitoring](assets/home-climate-monitoring-hero.png) + +The **Home Climate Monitoring** app records temperature and humidity data from the Modulino® Thermo node, displaying it on a web interface. + +[**Example Source Code**](https://github.com/arduino/app-bricks-examples/tree/main/examples/home-climate-monitoring-and-storage) + +#### Additional Hardware + +- Modulino® Thermo +- Qwiic cable + +#### How it Works + +- **Data Storage:** The `dbstorage_tsstore` Brick makes it possible to save, read, and manage time-based data. +- **Web Interface:** Provides interactive visualization with real-time updates via WebSocket communication. + +#### Bricks Used + +- **dbstorage_tsstore:** Brick to store sensor data in a time series database with retention and aggregation capability. +- **web_ui:** For deploying a user interface to display real-time and historical data. + +### Real Time Accelerometer Data + +![Real Time Accelerometer Data](assets/real-time-accelerometer-data-hero.png) + +The **Real Time Accelerometer Data** example records accelerometer data from the Modulino® Movement node, and streams it to a web interface. + +[**Example Source Code**](https://github.com/arduino/app-bricks-examples/tree/main/examples/real-time-accelerometer) + +#### Additional Hardware + +- Modulino® Movement +- Qwiic cable + +#### How it Works + +- **Motion Detection:** The `motion_detection` Brick processes accelerometer data to identify specific motion patterns using a pre-trained model. +- **Web Interface:** Hosts a web server on the board, serving HTML, CSS & JavaScript files. + +#### Bricks Used + +- **motion_detection:** For processing accelerometer data and detecting movement patterns using machine learning. +- **web_ui:** Brick to create a web interface to display the accelerometer data and the detected movements. + +### Person Classifier on Camera + +![Person Classifier on Camera](assets/person-classifier-on-camera-hero.png) + +The **Person Classifier** example lets you detect people on a live feed from a camera and visualize the model inference result on a user-friendly web interface. + +[**Example Source Code**](https://github.com/arduino/app-bricks-examples/tree/main/examples/video-person-classification) + +#### Additional Hardware + +- USB camera +- USB-C® dongle +- External Power Supply (for powering the dongle) + +#### How it Works + +- **Video Stream:** Processes frames from a USB camera using the `video_imageclassification` Brick. +- **Web Interface:** Displays the classification results and model controls, triggers a greeting on person detections. + +#### Bricks Used + +- **web_ui:** Brick to create a web interface to display the classification results and model controls. +- **video_imageclassification:** Brick to classify objects within a live video feed from a camera. diff --git a/content/software/app-lab/tutorials/04.examples/assets/air-quality-monitoring-app-hero.png b/content/software/app-lab/tutorials/04.examples/assets/air-quality-monitoring-app-hero.png new file mode 100644 index 0000000000..83f7e2d7c5 Binary files /dev/null and b/content/software/app-lab/tutorials/04.examples/assets/air-quality-monitoring-app-hero.png differ diff --git a/content/software/app-lab/tutorials/04.examples/assets/blink-led-hero.png b/content/software/app-lab/tutorials/04.examples/assets/blink-led-hero.png new file mode 100644 index 0000000000..499657177c Binary files /dev/null and b/content/software/app-lab/tutorials/04.examples/assets/blink-led-hero.png differ diff --git a/content/software/app-lab/tutorials/04.examples/assets/blinking-led-from-arduino-cloud-hero.png b/content/software/app-lab/tutorials/04.examples/assets/blinking-led-from-arduino-cloud-hero.png new file mode 100644 index 0000000000..74954be3ec Binary files /dev/null and b/content/software/app-lab/tutorials/04.examples/assets/blinking-led-from-arduino-cloud-hero.png differ diff --git a/content/software/app-lab/tutorials/04.examples/assets/code-detector-hero.png b/content/software/app-lab/tutorials/04.examples/assets/code-detector-hero.png new file mode 100644 index 0000000000..499612e68f Binary files /dev/null and b/content/software/app-lab/tutorials/04.examples/assets/code-detector-hero.png differ diff --git a/content/software/app-lab/tutorials/04.examples/assets/concrete-crack-detector-hero.png b/content/software/app-lab/tutorials/04.examples/assets/concrete-crack-detector-hero.png new file mode 100644 index 0000000000..dbb127f74c Binary files /dev/null and b/content/software/app-lab/tutorials/04.examples/assets/concrete-crack-detector-hero.png differ diff --git a/content/software/app-lab/tutorials/04.examples/assets/detect-objects-on-camera-hero.png b/content/software/app-lab/tutorials/04.examples/assets/detect-objects-on-camera-hero.png new file mode 100644 index 0000000000..18ee46d017 Binary files /dev/null and b/content/software/app-lab/tutorials/04.examples/assets/detect-objects-on-camera-hero.png differ diff --git a/content/software/app-lab/tutorials/04.examples/assets/face-detector-on-camera-hero.png b/content/software/app-lab/tutorials/04.examples/assets/face-detector-on-camera-hero.png new file mode 100644 index 0000000000..d1c8f1580c Binary files /dev/null and b/content/software/app-lab/tutorials/04.examples/assets/face-detector-on-camera-hero.png differ diff --git a/content/software/app-lab/tutorials/04.examples/assets/glass-breaking-sensor-hero.png b/content/software/app-lab/tutorials/04.examples/assets/glass-breaking-sensor-hero.png new file mode 100644 index 0000000000..0dd2b32765 Binary files /dev/null and b/content/software/app-lab/tutorials/04.examples/assets/glass-breaking-sensor-hero.png differ diff --git a/content/software/app-lab/tutorials/04.examples/assets/hey-arduino-hero.png b/content/software/app-lab/tutorials/04.examples/assets/hey-arduino-hero.png new file mode 100644 index 0000000000..2d58f3976b Binary files /dev/null and b/content/software/app-lab/tutorials/04.examples/assets/hey-arduino-hero.png differ diff --git a/content/software/app-lab/tutorials/04.examples/assets/home-climate-monitoring-hero.png b/content/software/app-lab/tutorials/04.examples/assets/home-climate-monitoring-hero.png new file mode 100644 index 0000000000..02837779f2 Binary files /dev/null and b/content/software/app-lab/tutorials/04.examples/assets/home-climate-monitoring-hero.png differ diff --git a/content/software/app-lab/tutorials/04.examples/assets/image-classification-hero.png b/content/software/app-lab/tutorials/04.examples/assets/image-classification-hero.png new file mode 100644 index 0000000000..144ab66ad2 Binary files /dev/null and b/content/software/app-lab/tutorials/04.examples/assets/image-classification-hero.png differ diff --git a/content/software/app-lab/tutorials/04.examples/assets/linux-blink-with-ui-javascript-hero.png b/content/software/app-lab/tutorials/04.examples/assets/linux-blink-with-ui-javascript-hero.png new file mode 100644 index 0000000000..f3e0ae32f2 Binary files /dev/null and b/content/software/app-lab/tutorials/04.examples/assets/linux-blink-with-ui-javascript-hero.png differ diff --git a/content/software/app-lab/tutorials/04.examples/assets/object-detection-hero.png b/content/software/app-lab/tutorials/04.examples/assets/object-detection-hero.png new file mode 100644 index 0000000000..abbbd5a8cc Binary files /dev/null and b/content/software/app-lab/tutorials/04.examples/assets/object-detection-hero.png differ diff --git a/content/software/app-lab/tutorials/04.examples/assets/person-classifier-on-camera-hero.png b/content/software/app-lab/tutorials/04.examples/assets/person-classifier-on-camera-hero.png new file mode 100644 index 0000000000..8a507e3576 Binary files /dev/null and b/content/software/app-lab/tutorials/04.examples/assets/person-classifier-on-camera-hero.png differ diff --git a/content/software/app-lab/tutorials/04.examples/assets/real-time-accelerometer-data-hero.png b/content/software/app-lab/tutorials/04.examples/assets/real-time-accelerometer-data-hero.png new file mode 100644 index 0000000000..3a66d3c273 Binary files /dev/null and b/content/software/app-lab/tutorials/04.examples/assets/real-time-accelerometer-data-hero.png differ diff --git a/content/software/app-lab/tutorials/04.examples/assets/system-resources-logger-hero.png b/content/software/app-lab/tutorials/04.examples/assets/system-resources-logger-hero.png new file mode 100644 index 0000000000..59f01eefb3 Binary files /dev/null and b/content/software/app-lab/tutorials/04.examples/assets/system-resources-logger-hero.png differ diff --git a/content/software/app-lab/tutorials/04.examples/assets/uno-q-pin-toggle-hero.png b/content/software/app-lab/tutorials/04.examples/assets/uno-q-pin-toggle-hero.png new file mode 100644 index 0000000000..2d06f03c6a Binary files /dev/null and b/content/software/app-lab/tutorials/04.examples/assets/uno-q-pin-toggle-hero.png differ diff --git a/content/software/app-lab/tutorials/04.examples/assets/weather-forecast-on-led-matrix-hero.png b/content/software/app-lab/tutorials/04.examples/assets/weather-forecast-on-led-matrix-hero.png new file mode 100644 index 0000000000..134be5bc1b Binary files /dev/null and b/content/software/app-lab/tutorials/04.examples/assets/weather-forecast-on-led-matrix-hero.png differ diff --git a/content/software/plc-ide/tutorials/02.plc-programming-introduction/content.md b/content/software/plc-ide/tutorials/02.plc-programming-introduction/content.md index f9d090dd32..485d93cf7a 100644 --- a/content/software/plc-ide/tutorials/02.plc-programming-introduction/content.md +++ b/content/software/plc-ide/tutorials/02.plc-programming-introduction/content.md @@ -138,9 +138,9 @@ With the 'Sketch Libraries' window open, click the **Add** option and fill out t For example, if you want to add the 1.1.1 version of the 'Arduino_MachineControl' library, respective information must be introduced to its fields accordingly. -It is possible to find this information using the [Arduino Library List](https://www.arduinolibraries.info/) or referencing the indexed library on your development environment if you have downloaded it to use within Arduino IDE. By navigating manually to the local libraries directory on your development environment, you can access the meta-data from the 'library.properties' of the desired library. +It is possible to find this information using the [Arduino Library Reference](https://docs.arduino.cc/libraries/) or referencing the indexed library on your development environment if you have downloaded it to use within Arduino IDE. By navigating manually to the local libraries directory on your development environment, you can access the meta-data from the 'library.properties' of the desired library. -***Currently only publicly available libraries can be added to the PLC IDE Arduino Sketch, and you can check its availability by searching in the [Arduino Library List](https://www.arduinolibraries.info/).*** +***Currently only publicly available libraries can be added to the PLC IDE Arduino Sketch, and you can check its availability by searching in the [Arduino Library Reference](https://docs.arduino.cc/libraries/).*** Once you have followed the previous steps, the libraries will be available for use. A library of choice can be removed by clicking on the **Remove** option within the 'Sketch Libraries' window. diff --git a/package-lock.json b/package-lock.json index 15b43f646a..8967cc2a20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "hasInstallScript": true, "license": "ISC", "dependencies": { - "@arduino/docs-arduino-cc": "^2.1.6", + "@arduino/docs-arduino-cc": "^2.1.7", "gatsby": "^5.11.0", "gatsby-background-image": "^1.6.0", "gatsby-image": "^3.11.0", @@ -309,9 +309,9 @@ } }, "node_modules/@arduino/docs-arduino-cc": { - "version": "2.1.6", - "resolved": "https://npm.pkg.github.com/download/@arduino/docs-arduino-cc/2.1.6/8a1091a03f09d08867482d16c58a517b6794f835", - "integrity": "sha512-6nYcRe6TOcPY2N8vwR3XHlPbgPKqqD5CK/uArcgLoguAAr4ChRNyfbu/fsvDa6Z5LZ9WRi3Donj/UDPXzj791Q==", + "version": "2.1.7", + "resolved": "https://npm.pkg.github.com/download/@arduino/docs-arduino-cc/2.1.7/98b9e5b71a6376dd72bc18870490ee68ae4fb95c", + "integrity": "sha512-UmTbbN+WCNjzXdRGDwGp3Nj7kFkVeeMeKx791PvaJlK7fNOY4epsAMt1q36bMlGiNrC+XBGiFF/VQG/B9XigCg==", "dependencies": { "@algolia/autocomplete-core": "^1.10.0", "@algolia/autocomplete-plugin-recent-searches": "^1.17.0", diff --git a/package.json b/package.json index 7a1a993b40..ed97deb764 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ }, "homepage": "https://github.com/arduino/docs-content#readme", "dependencies": { - "@arduino/docs-arduino-cc": "^2.1.6", + "@arduino/docs-arduino-cc": "^2.1.7", "gatsby": "^5.11.0", "gatsby-background-image": "^1.6.0", "gatsby-image": "^3.11.0",