Environment
Project #15: Environment – Serial Camera – Mk29
——
#DonLucElectronics #DonLuc #Arduino #Camera #SD #RTC #EEPROM #Display #Elecrow #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant
——
——
——
——
Crowtail – Serial Camera
The Crowtail Serial Camera is a JPEG color camera module easy for PC and MCU use. It has integrated image processing DSP to generate 320 x 240 or 640 x 480 JPEG images without thumbnail information, captured pictures will be stored in the internal buffer and transferred via UART port. The UART Can be configured to TTL or CMOS by hardware.
- -Crowtail interface
- -Default baud rate of the serial port is 38400
- -640 x 480 or 320 x 240 resolution
- -JPEG compressed image without Thumbnail Information
- -5 Volt power supply
DL2503Mk02
1 x Crowduino Uno – SD
1 x Crowtail – Base Shield
1 x Crowtail – Serial Camera
1 x Crowtail – Button 2.0
1 x MicroSD Card 4 Gb
1 x Crowtail – RTC 2.0
1 x CR1220 Battery
1 x Crowtail – LED(Green)
1 x USB Battery Pack
1 x USB Mini-B Cable
Crowduino Uno – SD
SCL – A5
SDA – A4
SCK – 12
MISO – 11
MOSI – 10
CS – 4
BUT – 9
LEDG – 6
VIN – +5V
GND – GND
DL2503Mk02p
DL2503Mk02p.ino
/****** Don Luc Electronics © ****** Software Version Information Project #15: Environment – Serial Camera – Mk29 DL2503Mk02p.ino DL2503Mk02 1 x Crowduino Uno - SD 1 x Crowtail - Base Shield 1 x Crowtail - Serial Camera 1 x Crowtail - Button 2.0 1 x MicroSD Card 4 Gb 1 x Crowtail - RTC 2.0 1 x CR1220 Battery 1 x Crowtail - LED(Green) 1 x USB Battery Pack 1 x USB Mini-B Cable */ // Include the Library Code // EEPROM library to read and write EEPROM with unique ID for unit #include <EEPROM.h> // Wire #include <Wire.h> // Liquid Crystal #include "LiquidCrystal.h" // RTC (Real-Time Clock) #include "RTClib.h" // Secure Digital (SD Card) #include <SD.h> #include <SPI.h> // Serial Camera #include <Adafruit_VC0706.h> // Software Serial #include <SoftwareSerial.h> // Camera TX connected to pin 2 // Camera RX to pin 3: SoftwareSerial cameraconnection = SoftwareSerial(2, 3); // Serial Camera Adafruit_VC0706 cam = Adafruit_VC0706(&cameraconnection); // Create an image with the name DLEPxxx.JPG char filename[13]; // Secure Digital (SD Card) const int chipSelect = 4; String zzzzzz = ""; // Button int iButton = 9; // Variable for reading the Button status int iButtonState = 0; // RTC (Real-Time Clock) RTC_DS1307 RTC; String dateRTC = ""; String timeRTC = ""; // Liquid Crystal // Connect via i2c LiquidCrystal lcd(0); // LED Green int iLEDGreen = 6; // EEPROM Unique ID Information String uid = ""; // Software Version Information String sver = "15-29"; void loop() { // RTC (Real-Time Clock) isRTC(); // Display RTC isDisplayRTC(); // Read the state of the Switch value iButtonState = digitalRead(iButton); // The Button is HIGH: if (iButtonState == HIGH) { // LED Green HIGH digitalWrite(iLEDGreen, HIGH); // Camera isCamera(); // MicroSD Card isSD(); // LED Green LOW digitalWrite(iLEDGreen, LOW); } else { // LED Green LOW digitalWrite(iLEDGreen, LOW); } // Delay delay( 500 ); }
getCamera.ino
// Camera // Setup Camera void isSetupCamera(){ // Setup Camera cam.begin(); // Biggest cam.setImageSize(VC0706_640x480); } // is Camera void isCamera(){ // Camera Snap cam.takePicture(); // File Name strcpy(filename, "DLEP000.JPG"); for (int i = 0; i < 1000; i++) { filename[4] = '0' + i/10; filename[5] = '0' + i/10; filename[6] = '0' + i%10; // create if does not exist, do not open existing, write, sync after write if (! SD.exists(filename)) { break; } } // Open the file for writing File imgFile = SD.open(filename, FILE_WRITE); // Get the size of the image (frame) taken uint16_t jpglen = cam.frameLength(); // Time int32_t time = millis(); pinMode(8, OUTPUT); // Read all the data up to # bytes! byte wCount = 0; // For counting # of writes while (jpglen > 0) { // read 32 bytes at a time; uint8_t *buffer; uint8_t bytesToRead = min(32, jpglen); // change 32 to 64 for a speedup but may not work with all setups! buffer = cam.readPicture(bytesToRead); imgFile.write(buffer, bytesToRead); if(++wCount >= 64) { // Every 2K, give a little feedback so it doesn't appear locked up //Serial.print('.'); wCount = 0; } //Serial.print("Read "); Serial.print(bytesToRead, DEC); Serial.println(" bytes"); jpglen -= bytesToRead; } // Close imgFile.close(); }
getDisplay.ino
// getDisplay // Crowbits - OLED 128X64 UID // Display UID void isDisplayUID(){ // Set up the LCD's number of rows and columns: lcd.begin(16, 2); // Print a message to the LCD. // Cursor lcd.setCursor(0, 0); lcd.print("Don Luc Electron"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD. lcd.print( sver ); } // Display RTC void isDisplayRTC(){ // Clear lcd.clear(); // Set the cursor to column 0, line 0 lcd.setCursor(0, 0); lcd.print( dateRTC ); // Set the cursor to column 0, line 1 lcd.setCursor(0, 1); lcd.print( timeRTC ); }
getEEPROM.ino
// EEPROM // isUID EEPROM Unique ID void isUID() { // Is Unit ID uid = ""; for (int x = 0; x < 7; x++) { uid = uid + char(EEPROM.read(x)); } }
getRTC.ino
// RTC (Real-Time Clock) // Setup RTC void isSetupRTC(){ // RTC (Real-Time Clock) RTC.begin(); // RTC Running if (! RTC.isrunning()) { // following line sets the RTC to the date & time //this sketch was compiled RTC.adjust(DateTime(__DATE__, __TIME__)); // This line sets the RTC with an explicit date & time, for example to set // January 21, 2014 at 3am you would call: // RTC.adjust(DateTime(2014, 1, 21, 3, 0, 0)) } } // RTC (Real-Time Clock) void isRTC(){ // RTC (Real-Time Clock) DateTime now = RTC.now(); // Date dateRTC = now.year(), DEC; dateRTC = dateRTC + "/"; dateRTC = dateRTC + now.month(), DEC; dateRTC = dateRTC + "/"; dateRTC = dateRTC + now.day(), DEC; // Time timeRTC = now.hour(), DEC; timeRTC = timeRTC + ":"; timeRTC = timeRTC + now.minute(), DEC; timeRTC = timeRTC + ":"; timeRTC = timeRTC + now.second(), DEC; }
getSD.ino
// MicroSD Card // MicroSD Setup void isSetupSD() { // MicroSD Card // See if the card is present and can be initialized: if (!SD.begin(chipSelect)) { // Don't do anything more: while (1); } } // MicroSD Card void isSD() { zzzzzz = ""; //DLE|EEPROM Unique ID|Version|Date|Time|filename| zzzzzz = "DLE|" + uid + "|" + sver + "|" + String( dateRTC ) + "|" + String( timeRTC ) + "|" + filename + "|"; // Open the file. Note that only one file can be open at a time, // so you have to close this one before opening another. File dataFile = SD.open("dledata.txt", FILE_WRITE); // If the file is available, write to it: if (dataFile) { // Write dataFile.println( zzzzzz ); dataFile.close(); } }
setup.ino
// Setup void setup() { // Delay delay(100); // isUID EEPROM Unique ID isUID(); // Delay delay(100); // Initialize the LED LED Green pinMode(iLEDGreen, OUTPUT); // LED Green digitalWrite(iLEDGreen, LOW); // Delay delay(100); // Setup RTC isSetupRTC(); // Delay delay(100); // MicroSD Card isSetupSD(); // Delay delay(100); // Button pinMode(iButton,INPUT); // Delay delay( 100 ); // Setup Camera isSetupCamera(); // Delay delay( 100 ); // Display UID isDisplayUID(); // Delay 5 Second delay( 5000 ); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Electronics, IoT, Teacher, Instructor, R&D and Consulting
- Programming Language
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
- IoT
- Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
- Robotics
- Automation
- Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
- Unmanned Vehicles Terrestrial and Marine
- Machine Learning
- Artificial Intelligence (AI)
- RTOS
- Sensors, eHealth Sensors, Biosensor, and Biometric
- Research & Development (R & D)
- Consulting
Follow Us
Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/
Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Patreon: https://patreon.com/DonLucElectronics59
DFRobot: https://learn.dfrobot.com/user-10186.html
Hackster.io: https://www.hackster.io/neosteam-labs
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin8
Twitch: https://www.twitch.tv/lucpaquin
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/
Don Luc
Project #15: Environment – SD – Mk28
——
#DonLucElectronics #DonLuc #Arduino #SD #RTC #EEPROM #DHT11 #ASM #Display #Elecrow #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant
——
——
——
——
Crowduino Uno – SD – SD Cards
There is a SD card slot on the Crowduino Uno – SD – SD Card board, with which you can easily use SD Card to record and thus to read data on the SD Card. The SD Card uses the SPI interface (D10/D11/D12) plus a CS Pin (D3 or D4) to cominicate with the main microcontroller Atmega328. First, Select the CS Pin you want to use with jumper. To make your project more flexible, you can select either the D3 or D4 pin as your CS pin for SD card. The default is D4. If your D4 have been applied for other modules, you can select the D3, but notice to modify related files in your program, which we will discuss later.
DL2502Mk06
1 x Crowduino Uno – SD
1 x Crowtail – Base Shield
1 x Crowtail – LED(Red)
1 x Crowtail – Button 2.0
1 x MicroSD Card 4 Gb
1 x Crowtail – RTC 2.0
1 x CR1220 Battery
1 x Crowtail – Temperature and Humidity Sensor 2.0
1 x Crowtail – Rotary Angle Sensor 2.0
1 x Crowtail – Moisture Sensor 2.0
1 x Crowtail – I2C LCD
1 x Crowtail – LED(Green)
1 x Crowtail – LED(Yellow)
1 x USB Battery Pack
1 x USB Mini-B Cable
Crowduino Uno – SD
SCL – A5
SDA – A4
POT – A1
ASM – A0
SCK – 12
MISO – 11
MOSI – 10
CS – 4
BUT – 9
LEDR – 8
LEDY – 7
LEDG – 6
ITH – 5
VIN – +5V
GND – GND
DL2502Mk06p
DL2502Mk06p.ino
/****** Don Luc Electronics © ****** Software Version Information Project #15: Environment – SD – Mk28 DL2502Mk06p.ino DL2502Mk06 1 x Crowduino Uno - SD 1 x Crowtail - Base Shield 1 x Crowtail - LED(Red) 1 x Crowtail - Button 2.0 1 x MicroSD Card 4 Gb 1 x Crowtail - RTC 2.0 1 x CR1220 Battery 1 x Crowtail - Temperature and Humidity Sensor 2.0 1 x Crowtail - Rotary Angle Sensor 2.0 1 x Crowtail - Moisture Sensor 2.0 1 x Crowtail - I2C LCD 1 x Crowtail - LED(Green) 1 x Crowtail - LED(Yellow) 1 x USB Battery Pack 1 x USB Mini-B Cable */ // Include the Library Code // EEPROM library to read and write EEPROM with unique ID for unit #include <EEPROM.h> // Wire #include <Wire.h> // Liquid Crystal #include "LiquidCrystal.h" // Temperature and Humidity Sensor #include "DHT.h" // RTC (Real-Time Clock) #include "RTClib.h" // Secure Digital (SD Card) #include <SD.h> #include <SPI.h> // Secure Digital (SD Card) const int chipSelect = 4; String zzzzzz = ""; // Define LED Red int iLED = 8; // Button int iButton = 9; // Variable for reading the Button status int iButtonState = 0; // RTC (Real-Time Clock) RTC_DS1307 RTC; String dateRTC = ""; String timeRTC = ""; // Temperature and Humidity Sensor #define DHTPIN 5 // DHT 11 #define DHTTYPE DHT11 DHT dht(DHTPIN, DHTTYPE); // Temperature and Humidity Sensor float h = 0; float t = 0; // Potentiometer int iPotentiometer = A1; // Change Your Threshold Here int Threshold = 0; int zz = 0; // Liquid Crystal // Connect via i2c LiquidCrystal lcd(0); // Crowtail Moisture Sensor int iSoilMoisture = A0; int iSoilMoistureVal = 0; // LED Yellow int iLEDYellow = 7; // LED Green int iLEDGreen = 6; // EEPROM Unique ID Information String uid = ""; // Software Version Information String sver = "15-28"; void loop() { // Crowtail Moisture Sensor isSoilMoisture(); // Temperature and Humidity Sensor isTH(); // RTC (Real-Time Clock) isRTC(); // Read the state of the Switch value iButtonState = digitalRead(iButton); // The Button is HIGH: if (iButtonState == HIGH) { // LED Red HIGH digitalWrite(iLED, HIGH); // MicroSD Card isSD(); } else { // LED Red LOW digitalWrite(iLED, LOW); } // Delay 0.5 Second delay( 500 ); }
getDisplay.ino
// getDisplay // Crowbits - OLED 128X64 UID void isDisplayUID(){ // Set up the LCD's number of rows and columns: lcd.begin(16, 2); // Print a message to the LCD. // Cursor lcd.setCursor(0, 0); lcd.print("Don Luc Electron"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD. lcd.print( sver ); } // isDisplay Green void isDisplayG(){ // Print a message to the LCD // Clear lcd.clear(); // Cursor lcd.setCursor(0, 0); lcd.print("Humid Soil"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD lcd.print( iSoilMoistureVal ); } // isDisplay Yellow void isDisplayY(){ // Print a message to the LCD // Clear lcd.clear(); // Cursor lcd.setCursor(0, 0); lcd.print("Dry Soil"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD lcd.print( iSoilMoistureVal ); }
getEEPROM.ino
// EEPROM // isUID EEPROM Unique ID void isUID() { // Is Unit ID uid = ""; for (int x = 0; x < 7; x++) { uid = uid + char(EEPROM.read(x)); } }
getRTC.ino
// RTC (Real-Time Clock) // Setup RTC void isSetupRTC(){ // RTC (Real-Time Clock) RTC.begin(); // RTC Running if (! RTC.isrunning()) { // following line sets the RTC to the date & time //this sketch was compiled RTC.adjust(DateTime(__DATE__, __TIME__)); // This line sets the RTC with an explicit date & time, for example to set // January 21, 2014 at 3am you would call: // RTC.adjust(DateTime(2014, 1, 21, 3, 0, 0)) } } // RTC (Real-Time Clock) void isRTC(){ // RTC (Real-Time Clock) DateTime now = RTC.now(); // Date dateRTC = now.year(), DEC; dateRTC = dateRTC + "/"; dateRTC = dateRTC + now.month(), DEC; dateRTC = dateRTC + "/"; dateRTC = dateRTC + now.day(), DEC; // Time timeRTC = now.hour(), DEC; timeRTC = timeRTC + ":"; timeRTC = timeRTC + now.minute(), DEC; timeRTC = timeRTC + ":"; timeRTC = timeRTC + now.second(), DEC; }
getSD.ino
// MicroSD Card // MicroSD Setup void isSetupSD() { // MicroSD Card // See if the card is present and can be initialized: if (!SD.begin(chipSelect)) { // Don't do anything more: while (1); } } // MicroSD Card void isSD() { zzzzzz = ""; //DLE|EEPROM Unique ID|Version|Date|Time| //Temperature|Humidity|Soil Moisture| zzzzzz = "DLE|" + uid + "|" + sver + "|" + String( dateRTC ) + "|" + String( timeRTC ) + "|" + String(t) + "|" + String(h) + "|" + String(iSoilMoistureVal) + "|"; // Open the file. Note that only one file can be open at a time, // so you have to close this one before opening another. File dataFile = SD.open("dledata.txt", FILE_WRITE); // If the file is available, write to it: if (dataFile) { // Write dataFile.println( zzzzzz ); dataFile.close(); } }
getSoilMoisture.ino
// Crowtail Moisture Sensor // Soil Moisture void isSoilMoisture(){ // Connect Soil Moisture Sensor to Analog 0 // iSoilMoistureVal => 0~700 Soil Moisture iSoilMoistureVal = analogRead( iSoilMoisture ); // Threshold => 200~500 zz = analogRead( iPotentiometer ); Threshold = map( zz, 0, 1024, 200, 500); // Threshold if (iSoilMoistureVal > Threshold) { // 300~700 - Humid Soil // LED Yellow digitalWrite(iLEDYellow, LOW); // Display Green isDisplayG(); // LED Green digitalWrite(iLEDGreen, HIGH); } else { // 0-300 Dry Soil // LED Green digitalWrite(iLEDGreen, LOW); // Display Yellow isDisplayY(); digitalWrite(iLEDYellow, HIGH); } }
getTH.ino
// Temperature and Humidity Sensor void isTH(){ // Temperature t = dht.readTemperature(); // Humidity h = dht.readHumidity(); }
setup.ino
// Setup void setup() { // Delay delay(100); // isUID EEPROM Unique ID isUID(); // Delay delay(100); // Initialize the LED iLED Yellow pinMode(iLEDYellow, OUTPUT); // Initialize the LED LED Green pinMode(iLEDGreen, OUTPUT); // Temperature and Humidity Sensor dht.begin(); // Delay delay(100); // Setup RTC isSetupRTC(); // Delay delay(100); // MicroSD Card isSetupSD(); // Delay delay(100); // iLED Red pinMode(iLED, OUTPUT); // LED Red LOW digitalWrite(iLED, LOW); // Delay delay( 100 ); // Button pinMode(iButton,INPUT); // Delay delay( 100 ); // Display UID isDisplayUID(); // Delay 5 Second delay( 5000 ); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Electronics, IoT, Teacher, Instructor, R&D and Consulting
- Programming Language
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
- IoT
- Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
- Robotics
- Automation
- Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
- Unmanned Vehicles Terrestrial and Marine
- Machine Learning
- Artificial Intelligence (AI)
- RTOS
- Sensors, eHealth Sensors, Biosensor, and Biometric
- Research & Development (R & D)
- Consulting
Follow Us
Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/
Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Patreon: https://patreon.com/DonLucElectronics59
DFRobot: https://learn.dfrobot.com/user-10186.html
Hackster.io: https://www.hackster.io/neosteam-labs
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin8
Twitch: https://www.twitch.tv/lucpaquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/
Don Luc
Project #15: Environment – GPS – Mk27
——
#DonLucElectronics #DonLuc #Arduino #RTC #EEPROM #DHT11 #ASM #Display #Elecrow #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant
——
——
——
——
Crowtail – GPS
This Crowtail – GPS module is a cost-efficient and field-programmable gadget armed with a NEO-6M-0-001 and serial communication configuration. It features 55 channels, and a GPS L1 C/A code receiver. The sensitivity of tracking and acquisition both reach up to -161dBm, making it a great choice for personal navigation projects and location services, as well as an outstanding one among products of the same price class.
- -Input Voltage: 5 Volt
- -Supports NMEA and U-Blox Binary
- -Low power consumption
- -Baud rates configurable
DL2502Mk04
1 x Crowduino Uno – SD
1 x Crowtail – Base Shield
1 x Crowtail – GPS
1 x Crowtail – RTC 2.0
1 x Crowtail – Temperature and Humidity Sensor 2.0
1 x Crowtail – Rotary Angle Sensor 2.0
1 x Crowtail – Moisture Sensor 2.0
1 x Crowtail – I2C LCD
1 x Crowtail – LED(Green)
1 x Crowtail – LED(Yellow)
1 x USB Battery Pack
1 x USB Mini-B Cable
Crowduino Uno – SD
SCL – A5
SDA – A4
POT – A1
ASM – A0
LEDY – 7
LEDG – 6
ITH – 5
GPR – 2
GPT – 3
VIN – +5V
GND – GND
DL2502Mk04p
DL2502Mk04p.ino
/****** Don Luc Electronics © ****** Software Version Information Project #15: Environment – GPS – Mk27 DL2502Mk04p.ino DL2502Mk04 1 x Crowduino Uno - SD 1 x Crowtail - Base Shield 1 x Crowtail - GPS 1 x Crowtail - RTC 2.0 1 x Crowtail - Temperature and Humidity Sensor 2.0 1 x Crowtail - Rotary Angle Sensor 2.0 1 x Crowtail - Moisture Sensor 2.0 1 x Crowtail - I2C LCD 1 x Crowtail - LED(Green) 1 x Crowtail - LED(Yellow) 1 x USB Battery Pack 1 x USB Mini-B Cable */ // Include the Library Code // EEPROM library to read and write EEPROM with unique ID for unit #include <EEPROM.h> // Wire #include <Wire.h> // Liquid Crystal #include "LiquidCrystal.h" // Temperature and Humidity Sensor #include "DHT.h" // RTC (Real-Time Clock) #include "RTClib.h" // GPS Receiver #include <TinyGPS++.h> // Software Serial #include <SoftwareSerial.h> // GPS Receiver static const int RXPin = 2; // This one is unused and doesnt have a conection static const int TXPin = 3; // GPS Baud static const uint32_t GPSBaud = 9600; // The TinyGPS++ object TinyGPSPlus gps; // The serial connection to the GPS device SoftwareSerial ss(RXPin, TXPin); // Latitude float TargetLat; // Longitude float TargetLon; // GPS Status String GPSSt = ""; // RTC (Real-Time Clock) RTC_DS1307 RTC; String dateRTC = ""; String timeRTC = ""; // Temperature and Humidity Sensor #define DHTPIN 5 // DHT 11 #define DHTTYPE DHT11 DHT dht(DHTPIN, DHTTYPE); // Temperature and Humidity Sensor float h = 0; float t = 0; // Potentiometer int iPotentiometer = A1; // Change Your Threshold Here int Threshold = 0; int zz = 0; // Liquid Crystal // Connect via i2c LiquidCrystal lcd(0); // Crowtail Moisture Sensor int iSoilMoisture = A0; int iSoilMoistureVal = 0; // LED Yellow int iLEDYellow = 7; // LED Green int iLEDGreen = 6; // EEPROM Unique ID Information String uid = ""; // Software Version Information String sver = "15-27"; void loop() { // Crowtail Moisture Sensor isSoilMoisture(); // Temperature and Humidity Sensor isTH(); // RTC (Real-Time Clock) isRTC(); // isGPS isGPS(); // Delay 2 Second delay( 2000 ); // Display Temperature and Humidity isDisplayTH(); // Delay 2 Second delay( 2000 ); // Display EEPROM isDisplayEEPROM(); // Delay 2 Second delay( 2000 ); // Display RTC isDisplayRTC(); // Delay 2 Second delay( 2000 ); // GPS Vector Pointer Target isDisplayInfo(); // Delay 2 Second delay( 2000 ); }
getDisplay.ino
// getDisplay // Crowbits - OLED 128X64 UID void isDisplayUID(){ // Set up the LCD's number of rows and columns: lcd.begin(16, 2); // Print a message to the LCD. // Cursor lcd.setCursor(0, 0); lcd.print("Don Luc Electron"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD. lcd.print( sver ); } // isDisplay Green void isDisplayG(){ // Print a message to the LCD // Clear lcd.clear(); // Cursor lcd.setCursor(0, 0); lcd.print("Humid Soil"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD lcd.print( iSoilMoistureVal ); } // isDisplay Yellow void isDisplayY(){ // Print a message to the LCD // Clear lcd.clear(); // Cursor lcd.setCursor(0, 0); lcd.print("Dry Soil"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD lcd.print( iSoilMoistureVal ); } // Display Temperature and Humidity void isDisplayTH(){ // Clear lcd.clear(); // Set the cursor to column 0, line 0 lcd.setCursor(0, 0); lcd.print("H: "); lcd.print(h); lcd.print(" %"); // Set the cursor to column 0, line 1 lcd.setCursor(0, 1); lcd.print("T: "); lcd.print(t); lcd.print(" *C"); } // Display EEPROM void isDisplayEEPROM(){ // Clear lcd.clear(); // Set the cursor to column 0, line 0 lcd.setCursor(0, 0); lcd.print("EEPROM"); // Set the cursor to column 0, line 1 lcd.setCursor(0, 1); lcd.print( uid ); } // Display RTC void isDisplayRTC(){ // Clear lcd.clear(); // Set the cursor to column 0, line 0 lcd.setCursor(0, 0); lcd.print( dateRTC ); // Set the cursor to column 0, line 1 lcd.setCursor(0, 1); lcd.print( timeRTC ); } // GPS Vector Pointer Target void isDisplayInfo(){ // Clear lcd.clear(); // Set the cursor to column 0, line 0 lcd.setCursor(0, 0); lcd.print( "Lat: " ); lcd.print( TargetLat ); // Set the cursor to column 0, line 1 lcd.setCursor(0, 1); lcd.print( "Lon: " ); lcd.print( TargetLon ); }
getEEPROM.ino
// EEPROM // isUID EEPROM Unique ID void isUID() { // Is Unit ID uid = ""; for (int x = 0; x < 7; x++) { uid = uid + char(EEPROM.read(x)); } }
getGPS.ino
// GPS Receiver // isGPS void isGPS(){ // Receives NEMA data from GPS receiver // This sketch displays information every time a //new sentence is correctly encoded while ( ss.available() > 0) { // Read if ( gps.encode( ss.read() )) { // GPS Vector Pointer Target displayInfo(); } } if (millis() > 5000 && gps.charsProcessed() < 10) { while(true); } } // GPS Vector Pointer Target void displayInfo(){ // Location if (gps.location.isValid()) { // Latitude TargetLat = gps.location.lat(); // Longitude TargetLon = gps.location.lng(); // GPS Status 2 GPSSt = "Yes"; } else { // GPS Status 0 GPSSt = "No"; } }
getRTC.ino
// RTC (Real-Time Clock) // Setup RTC void isSetupRTC(){ // RTC (Real-Time Clock) RTC.begin(); // RTC Running if (! RTC.isrunning()) { // following line sets the RTC to the date & time //this sketch was compiled RTC.adjust(DateTime(__DATE__, __TIME__)); // This line sets the RTC with an explicit date & time, for example to set // January 21, 2014 at 3am you would call: // RTC.adjust(DateTime(2014, 1, 21, 3, 0, 0)) } } // RTC (Real-Time Clock) void isRTC(){ // RTC (Real-Time Clock) DateTime now = RTC.now(); // Date dateRTC = now.year(), DEC; dateRTC = dateRTC + "/"; dateRTC = dateRTC + now.month(), DEC; dateRTC = dateRTC + "/"; dateRTC = dateRTC + now.day(), DEC; // Time timeRTC = now.hour(), DEC; timeRTC = timeRTC + ":"; timeRTC = timeRTC + now.minute(), DEC; timeRTC = timeRTC + ":"; timeRTC = timeRTC + now.second(), DEC; }
getSoilMoisture.ino
// Crowtail Moisture Sensor // Soil Moisture void isSoilMoisture(){ // Connect Soil Moisture Sensor to Analog 0 // iSoilMoistureVal => 0~700 Soil Moisture iSoilMoistureVal = analogRead( iSoilMoisture ); // Threshold => 200~500 zz = analogRead( iPotentiometer ); Threshold = map( zz, 0, 1024, 200, 500); // Threshold if (iSoilMoistureVal > Threshold) { // 300~700 - Humid Soil // LED Yellow digitalWrite(iLEDYellow, LOW); // Display Green isDisplayG(); // LED Green digitalWrite(iLEDGreen, HIGH); } else { // 0-300 Dry Soil // LED Green digitalWrite(iLEDGreen, LOW); // Display Yellow isDisplayY(); digitalWrite(iLEDYellow, HIGH); } }
getTH.ino
// Temperature and Humidity Sensor void isTH(){ // Temperature t = dht.readTemperature(); // Humidity h = dht.readHumidity(); }
setup.ino
// Setup void setup() { // Delay delay(100); // isUID EEPROM Unique ID isUID(); // Delay delay(100); // Initialize the LED iLED Yellow pinMode(iLEDYellow, OUTPUT); // Initialize the LED LED Green pinMode(iLEDGreen, OUTPUT); // Temperature and Humidity Sensor dht.begin(); // Delay delay(100); // Setup RTC isSetupRTC(); // Delay delay(100); // GPS Receiver // Setup GPS ss.begin(GPSBaud); // Delay delay(100); // Display UID isDisplayUID(); // Delay 5 Second delay( 5000 ); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Electronics, IoT, Teacher, Instructor, R&D and Consulting
- Programming Language
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
- IoT
- Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
- Robotics
- Automation
- Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
- Unmanned Vehicles Terrestrial and Marine
- Machine Learning
- Artificial Intelligence (AI)
- RTOS
- Sensors, eHealth Sensors, Biosensor, and Biometric
- Research & Development (R & D)
- Consulting
Follow Us
Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/
Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Patreon: https://patreon.com/DonLucElectronics59
DFRobot: https://learn.dfrobot.com/user-10186.html
Hackster.io: https://www.hackster.io/neosteam-labs
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin8
Twitch: https://www.twitch.tv/lucpaquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/
Don Luc
Project #15: Environment – RTC – Mk26
——
#DonLucElectronics #DonLuc #Arduino #RTC #EEPROM #DHT11 #ASM #Display #Elecrow #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant
——
——
——
——
Crowtail – RTC 2.0
If you want to make your own electronic watch a RTC module is necessary to generate you the right time, with very low power consumption. This tiny RTC module is based on the clock chip DS1307 which communicates with microcontrollers with I2C protocol. The clock/calendar provides seconds, minutes, hours, day, date, month, and year information. The end of the month date is automatically adjusted for months with fewer than 31 days, including corrections for leap year. This module is really low power consumption, it can serves you more than a month with a CR1220 battery.
DL2502Mk02
1 x Crowduino Uno – SD
1 x Crowtail – Base Shield
1 x Crowtail – RTC 2.0
1 x Crowtail – Temperature and Humidity Sensor 2.0
1 x Crowtail – Rotary Angle Sensor 2.0
1 x Crowtail – Moisture Sensor 2.0
1 x Crowtail – I2C LCD
1 x Crowtail – LED(Green)
1 x Crowtail – LED(Yellow)
1 x USB Battery Pack
1 x USB Mini-B Cable
Crowduino Uno – SD
SCL – A5
SDA – A4
POT – A1
ASM – A0
LEDY – 7
LEDG – 6
ITH – 5
VIN – +5V
GND – GND
DL2502Mk02p
DL2502Mk02p.ino
/****** Don Luc Electronics © ****** Software Version Information Project #15: Environment – RTC – Mk26 DL2502Mk02p.ino DL2502Mk02 1 x Crowduino Uno - SD 1 x Crowtail - Base Shield 1 x Crowtail - RTC 2.0 1 x Crowtail - Temperature and Humidity Sensor 2.0 1 x Crowtail - Rotary Angle Sensor 2.0 1 x Crowtail - Moisture Sensor 2.0 1 x Crowtail - I2C LCD 1 x Crowtail - LED(Green) 1 x Crowtail - LED(Yellow) 1 x USB Battery Pack 1 x USB Mini-B Cable */ // Include the Library Code // EEPROM library to read and write EEPROM with unique ID for unit #include <EEPROM.h> // Wire #include <Wire.h> // Liquid Crystal #include "LiquidCrystal.h" // Temperature and Humidity Sensor #include "DHT.h" // RTC (Real-Time Clock) #include "RTClib.h" // RTC (Real-Time Clock) RTC_DS1307 RTC; String dateRTC = ""; String timeRTC = ""; // Temperature and Humidity Sensor #define DHTPIN 5 // DHT 11 #define DHTTYPE DHT11 DHT dht(DHTPIN, DHTTYPE); // Temperature and Humidity Sensor float h = 0; float t = 0; // Potentiometer int iPotentiometer = A1; // Change Your Threshold Here int Threshold = 0; int zz = 0; // Liquid Crystal // Connect via i2c LiquidCrystal lcd(0); // Crowtail Moisture Sensor int iSoilMoisture = A0; int iSoilMoistureVal = 0; // LED Yellow int iLEDYellow = 7; // LED Green int iLEDGreen = 6; // EEPROM Unique ID Information String uid = ""; // Software Version Information String sver = "15-26"; void loop() { // Crowtail Moisture Sensor isSoilMoisture(); // Temperature and Humidity Sensor isTH(); // RTC (Real-Time Clock) isRTC(); // Delay 2 Second delay( 2000 ); // Display Temperature and Humidity isDisplayTH(); // Delay 2 Second delay( 2000 ); // Display EEPROM isDisplayEEPROM(); // Delay 2 Second delay( 2000 ); // Display RTC isDisplayRTC(); // Delay 2 Second delay( 2000 ); }
getDisplay.ino
/****** Don Luc Electronics © ****** Software Version Information Project #15: Environment – RTC – Mk26 DL2502Mk02p.ino DL2502Mk02 1 x Crowduino Uno - SD 1 x Crowtail - Base Shield 1 x Crowtail - RTC 2.0 1 x Crowtail - Temperature and Humidity Sensor 2.0 1 x Crowtail - Rotary Angle Sensor 2.0 1 x Crowtail - Moisture Sensor 2.0 1 x Crowtail - I2C LCD 1 x Crowtail - LED(Green) 1 x Crowtail - LED(Yellow) 1 x USB Battery Pack 1 x USB Mini-B Cable */ // Include the Library Code // EEPROM library to read and write EEPROM with unique ID for unit #include <EEPROM.h> // Wire #include <Wire.h> // Liquid Crystal #include "LiquidCrystal.h" // Temperature and Humidity Sensor #include "DHT.h" // RTC (Real-Time Clock) #include "RTClib.h" // RTC (Real-Time Clock) RTC_DS1307 RTC; String dateRTC = ""; String timeRTC = ""; // Temperature and Humidity Sensor #define DHTPIN 5 // DHT 11 #define DHTTYPE DHT11 DHT dht(DHTPIN, DHTTYPE); // Temperature and Humidity Sensor float h = 0; float t = 0; // Potentiometer int iPotentiometer = A1; // Change Your Threshold Here int Threshold = 0; int zz = 0; // Liquid Crystal // Connect via i2c LiquidCrystal lcd(0); // Crowtail Moisture Sensor int iSoilMoisture = A0; int iSoilMoistureVal = 0; // LED Yellow int iLEDYellow = 7; // LED Green int iLEDGreen = 6; // EEPROM Unique ID Information String uid = ""; // Software Version Information String sver = "15-26"; void loop() { // Crowtail Moisture Sensor isSoilMoisture(); // Temperature and Humidity Sensor isTH(); // RTC (Real-Time Clock) isRTC(); // Delay 2 Second delay( 2000 ); // Display Temperature and Humidity isDisplayTH(); // Delay 2 Second delay( 2000 ); // Display EEPROM isDisplayEEPROM(); // Delay 2 Second delay( 2000 ); // Display RTC isDisplayRTC(); // Delay 2 Second delay( 2000 ); }
getEEPROM.ino
// EEPROM // isUID EEPROM Unique ID void isUID() { // Is Unit ID uid = ""; for (int x = 0; x < 7; x++) { uid = uid + char(EEPROM.read(x)); } }
getRTC.ino
// RTC (Real-Time Clock) // Setup RTC void isSetupRTC(){ // RTC (Real-Time Clock) RTC.begin(); // RTC Running if (! RTC.isrunning()) { // following line sets the RTC to the date & time //this sketch was compiled RTC.adjust(DateTime(__DATE__, __TIME__)); // This line sets the RTC with an explicit date & time, for example to set // January 21, 2014 at 3am you would call: // RTC.adjust(DateTime(2014, 1, 21, 3, 0, 0)) } } // RTC (Real-Time Clock) void isRTC(){ // RTC (Real-Time Clock) DateTime now = RTC.now(); // Date dateRTC = now.year(), DEC; dateRTC = dateRTC + "/"; dateRTC = dateRTC + now.month(), DEC; dateRTC = dateRTC + "/"; dateRTC = dateRTC + now.day(), DEC; // Time timeRTC = now.hour(), DEC; timeRTC = timeRTC + ":"; timeRTC = timeRTC + now.minute(), DEC; timeRTC = timeRTC + ":"; timeRTC = timeRTC + now.second(), DEC; }
getSoilMoisture.ino
// Crowtail Moisture Sensor // Soil Moisture void isSoilMoisture(){ // Connect Soil Moisture Sensor to Analog 0 // iSoilMoistureVal => 0~700 Soil Moisture iSoilMoistureVal = analogRead( iSoilMoisture ); // Threshold => 200~500 zz = analogRead( iPotentiometer ); Threshold = map( zz, 0, 1024, 200, 500); // Threshold if (iSoilMoistureVal > Threshold) { // 300~700 - Humid Soil // LED Yellow digitalWrite(iLEDYellow, LOW); // Display Green isDisplayG(); // LED Green digitalWrite(iLEDGreen, HIGH); } else { // 0-300 Dry Soil // LED Green digitalWrite(iLEDGreen, LOW); // Display Yellow isDisplayY(); digitalWrite(iLEDYellow, HIGH); } }
getTH.ino
// Temperature and Humidity Sensor void isTH(){ // Temperature t = dht.readTemperature(); // Humidity h = dht.readHumidity(); }
setup.ino
// Setup void setup() { // Delay delay(100); // isUID EEPROM Unique ID isUID(); // Delay delay(100); // Initialize the LED iLED Yellow pinMode(iLEDYellow, OUTPUT); // Initialize the LED LED Green pinMode(iLEDGreen, OUTPUT); // Temperature and Humidity Sensor dht.begin(); // Delay delay(100); // Setup RTC isSetupRTC(); // Delay delay(100); // Display UID isDisplayUID(); // Delay 5 Second delay( 5000 ); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Electronics, IoT, Teacher, Instructor, R&D and Consulting
- Programming Language
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
- IoT
- Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
- Robotics
- Automation
- Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
- Unmanned Vehicles Terrestrial and Marine
- Machine Learning
- Artificial Intelligence (AI)
- RTOS
- Sensors, eHealth Sensors, Biosensor, and Biometric
- Research & Development (R & D)
- Consulting
Follow Us
Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/
Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Patreon: https://patreon.com/DonLucElectronics59
DFRobot: https://learn.dfrobot.com/user-10186.html
Hackster.io: https://www.hackster.io/neosteam-labs
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin8
Twitch: https://www.twitch.tv/lucpaquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/
Don Luc
Project #15: Environment – EEPROM – Mk25
——
#DonLucElectronics #DonLuc #Arduino #EEPROM #DHT11 #ASM #Display #Elecrow #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant
——
——
——
——
EEPROM
EEPROM (Electrically Erasable Programmable Read-only Memory) is a type of non-volatile memory. EEPROM is a type of non-volatile ROM that enables individual bytes of data to be erased and reprogrammed. That is why EEPROM chips are known as byte erasable chips. EEPROM is usually used to store small amounts of data in computing and other electronic devices. It is used in computers, usually integrated in microcontrollers such as smart cards and remote keyless systems, or as a separate chip device, to store relatively small amounts of data by allowing individual bytes to be erased and reprogrammed.
DL2501Mk08
1 x Crowduino Uno – SD
1 x Crowtail – Base Shield
1 x Crowtail – Temperature and Humidity Sensor 2.0
1 x Crowtail – Rotary Angle Sensor 2.0
1 x Crowtail – Moisture Sensor 2.0
1 x Crowtail – I2C LCD
1 x Crowtail – LED(Green)
1 x Crowtail – LED(Yellow)
1 x USB Battery Pack
1 x USB Mini-B Cable
Crowduino Uno – SD
SCL – A5
SDA – A4
POT – A1
ASM – A0
LEDY – 7
LEDG – 6
ITH – 5
VIN – +5V
GND – GND
DLE-EEPROM-UID-UnoMk001
DLE-EEPROM-UID-UnoMk001.ino
/* ***** Don Luc Electronics © ****** Software Version Information DLE-EEPROM-UID-UnoMk001 Arduino UNO 5V ver: UnoMk001 EEPROM with unique ID */ // Include Library Code // EEPROM library to read and write EEPROM with unique ID for unit #include <EEPROM.h> // Software Version Information String sver = "UnoMk001"; // Unit ID information String uid = "DLEU001"; // Read Unique ID // String ruid = ""; void loop() { // <== Write and Read EEPROM isEEPROMw(); }
getEEPROM.ino
// getEEPROM // Write and Read EEPROM with Unique ID for Unit void isEEPROMw() { // Write EEPROM with Unique ID for Unit int incb = 0; int v = 0; String emp = ""; String ruid = ""; // Set Unit ID // The message starts with uid then is followed by 7 characters // First clear a string buffer emp = ""; // Loop through the 7 ID characters and write their ASCII (byte) value to the EEPROM for (int y = 0; y < 7; y++) { // Get ASCII value of character v = int(uid.charAt(y)); // + 5)); // Add the actual character to the buffer emp = emp + uid.charAt(y + 5); // Write the value to the EEPROM EEPROM.write(y, v); } // Write EEPROM with Unique ID for Unit Serial.println( "Write ID Information"); // Read ID Information // Unit ID for (int y = 0; y < 7; y++) { ruid = ruid + char(EEPROM.read(y)); } // Read ID Information Serial.print( "Read ID Information: "); Serial.println( ruid ); Serial.println( "Ok!" ); ruid = ""; delay( 5000 ); }
setup.ino
// Setup void setup() { // Open the serial port at 9600 bps: Serial.begin(9600); // Serial Serial.print( "Software Version Information: "); Serial.println( sver ); Serial.print( "Unit ID Information: "); Serial.println( uid ); delay(5000); }
DL2501Mk08p
DL2501Mk08p.ino
/****** Don Luc Electronics © ****** Software Version Information Project #15: Environment – EEPROM – Mk25 DL2501Mk08p.ino DL2501Mk08 1 x Crowduino Uno - SD 1 x Crowtail - Base Shield 1 x Crowtail - Temperature and Humidity Sensor 2.0 1 x Crowtail - Rotary Angle Sensor 2.0 1 x Crowtail - Moisture Sensor 2.0 1 x Crowtail - I2C LCD 1 x Crowtail - LED(Green) 1 x Crowtail - LED(Yellow) 1 x USB Battery Pack 1 x USB Mini-B Cable */ // Include the Library Code // EEPROM library to read and write EEPROM with unique ID for unit #include <EEPROM.h> // Wire #include <Wire.h> // Liquid Crystal #include "LiquidCrystal.h" // Temperature and Humidity Sensor #include "DHT.h" // Temperature and Humidity Sensor #define DHTPIN 5 // DHT 11 #define DHTTYPE DHT11 DHT dht(DHTPIN, DHTTYPE); // Temperature and Humidity Sensor float h = 0; float t = 0; // Potentiometer int iPotentiometer = A1; // Change Your Threshold Here int Threshold = 0; int zz = 0; // Liquid Crystal // Connect via i2c LiquidCrystal lcd(0); // Crowtail Moisture Sensor int iSoilMoisture = A0; int iSoilMoistureVal = 0; // LED Yellow int iLEDYellow = 7; // LED Green int iLEDGreen = 6; // EEPROM Unique ID Information String uid = ""; // Software Version Information String sver = "15-25"; void loop() { // Crowtail Moisture Sensor isSoilMoisture(); // Temperature and Humidity Sensor isTH(); // Delay 2 Second delay( 2000 ); // Display Temperature and Humidity isDisplayTH(); // Delay 2 Second delay( 2000 ); // Display EEPROM isDisplayEEPROM(); // Delay 2 Second delay( 2000 ); }
getDisplay.ino
// getDisplay // Crowbits - OLED 128X64 UID void isDisplayUID(){ // Set up the LCD's number of rows and columns: lcd.begin(16, 2); // Print a message to the LCD. // Cursor lcd.setCursor(0, 0); lcd.print("Don Luc Electron"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD. lcd.print( sver ); } // isDisplay Green void isDisplayG(){ // Print a message to the LCD // Clear lcd.clear(); // Cursor lcd.setCursor(0, 0); lcd.print("Humid Soil"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD lcd.print( iSoilMoistureVal ); } // isDisplay Yellow void isDisplayY(){ // Print a message to the LCD // Clear lcd.clear(); // Cursor lcd.setCursor(0, 0); lcd.print("Dry Soil"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD lcd.print( iSoilMoistureVal ); } // Display Temperature and Humidity void isDisplayTH(){ // Clear lcd.clear(); // Set the cursor to column 0, line 0 lcd.setCursor(0, 0); lcd.print("H: "); lcd.print(h); lcd.print(" %"); // Set the cursor to column 0, line 1 lcd.setCursor(0, 1); lcd.print("T: "); lcd.print(t); lcd.print(" *C"); } // Display EEPROM void isDisplayEEPROM(){ // Clear lcd.clear(); // Set the cursor to column 0, line 0 lcd.setCursor(0, 0); lcd.print("EEPROM"); // Set the cursor to column 0, line 1 lcd.setCursor(0, 1); lcd.print( uid ); }
getEEPROM.ino
// EEPROM // isUID EEPROM Unique ID void isUID() { // Is Unit ID uid = ""; for (int x = 0; x < 7; x++) { uid = uid + char(EEPROM.read(x)); } }
getSoilMoisture.ino
// Crowtail Moisture Sensor // Soil Moisture void isSoilMoisture(){ // Connect Soil Moisture Sensor to Analog 0 // iSoilMoistureVal => 0~700 Soil Moisture iSoilMoistureVal = analogRead( iSoilMoisture ); // Threshold => 200~500 zz = analogRead( iPotentiometer ); Threshold = map( zz, 0, 1024, 200, 500); // Threshold if (iSoilMoistureVal > Threshold) { // 300~700 - Humid Soil // LED Yellow digitalWrite(iLEDYellow, LOW); // Display Green isDisplayG(); // LED Green digitalWrite(iLEDGreen, HIGH); } else { // 0-300 Dry Soil // LED Green digitalWrite(iLEDGreen, LOW); // Display Yellow isDisplayY(); digitalWrite(iLEDYellow, HIGH); } }
getTH.ino
// Temperature and Humidity Sensor void isTH(){ // Temperature t = dht.readTemperature(); // Humidity h = dht.readHumidity(); }
setup.ino
// Setup void setup() { // Delay delay(100); // isUID EEPROM Unique ID isUID(); // Delay delay(100); // Initialize the LED iLED Yellow pinMode(iLEDYellow, OUTPUT); // Initialize the LED LED Green pinMode(iLEDGreen, OUTPUT); // Temperature and Humidity Sensor dht.begin(); // Display UID isDisplayUID(); // Delay 5 Second delay( 5000 ); }
——
Electronics, IoT, Teacher, Instructor, R&D and Consulting
- Programming Language
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
- IoT
- Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
- Robotics
- Automation
- Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
- Unmanned Vehicles Terrestrial and Marine
- Machine Learning
- Artificial Intelligence (AI)
- RTOS
- Sensors, eHealth Sensors, Biosensor, and Biometric
- Research & Development (R & D)
- Consulting
Follow Us
Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/
Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Patreon: https://patreon.com/DonLucElectronics59
DFRobot: https://learn.dfrobot.com/user-10186.html
Hackster.io: https://www.hackster.io/neosteam-labs
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin8
Twitch: https://www.twitch.tv/lucpaquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/
Don Luc
Project #15: Environment – DHT11 – Mk24
——
#DonLucElectronics #DonLuc #Arduino #DHT11 #ASM #Display #Elecrow #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant
——
——
——
——
Crowtail – Temperature and Humidity Sensor 2.0
This module can help you detect the temperature and humidity of the environment of your house. The module contains a DHT11 Temperature and Humidity sensor that is a complex sensor with a calibrated digital signal out. It uses digital module acquisition technology and the temperature & humidity sensor technology. The sensor consists of a resistance-type moisture element and an NTC temperature measuring element. Because of the single-wire serial interface, it is easy to use the module.
- -Work Voltage: 3.3 Volt ~ 5 Volt
- -Measuring Range: Humidity: 20% – 90% RH
- -Measuring Range: Temperature: 0 ~ 50 °C
- -Signal Collecting Period: 2S
- -Accuracy: Humidity: ±5% RH
- -Accuracy: Temperature: ±2°C
DL2501Mk06
1 x Crowduino Uno – SD
1 x Crowtail – Base Shield
1 x Crowtail – Temperature and Humidity Sensor 2.0
1 x Crowtail – Rotary Angle Sensor 2.0
1 x Crowtail – Moisture Sensor 2.0
1 x Crowtail – I2C LCD
1 x Crowtail – LED(Green)
1 x Crowtail – LED(Yellow)
1 x USB Battery Pack
1 x USB Mini-B Cable
Crowduino Uno – SD
SCL – A5
SDA – A4
POT – A1
ASM – A0
LEDY – 7
LEDG – 6
ITH – 5
VIN – +5V
GND – GND
DL2501Mk06p
DL2501Mk06p.ino
/****** Don Luc Electronics © ****** Software Version Information Project #15: Environment – DHT11 – Mk24 DL2501Mk06p.ino DL2501Mk06 1 x Crowduino Uno - SD 1 x Crowtail - Base Shield 1 x Crowtail - Temperature and Humidity Sensor 2.0 1 x Crowtail - Rotary Angle Sensor 2.0 1 x Crowtail - Moisture Sensor 2.0 1 x Crowtail - I2C LCD 1 x Crowtail - LED(Green) 1 x Crowtail - LED(Yellow) 1 x USB Battery Pack 1 x USB Mini-B Cable */ // Include the Library Code // Wire #include <Wire.h> // Liquid Crystal #include "LiquidCrystal.h" // Temperature and Humidity Sensor #include "DHT.h" // Temperature and Humidity Sensor #define DHTPIN 5 // DHT 11 #define DHTTYPE DHT11 DHT dht(DHTPIN, DHTTYPE); // Temperature and Humidity Sensor float h = 0; float t = 0; // Potentiometer int iPotentiometer = A1; // Change Your Threshold Here int Threshold = 0; int zz = 0; // Liquid Crystal // Connect via i2c LiquidCrystal lcd(0); // Crowtail Moisture Sensor int iSoilMoisture = A0; int iSoilMoistureVal = 0; // LED Yellow int iLEDYellow = 7; // LED Green int iLEDGreen = 6; // Software Version Information String sver = "15-24"; void loop() { // Crowtail Moisture Sensor isSoilMoisture(); // Temperature and Humidity Sensor isTH(); // Delay 2 Second delay( 2000 ); // Display Temperature and Humidity isDisplayTH(); // Delay 2 Second delay( 2000 ); }
getDisplay.ino
// getDisplay // Crowbits - OLED 128X64 UID void isDisplayUID(){ // Set up the LCD's number of rows and columns: lcd.begin(16, 2); // Print a message to the LCD. // Cursor lcd.setCursor(0, 0); lcd.print("Don Luc Electron"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD. lcd.print( sver ); } // isDisplay Green void isDisplayG(){ // Print a message to the LCD // Clear lcd.clear(); // Cursor lcd.setCursor(0, 0); lcd.print("Humid Soil"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD lcd.print( iSoilMoistureVal ); } // isDisplay Yellow void isDisplayY(){ // Print a message to the LCD // Clear lcd.clear(); // Cursor lcd.setCursor(0, 0); lcd.print("Dry Soil"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD lcd.print( iSoilMoistureVal ); } // Display Temperature and Humidity void isDisplayTH(){ // Set the cursor to column 0, line 0 lcd.setCursor(0, 0); lcd.print("H: "); lcd.print(h); lcd.print(" %"); // Set the cursor to column 0, line 1 lcd.setCursor(0, 1); lcd.print("T: "); lcd.print(t); lcd.print(" *C"); }
getSoilMoisture.ino
// Crowtail Moisture Sensor // Soil Moisture void isSoilMoisture(){ // Connect Soil Moisture Sensor to Analog 0 // iSoilMoistureVal => 0~700 Soil Moisture iSoilMoistureVal = analogRead( iSoilMoisture ); // Threshold => 200~500 zz = analogRead( iPotentiometer ); Threshold = map( zz, 0, 1024, 200, 500); // Threshold if (iSoilMoistureVal > Threshold) { // 300~700 - Humid Soil // LED Yellow digitalWrite(iLEDYellow, LOW); // Display Green isDisplayG(); // LED Green digitalWrite(iLEDGreen, HIGH); } else { // 0-300 Dry Soil // LED Green digitalWrite(iLEDGreen, LOW); // Display Yellow isDisplayY(); digitalWrite(iLEDYellow, HIGH); } }
getTH.ino
// Temperature and Humidity Sensor void isTH(){ // Temperature t = dht.readTemperature(); // Humidity h = dht.readHumidity(); }
setup.ino
// Setup void setup() { // Delay delay(100); // Initialize the LED iLED Yellow pinMode(iLEDYellow, OUTPUT); // Initialize the LED LED Green pinMode(iLEDGreen, OUTPUT); // Temperature and Humidity Sensor dht.begin(); // Display UID isDisplayUID(); // Delay 5 Second delay( 5000 ); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Electronics, IoT, Teacher, Instructor, R&D and Consulting
- Programming Language
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
- IoT
- Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
- Robotics
- Automation
- Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
- Unmanned Vehicles Terrestrial and Marine
- Machine Learning
- Artificial Intelligence (AI)
- RTOS
- Sensors, eHealth Sensors, Biosensor, and Biometric
- Research & Development (R & D)
- Consulting
Follow Us
Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/
Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Patreon: https://patreon.com/DonLucElectronics59
DFRobot: https://learn.dfrobot.com/user-10186.html
Hackster.io: https://www.hackster.io/neosteam-labs
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin8
Twitch: https://www.twitch.tv/lucpaquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/
Don Luc
Project #15: Environment – Crowtail Rotary Angle Sensor – Mk23
——
#DonLucElectronics #DonLuc #Arduino #ASM #Display #Elecrow #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant
——
——
——
——
Crowtail – Rotary Angle Sensor 2.0
This rotary angle sensor may also be known as potentiometer that produces analog output between 0 and 3.3-5 Volt. The angular range is 300 degrees with a linear change in value. The resistance value is 10k ohms, perfect for Arduino use. Some applications like smart light control, volume control, only you can not think of things, no impossible things.
DL2501Mk04
1 x Crowduino Uno – SD
1 x Crowtail – Base Shield
1 x Crowtail – Rotary Angle Sensor 2.0
1 x Crowtail – Moisture Sensor 2.0
1 x Crowtail – I2C LCD
1 x Crowtail – LED(Green)
1 x Crowtail – LED(Yellow)
1 x USB Battery Pack
1 x USB Mini-B Cable
Crowduino Uno – SD
SCL – A5
SDA – A4
POT – A1
ASM – A0
LEDY – 7
LEDG – 6
VIN – +5V
GND – GND
DL2501Mk04p
DL2501Mk04p.ino
/****** Don Luc Electronics © ****** Software Version Information Project #15: Environment – Crowtail Rotary Angle Sensor – Mk23 DL2501Mk04p.ino DL2501Mk04 1 x Crowduino Uno - SD 1 x Crowtail - Base Shield 1 x Crowtail - Rotary Angle Sensor 2.0 1 x Crowtail - Moisture Sensor 2.0 1 x Crowtail - I2C LCD 1 x Crowtail - LED(Green) 1 x Crowtail - LED(Yellow) 1 x USB Battery Pack 1 x USB Mini-B Cable */ // Include the Library Code // Wire #include <Wire.h> // Liquid Crystal #include "LiquidCrystal.h" // Potentiometer int iPotentiometer = A1; // Change Your Threshold Here int Threshold = 0; int zz = 0; // Liquid Crystal // Connect via i2c LiquidCrystal lcd(0); // Crowtail Moisture Sensor int iSoilMoisture = A0; int iSoilMoistureVal = 0; // LED Yellow int iLEDYellow = 7; // LED Green int iLEDGreen = 6; // Software Version Information String sver = "15-23"; void loop() { // Crowtail Moisture Sensor isSoilMoisture(); // Delay 1 Second delay( 1000 ); }
getDisplay.ino
// getDisplay // Crowbits - OLED 128X64 UID void isDisplayUID(){ // Set up the LCD's number of rows and columns: lcd.begin(16, 2); // Print a message to the LCD. // Cursor lcd.setCursor(0, 0); lcd.print("Don Luc Electron"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD. lcd.print( sver ); } // isDisplay Green void isDisplayG(){ // Print a message to the LCD // Clear lcd.clear(); // Cursor lcd.setCursor(0, 0); lcd.print("Humid Soil"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD lcd.print( iSoilMoistureVal ); } // isDisplay Yellow void isDisplayY(){ // Print a message to the LCD // Clear lcd.clear(); // Cursor lcd.setCursor(0, 0); lcd.print("Dry Soil"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD lcd.print( iSoilMoistureVal ); }
getSoilMoisture.ino
// Crowtail Moisture Sensor // Soil Moisture void isSoilMoisture(){ // Connect Soil Moisture Sensor to Analog 0 // iSoilMoistureVal => 0~700 Soil Moisture iSoilMoistureVal = analogRead( iSoilMoisture ); // Threshold => 200~500 zz = analogRead( iPotentiometer ); Threshold = map( zz, 0, 1024, 200, 500); // Threshold if (iSoilMoistureVal > Threshold) { // 300~700 - Humid Soil // LED Yellow digitalWrite(iLEDYellow, LOW); // Display Green isDisplayG(); // LED Green digitalWrite(iLEDGreen, HIGH); } else { // 0-300 Dry Soil // LED Green digitalWrite(iLEDGreen, LOW); // Display Yellow isDisplayY(); digitalWrite(iLEDYellow, HIGH); } }
setup.ino
// Setup void setup() { // Delay delay(100); // Initialize the LED iLED Yellow pinMode(iLEDYellow, OUTPUT); // Initialize the LED LED Green pinMode(iLEDGreen, OUTPUT); // Display UID isDisplayUID(); // Delay 5 Second delay( 5000 ); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Electronics, IoT, Teacher, Instructor, R&D and Consulting
- Programming Language
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
- IoT
- Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
- Robotics
- Automation
- Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
- Unmanned Vehicles Terrestrial and Marine
- Machine Learning
- Artificial Intelligence (AI)
- RTOS
- Sensors, eHealth Sensors, Biosensor, and Biometric
- Research & Development (R & D)
- Consulting
Follow Us
Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/
Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Patreon: https://patreon.com/DonLucElectronics59
DFRobot: https://learn.dfrobot.com/user-10186.html
Hackster.io: https://www.hackster.io/neosteam-labs
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin8
Twitch: https://www.twitch.tv/lucpaquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/
Project #15: Environment – Crowtail Moisture Sensor – Mk22
——
#DonLucElectronics #DonLuc #Arduino #ASM #Display #Elecrow #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant
——
——
——
——
Crowtail Moisture Sensor 2.0
This Moisture Sensor can be used to detect the moisture of soil and thus to monitor if the plants in your garden need some water. This sensor uses the two probes to pass current through the soil, and then it reads then resistance to get the moisture level. More water makes the soil conduct electricity more easily (less resistance), while dry soil conducts electricity poorly (more resistance). Compares to the other moistures sensor using the same moisture test method, this module has super long legs, making it suitable for actual applications. This Moisture Sensor can be used to detect the moisture of soil or your pet plant’s water level, let the plants in your garden reach out for human help.
Crowtail – I2C LCD
A new crowtail for LCD1602, it contains LCD1602 and MCP23008 module. Unique interface for crowtail. Provide convenience to work with a LCD.
DL2501Mk02
1 x Crowduino Uno – SD
1 x Crowtail – Base Shield
1 x Crowtail – Moisture Sensor 2.0
1 x Crowtail – I2C LCD
1 x Crowtail – LED(Green)
1 x Crowtail – LED(Yellow)
1 x USB Battery Pack
1 x USB Mini-B Cable
Crowduino Uno – SD
SCL – A5
SDA – A4
ASM – A0
LEDY – 7
LEDG – 6
VIN – +5V
GND – GND
DL2501Mk02p
DL2501Mk02p.ino
/****** Don Luc Electronics © ****** Software Version Information Project #15: Environment – Crowtail Moisture Sensor – Mk22 15-22 DL2501Mk02p.ino DL2501Mk02 1 x Crowduino Uno - SD 1 x Crowtail - Base Shield 1 x Crowtail - Moisture Sensor 2.0 1 x Crowtail - I2C LCD 1 x Crowtail - LED(Green) 1 x Crowtail - LED(Yellow) 1 x USB Battery Pack 1 x USB Mini-B Cable */ // Include the Library Code // Wire #include <Wire.h> // Liquid Crystal #include "LiquidCrystal.h" // Liquid Crystal // Connect via i2c LiquidCrystal lcd(0); // Crowtail Moisture Sensor int iSoilMoisture = A0; int iSoilMoistureVal = 0; // Change Your Threshold Here int Threshold = 300; // LED Yellow int iLEDYellow = 7; // LED Green int iLEDGreen = 6; // Software Version Information String sver = "15-22"; void loop() { // Crowtail Moisture Sensor isSoilMoisture(); // Delay 1 Second delay( 1000 ); }
getDisplay.ino
// getDisplay // Crowbits - OLED 128X64 UID void isDisplayUID(){ // Set up the LCD's number of rows and columns: lcd.begin(16, 2); // Print a message to the LCD. // Cursor lcd.setCursor(0, 0); lcd.print("Don Luc Electron"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD. lcd.print( sver ); } // isDisplay Green void isDisplayG(){ // Print a message to the LCD // Clear lcd.clear(); // Cursor lcd.setCursor(0, 0); lcd.print("Humid Soil"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD lcd.print( iSoilMoistureVal ); } // isDisplay Yellow void isDisplayY(){ // Print a message to the LCD // Clear lcd.clear(); // Cursor lcd.setCursor(0, 0); lcd.print("Dry Soil"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD lcd.print( iSoilMoistureVal ); }
getSoilMoisture.ino
// Crowtail Moisture Sensor // Soil Moisture void isSoilMoisture(){ // Connect Soil Moisture Sensor to Analog 0 // iSoilMoistureVal => 0~700 Soil Moisture iSoilMoistureVal = analogRead( iSoilMoisture ); // Threshold if (iSoilMoistureVal > Threshold) { // 300~700 - Humid Soil // LED Yellow digitalWrite(iLEDYellow, LOW); // Display Green isDisplayG(); // LED Green digitalWrite(iLEDGreen, HIGH); } else { // 0-300 Dry Soil // LED Green digitalWrite(iLEDGreen, LOW); // Display Yellow isDisplayY(); digitalWrite(iLEDYellow, HIGH); } }
setup.ino
void setup() { // Delay delay(100); // Initialize the LED iLED Yellow pinMode(iLEDYellow, OUTPUT); // Initialize the LED LED Green pinMode(iLEDGreen, OUTPUT); // Display UID isDisplayUID(); // Delay 5 Second delay( 5000 ); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Electronics, IoT, Teacher, Instructor, R&D and Consulting
- Programming Language
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
- IoT
- Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
- Robotics
- Automation
- Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
- Unmanned Vehicles Terrestrial and Marine
- Machine Learning
- Artificial Intelligence (AI)
- RTOS
- Sensors, eHealth Sensors, Biosensor, and Biometric
- Research & Development (R & D)
- Consulting
Follow Us
Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/
Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Patreon: https://patreon.com/DonLucElectronics59
DFRobot: https://learn.dfrobot.com/user-10186.html
Hackster.io: https://www.hackster.io/neosteam-labs
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin8
Twitch: https://www.twitch.tv/lucpaquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/
Don Luc
Project #15: Environment – Soil Moisture Sensor – Mk20
——
#DonLucElectronics #DonLuc #Arduino #ASM #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant
——
——
——
——
Soil Moisture Sensor
Soil moisture is the critical parameter in agriculture. If there is a shortage or overabundance of water, plants may die. At the same time, this data depends on many external factors, primarily weather conditions and climate changes. That is why it is so vital to understand the most effective methods for analyzing soil moisture content.
This term refers to the entire quantity of water in the ground’s pores or on its surface. The moisture content of soil depends on such factors as weather, type of land, and plants. The parameter is vital in monitoring soil moisture activities, predicting natural disasters, managing water supply, etc. This data may signal a future flood or water deficit ahead of other indicators.
DL2411Mk03
1 x SparkFun RedBoard Qwiic
1 x Gravity: Analog Soil Moisture Sensor
2 x LED
1 x ProtoScrewShield
1 x USB Battery Pack
1 x USB Micro-B Cable
SparkFun RedBoard Qwiic
ASM – A0
LEDP- 13
LEDG- 12
VIN – +5V
GND – GND
DL2411Mk03p
DL2411Mk03p.ino
/****** Don Luc Electronics © ****** Software Version Information Project #15: Environment – Soil Moisture Sensor – Mk20 15-20 DL2411Mk03p.ino DL2411Mk03 1 x SparkFun RedBoard Qwiic 1 x Gravity: Analog Soil Moisture Sensor 2 x LED 1 x ProtoScrewShield 1 x USB Battery Pack 1 x USB Micro-B Cable */ // Include the Library Code // Gravity: Analog Soil Moisture Sensor int iSoilMoisture = A0; int iSoilMoistureVal = 0; int zz = 0; // Change Your Threshold Here int Threshold = 300; // LED ProtoScrewShield Yellow int iLEDProto = 13; // LED Green int iLEDGreen = 12; // Software Version Information String sver = "15-20"; void loop() { // Gravity: Analog Soil Moisture Sensor isSoilMoisture(); // Delay 1 Second delay( 1000 ); }
getSoilMoisture.ino
// Gravity: Analog Soil Moisture Sensor // Soil Moisture void isSoilMoisture(){ // Connect Soil Moisture Sensor to Analog 0 zz = analogRead( iSoilMoisture ); // iSoilMoistureVal => 0~900 Soil Moisture iSoilMoistureVal = map( zz, 0, 715, 0, 900); // Serial Serial.print("Moisture Sensor Value: "); // Threshold if (iSoilMoistureVal > Threshold) { // 300~900 - Humid Soil // LEDProto digitalWrite(iLEDProto, LOW); // Serial Serial.print( "Humid Soil " ); Serial.println( iSoilMoistureVal ); // LEDGreen digitalWrite(iLEDGreen, HIGH); } else { // 0-300 Dry Soil // LEDGreen digitalWrite(iLEDGreen, LOW); // Serial Serial.print( "Dry Soil " ); Serial.println( iSoilMoistureVal ); // LEDProto digitalWrite(iLEDProto, HIGH); } }
setup.ino
// Setup void setup() { // Delay delay(100); // Serial Serial.begin(57600); // Initialize the LED iLEDProto pinMode(iLEDProto, OUTPUT); // Initialize the LED iLEDGreen pinMode(iLEDGreen, OUTPUT); // Delay 1 Second delay( 1000 ); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Electronics, IoT, Teacher, Instructor, R&D and Consulting
- Programming Language
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
- IoT
- Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
- Robotics
- Automation
- Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
- Unmanned Vehicles Terrestrial and Marine
- Machine Learning
- Artificial Intelligence (AI)
- RTOS
- Sensors, eHealth Sensors, Biosensor, and Biometric
- Research & Development (R & D)
- Consulting
Follow Us
Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/
Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Patreon: https://patreon.com/DonLucElectronics59
DFRobot: https://learn.dfrobot.com/user-10186.html
Hackster.io: https://www.hackster.io/neosteam-labs
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin8
Twitch: https://www.twitch.tv/lucpaquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/
Don Luc
Project #29 – DFRobot – SHTC3 – Mk30
——
#DonLucElectronics #DonLuc #DFRobot #ASM #SHTC3 #FireBeetle2ESP32C6 #Display #EEPROM #ESP32 #IoT #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant
——
——
——
——
Fermion: SHTC3 Temperature and Humidity Sensor
The SHTC3 digital humidity sensor from Sensirion builds on the success of the proven SHTC1 sensor and offers consistent high accuracy within the measuring range. The sensor covers a humidity measurement range of 0 to 100% RH and a temperature detection range of -40 Celsius to 125 Celsius with a typical accuracy of ±2% RH and ±0.2 Celsius. The board supply voltage of 3.3 Volt to 5 Volt and a current consumption below 0.15mA in low power mode make the SHTC3 perfectly suitable for mobile or wireless battery-driven applications.
DL2409Mk06
1 x FireBeetle 2 ESP32-C6
1 x Fermion: SHTC3 Temperature & Humidity Sensor
1 x Fermion: 2.0″ 320×240 IPS TFT LCD
1 x GDL Line 10 CM
1 x Gravity: Analog Soil Moisture Sensor
1 x 3 AAA Battery Holder with On/Off Switch and 2-Pin JST
3 x AAA Battery
1 x SparkFun Solderable Breadboard – Large
1 x USB 3.1 Cable A to C
FireBeetle 2 ESP32-C6
SCL – 20
SDA – 19
ASM – A1
LED – 15
DC – D2
CS – D6
RST – D3
VIN – +3.3V
GND – GND
DL2409Mk06p
DL2409Mk06p.ino
/****** Don Luc Electronics © ****** Software Version Information Project #29 - DFRobot - SHTC3 - Mk30 29-30 DL2409Mk06p.ino DL2409Mk06 1 x FireBeetle 2 ESP32-C6 1 x Fermion: SHTC3 Temperature & Humidity Sensor 1 x Fermion: 2.0" 320x240 IPS TFT LCD 1 x GDL Line 10 CM 1 x Gravity: Analog Soil Moisture Sensor 1 x 3 AAA Battery Holder with On/Off Switch and 2-Pin JST 3 x AAA Battery 1 x SparkFun Solderable Breadboard - Large 1 x USB 3.1 Cable A to C */ // Include the Library Code // EEPROM Library to Read and Write EEPROM // with Unique ID for Unit #include "EEPROM.h" // Arduino #include <Arduino.h> // Wire #include <Wire.h> // DFRobot Display GDL API #include <DFRobot_GDL.h> // Fermion: SHTC3 Temperature & Humidity Sensor #include"DFRobot_SHTC3.h" // Fermion: SHTC3 Temperature & Humidity Sensor DFRobot_SHTC3 SHTC3; uint32_t id = 0; float temperature; float humidity; // Defined ESP32 #define TFT_DC D2 #define TFT_CS D6 #define TFT_RST D3 /*dc=*/ /*cs=*/ /*rst=*/ // DFRobot Display 240x320 DFRobot_ST7789_240x320_HW_SPI screen(TFT_DC, TFT_CS, TFT_RST); // Gravity: Analog Soil Moisture Sensor int iSoilMoisture = A1; int iSoilMoistureVal = 0; int zz = 0; // Change Your Threshold Here int Threshold = 300; String SM = ""; // LED Green int iLEDGreen = 15; // EEPROM Unique ID Information #define EEPROM_SIZE 64 String uid = ""; // Software Version Information String sver = "29-30"; void loop() { // SHTC3 Temperature and Humidity Sensor isSHTC3(); // Gravity: Analog Soil Moisture Sensor isSoilMoisture(); // DFRobot Display 240x320 - ASM - Temperature and Humidity isDisplayTH(); // Delay 5 Second delay( 5000 ); }
getDisplay.ino
// DFRobot Display 240x320 // DFRobot Display 240x320 - UID void isDisplayUID() { // DFRobot Display 240x320 // Text Display // Text Wrap screen.setTextWrap(false); // Rotation screen.setRotation(3); // Fill Screen => black screen.fillScreen(0x0000); // Text Color => white screen.setTextColor(0xffff); // Font => Free Mono 9pt screen.setFont(&FreeMono9pt7b); // TextSize => 1.5 screen.setTextSize(1.5); // DFRobot Display screen.setCursor(0, 30); screen.println("DFRobot Display"); // Don Luc Electronics screen.setCursor(0, 60); screen.println("Don Luc Electronics"); // Version screen.setCursor(0, 90); screen.println("Version"); screen.setCursor(0, 120); screen.println( sver ); // EEPROM screen.setCursor(0, 150); screen.println("EEPROM"); screen.setCursor(0, 180); screen.println( uid ); } // DFRobot Display 240x320 - ASM - Temperature and Humidity void isDisplayTH() { // DFRobot Display 240x320 // Text Display // Text Wrap screen.setTextWrap(false); // Rotation screen.setRotation(3); // Fill Screen => black screen.fillScreen(0x0000); // Text Color => white screen.setTextColor(0xffff); // Font => Free Mono 9pt screen.setFont(&FreeMono9pt7b); // TextSize => 1.5 screen.setTextSize(1.5); // Soil Moisture Sensor screen.setCursor(0, 30); screen.println("Soil Moisture Sensor"); // Gravity: Analog Soil Moisture Sensor screen.setCursor(0, 60); screen.println( "ASM: " ); screen.setCursor(60, 60); screen.println( iSoilMoistureVal ); screen.setCursor(0, 90); screen.println( SM ); // SHTC3 Temperature screen.setCursor(0, 120); screen.println( "Tem: " ); screen.setCursor(60, 120); screen.println( temperature ); screen.setCursor(120, 120); screen.println( "C" ); // SHTC3 Humidity screen.setCursor(0, 150); screen.println( "Hum: " ); screen.setCursor(60, 150); screen.println( humidity ); screen.setCursor(120, 150); screen.println( "%RH" ); }
getEEPROM.ino
// EEPROM // isUID EEPROM Unique ID void isUID() { // Is Unit ID uid = ""; for (int x = 0; x < 7; x++) { uid = uid + char(EEPROM.read(x)); } }
getSHTC3.ino
// SHTC3 Temperature and Humidity Sensor // SHTC3 void isSHTC3(){ // SHTC3 Temperature and Humidity Sensor /** * Mode For configuring sensor working mode * SHTC3: PRECISION_HIGH_CLKSTRETCH_ON Clock Stretching Enabled * PRECISION_HIGH_CLKSTRETCH_OFF Clock Stretching Disabled * PRECISION_LOW_CLKSTRETCH_ON Clock Stretching Enabled & Low Power * PRECISION_LOW_CLKSTRETCH_OFF Clock Stretching Disabled & Low Power */ temperature = SHTC3.getTemperature(PRECISION_HIGH_CLKSTRETCH_ON); /** * Mode For configuring sensor working mode * SHTC3 * PRECISION_HIGH_CLKSTRETCH_ON Clock Stretching Enabled * PRECISION_HIGH_CLKSTRETCH_OFF Clock Stretching Disabled * PRECISION_LOW_CLKSTRETCH_ON Clock Stretching Enabled & Low Power * PRECISION_LOW_CLKSTRETCH_OFF Clock Stretching Disabled & Low Power */ humidity = SHTC3.getHumidity(PRECISION_HIGH_CLKSTRETCH_OFF); }
getSoilMoisture.ino
// Gravity: Analog Soil Moisture Sensor // Soil Moisture void isSoilMoisture(){ // Connect Soil Moisture Sensor to Analog 0 zz = analogRead( iSoilMoisture ); // iSoilMoistureVal => 0~900 Soil Moisture iSoilMoistureVal = map( zz, 0, 4095, 0, 900); // Threshold if (iSoilMoistureVal > Threshold) // 300~950 - Humid Soil SM = "Humid Soil"; else { // 0-300 Dry Soil SM = "Dry Soil"; } }
setup.ino
// Setup void setup() { // Give display time to power on delay(100); // EEPROM Size EEPROM.begin(EEPROM_SIZE); // EEPROM Unique ID isUID(); // Delay delay( 100 ); // Wire Wire.begin(); // Delay delay( 100 ); // DFRobot Display 240x320 screen.begin(); // Delay delay(100); // Fermion: SHTC3 Temperature & Humidity Sensor SHTC3.begin(); /*SHTC3 is set to sleep mode by default. Please wake it up before use. Use SHTC3.sleep() to let SHTC3 enter sleep mode; SHTC3 stops working in sleep mode*/ SHTC3.wakeup(); // Delay delay(100); // Initialize the LED Green pinMode(iLEDGreen, OUTPUT); // iLEDGreen HIGH digitalWrite(iLEDGreen, HIGH ); // DFRobot Display 240x320 - UID // Don Luc Electronics // Version // EEPROM isDisplayUID(); // Delay 5 Second delay( 5000 ); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Electronics, IoT, Teacher, Instructor, R&D and Consulting
- Programming Language
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
- IoT
- Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
- Robotics
- Automation
- Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
- Unmanned Vehicles Terrestrial and Marine
- Machine Learning
- Artificial Intelligence (AI)
- RTOS
- Sensors, eHealth Sensors, Biosensor, and Biometric
- Research & Development (R & D)
- Consulting
Follow Us
Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/
Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
DFRobot Luc.Paquin: https://edu.dfrobot.com/dashboard/makelogs
Hackster.io: https://www.hackster.io/neosteam-labs
ELECROW: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: www.tiktok.com/@luc.paquin8
LinkedIn: https://www.linkedin.com/in/jlucpaquin/
Don Luc