Skip to content

Commit 31dcfc7

Browse files
Updated article with fixes
1 parent 15d92ac commit 31dcfc7

File tree

5 files changed

+157
-22
lines changed

5 files changed

+157
-22
lines changed

content/hardware/03.nano/carriers/nano-connector-carrier/tutorials/getting-started-nano-connector-carrier/content.md

Lines changed: 157 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ The Grove connector uses a 4-pin DIP-2.0 mm connector (P/N: 114020164) with four
9898

9999
With the standardized pinouts mentioned, using Groove connectors eliminates the need for soldering or breadboarding and simplifies connecting various and different sensors, actuators and displays to your Nano family board.
100100

101-
#### Micro SD Card Slot
101+
#### MicroSD Card Slot
102102

103103
The Nano Connector Carrier includes an onboard microSD card slot for projects requiring data logging or file storage.
104104

@@ -136,39 +136,37 @@ The board's connectors are mapped to specific Nano family pins, making it straig
136136

137137
## What to Do Next?
138138

139-
I'll add a snippet of the code to your section:
140-
141-
## What to Do Next?
142-
143139
### Example Project: Teamometer
144140

145141
The Teamometer demonstrates how different Modulino sensor modules can work together to solve a real-world problem. This project combines temperature sensing, LED visual feedback, button interaction and audio alerts to create a smart tea temperature monitor. It's a fun way to see how easily the Nano Connector Carrier can connect to different sensors and modules simultaneously, giving you visual cues, sounds and temperature readings in a straightforward project, even with different connectors.
146142

147143
![Teamometer overview](assets/teamometer.png)
148144

149145
**Components needed:**
150-
- Modulino Buttons module
151-
- Modulino Pixels module
152-
- Modulino Thermo module
153-
- Grove Buzzer sensor
146+
- [Modulino Buttons](https://store.arduino.cc/products/modulino-buttons) - ABX00110
147+
- [Modulino Pixels](https://store.arduino.cc/products/modulino-pixels) - ABX00109
148+
- [Modulino Thermo](https://store.arduino.cc/products/modulino-thermo) - ABX00103
149+
- [Nano family board](https://docs.arduino.cc/hardware/)
150+
- [Nano Connector Carrier](https://store.arduino.cc/products/nano-connector-carrier) - ASX00061
151+
- Grove Buzzer sensor
154152
- Thick rubber band (for securing the Thermo module to your cup)
155153
- Cup
156154
- Your favorite tea
157155

158156
**Assembly instructions:**
159157
1. Connect the Modulino Buttons, Pixels and Thermo modules to your Nano family board through the Nano Connector Carrier.
160-
2. Attach the Thermo module to the outside of your cup using the thick rubber band
158+
2. Attach the Thermo module to the outside of your cup using the thick rubber band.
161159
3. Connect the Grove Buzzer sensor to your Nano family board through the Nano Connector Carrier.
162-
4. Upload the code provided below
163-
5. Fill your cup with hot tea
164-
6. Wait a few seconds to allow the temperature to transfer to the sensor
165-
7. Press button A to begin monitoring
160+
4. Upload the code provided below.
161+
5. Fill your cup with hot tea.
162+
6. Wait a few seconds to allow the heat to transfer to the sensor.
163+
7. Press button A to begin monitoring.
166164

167165
![Connection guide](assets/moduleConnection.png)
168166

169167
**Code Example:**
170-
```ARDUINO
171-
#include <Modulino.h>
168+
```arduino
169+
#include <Arduino_Modulino.h>
172170
173171
// Create object instances
174172
ModulinoThermo thermo;
@@ -321,15 +319,21 @@ void updateTemperatureDisplay(float celsius) {
321319

322320
The temperature information will be displayed on the serial console and the Modulino Pixels. As your tea cools, fewer LEDs will light up, and the colors will change from red (very hot) through violet, white, and green, to blue (cool). When your tea reaches the perfect drinking temperature, the buzzer will tell you it is ready.
323321

322+
Keep in mind that because the sensor is designed for atmospheric temperature monitoring you might have to tinker the values a bit(depending on your setup) as the measurment will not be as accurate measuring a different medium.
323+
324324
### Example Project: Motion Logger
325325

326326
The Motion Tracker demonstrates how the Nano Connector Carrier can integrate with the Movement sensor to record motion data. This project showcases real-time motion sensing, button control and data logging to create a portable motion capture system that can be used for activity tracking, sports analysis or interactive projects.
327327

328+
![Motion Logger overview](assets/movement_monitor.png)
329+
328330
**Components needed:**
329-
- Modulino Movement module
330-
- Modulino Buttons module
331+
- [Modulino Movement](https://store.arduino.cc/products/modulino-movement) - ABX00101
332+
- [Modulino Buttons ](https://store.arduino.cc/products/modulino-buttons) - ABX00110
331333
- MicroSD card
332-
- Nano Connector Carrier
334+
- [Nano Connector Carrier](https://store.arduino.cc/products/nano-connector-carrier) - ASX00061
335+
336+
![Connection guide](assets/movement-connector.png)
333337

334338
**Assembly instructions:**
335339
1. Connect the Modulino Movement and Buttons modules to your Nano Connector Carrier
@@ -341,14 +345,14 @@ The Motion Tracker demonstrates how the Nano Connector Carrier can integrate wit
341345
7. Press button A again to stop recording
342346

343347
**Example sketch:**
344-
```ARDUINO
348+
```arduino
345349
/*
346350
* Modulino Movement Logger
347351
*
348352
* Records movement data from a Modulino Movement sensor to an SD card.
349353
* Press Button A to start/stop recording.
350354
*/
351-
#include "Modulino.h"
355+
#include "Arduino_Modulino.h"
352356
#include <SD.h>
353357
354358
// Create objects for the modules
@@ -499,9 +503,140 @@ void loop() {
499503
delay(50);
500504
}
501505
```
502-
503506
The Motion Tracker continuously reads acceleration and orientation data from the Modulino Movement, displaying it in real-time on the Arduino IDE Serial Monitor. When recording is activated, the data is saved to a CSV file on the microSD card, creating a detailed motion profile that can be analyzed later in a spreadsheet or data visualization tools. This project is perfect for capturing movement patterns, analyzing sports techniques or creating interactive motion-controlled devices.
504507

508+
### Example Project: Enclosure Monitor in MicroPython
509+
510+
The Enclosure Monitor demonstrates how MicroPython and Modulino modules can work together to create a smart environmental monitoring system. This project uses temperature sensing and LED visual feedback to monitor conditions inside an enclosure, like a terrarium, server cabinet, or food storage area. It logs data over time while providing immediate visual indicators if temperatures fall outside the ideal range.
511+
Note that the temperature settings can be changed to your specific use-case.
512+
513+
To get started with MicroPython and install the Modulino library on your Arduino board, follow the official guide [here](https://docs.arduino.cc/micropython/modulinos/installation/). This guide will walk you through installing both MicroPython and the necessary Modulino libraries to work with your modules.
514+
515+
![Enclosure Monitor overview](assets/enclosure-monitor.png)
516+
517+
**Components needed:**
518+
- [Modulino Thermo](https://store.arduino.cc/products/modulino-thermo) - ABX00103
519+
- [Modulino Pixels](https://store.arduino.cc/products/modulino-pixels) - ABX00109
520+
- [Nano family board](https://docs.arduino.cc/hardware/)
521+
- [Nano Connector Carrier](https://store.arduino.cc/products/nano-connector-carrier) - ASX00061
522+
- Optional enclosure for permanent installation
523+
524+
**Assembly instructions:**
525+
1. Connect the Modulino Thermo and Pixels modules to your Nano family board through the Nano Connector Carrier.
526+
2. Position the Thermo module where you want to monitor temperature (inside your enclosure).
527+
3. Place the Pixels module where it's visible for status monitoring.
528+
4. Upload the MicroPython code provided below.
529+
5. Open the serial monitor to view real-time readings.
530+
6. The system will automatically begin monitoring and logging data.
531+
532+
![Connection guide](assets/enclosure-connection.png)
533+
534+
**Code Example:**
535+
```python
536+
"""
537+
Enclosure Temperature Monitor using Modulino Thermo and Pixels modules.
538+
- BLUE LEDs: Too cold (below MIN_TEMP)
539+
- GREEN LEDs: Ideal temperature (between MIN_TEMP and MAX_TEMP)
540+
- RED LEDs: Too hot (above MAX_TEMP)
541+
542+
Logs temperature data to both the console and internal file system.
543+
"""
544+
from modulino import ModulinoThermo, ModulinoPixels, ModulinoColor
545+
from time import sleep
546+
import os
547+
548+
# Create module instances
549+
thermo = ModulinoThermo()
550+
pixels = ModulinoPixels()
551+
552+
# Configuration
553+
MIN_TEMP = 20.0 # Below this is too cold (BLUE)
554+
MAX_TEMP = 25.0 # Above this is too hot (RED)
555+
BRIGHTNESS = 50 # LED brightness (0-100)
556+
LOG_FILE = "templog.csv" # Log file name in the internal file system
557+
LOG_INTERVAL = 5 # Log every 5 readings
558+
559+
# Create log file with headers if it doesn't exist
560+
try:
561+
# Check if file exists
562+
files = os.listdir()
563+
if LOG_FILE not in files:
564+
with open(LOG_FILE, 'w') as f:
565+
f.write('Reading,Temperature,Humidity,Status\n')
566+
print(f"Created new log file: {LOG_FILE}")
567+
else:
568+
print(f"Using existing log file: {LOG_FILE}")
569+
except Exception as e:
570+
print(f"File system error: {e}")
571+
572+
# Initialize LEDs to off
573+
pixels.clear_all().show()
574+
575+
# Main loop
576+
print("=== Enclosure Temperature Monitor ===")
577+
print(f"Cold: < {MIN_TEMP}°C | Ideal: {MIN_TEMP}-{MAX_TEMP}°C | Hot: > {MAX_TEMP}°C")
578+
579+
counter = 0 # Simple counter for readings
580+
581+
while True:
582+
counter += 1
583+
584+
# Read temperature and humidity
585+
temp = thermo.temperature
586+
humidity = thermo.relative_humidity
587+
588+
# Update display if temperature reading is valid
589+
if temp is not None:
590+
# Determine temperature status
591+
if temp < MIN_TEMP:
592+
status = "Cold"
593+
color = ModulinoColor.BLUE
594+
elif temp > MAX_TEMP:
595+
status = "Hot"
596+
color = ModulinoColor.RED
597+
else:
598+
status = "Ideal"
599+
color = ModulinoColor.GREEN
600+
601+
# Print to console
602+
print(f"Temp: {temp:.1f}°C - {status}", end="")
603+
if humidity is not None:
604+
print(f", Humidity: {humidity:.1f}%")
605+
else:
606+
print("")
607+
608+
# Update LED display
609+
pixels.clear_all()
610+
# Calculate how many LEDs to light (1-8)
611+
led_count = int(max(1, min(8, (temp - MIN_TEMP + 5) / 15 * 8)))
612+
for i in range(led_count):
613+
pixels.set_color(i, color, BRIGHTNESS)
614+
pixels.show()
615+
616+
# Log to file at interval
617+
if counter % LOG_INTERVAL == 0:
618+
try:
619+
with open(LOG_FILE, 'a') as f:
620+
humidity_str = f"{humidity:.1f}" if humidity is not None else "N/A"
621+
f.write(f"{counter},{temp:.1f},{humidity_str},{status}\n")
622+
print("Data logged to file ✓")
623+
except Exception as e:
624+
print(f"Failed to write to file: {e}")
625+
else:
626+
print("Waiting for temperature reading...")
627+
# Blink white LED to indicate waiting
628+
pixels.set_all_color(ModulinoColor.WHITE, 20).show()
629+
sleep(0.5)
630+
pixels.clear_all().show()
631+
sleep(0.5)
632+
633+
# Wait before next reading
634+
sleep(1)
635+
```
636+
637+
The Enclosure Monitor provides immediate visual feedback about environmental conditions through the Modulino Pixels. LEDs glow BLUE when it's too cold, GREEN when the temperature is in the ideal range, and RED when it's too hot. The number of illuminated LEDs indicates where the temperature falls within each range - more LEDs light up as temperature increases.
638+
639+
Temperature and humidity readings are displayed in real time on the serial monitor and logged to a CSV file on the internal storage. This data can be retrieved later for analysis of environmental trends over time.
505640

506641
Now that you understand the features of the Nano Connector Carrier, here are some exciting project ideas to get you started:
507642

0 commit comments

Comments
 (0)