Project #15: Environment – GNSS GPS – Mk34

——

#DonLucElectronics #DonLuc #GNSS #IoT #Project #DFRobot #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

GNSS GPS

——

GNSS GPS

——

GNSS GPS

——

Gravity: GNSS GPS BeiDou Receiver Module

GNSS stands for Global Navigation Satellite System. The main GNSS systems include GPS, GLONASS, QZSS, and BeiDou. These satellite systems transmit signals to the earth, allowing the receiver to determine its own position by calculating the propagation time of the signals and the position of the receiving satellite, thus achieving functions such as positioning and navigation.

This GNSS BeiDou positioning module supports multi-satellite system joint positioning and provides high-precision, high-speed, and stable data such as longitude, latitude, time, and altitude. It is suitable for various outdoor positioning scenarios, such as vehicle positioning, item tracking, weather stations, and outdoor positioning.

This GNSS receiver module uses the GNSS positioning system and support satellite systems such as BeiDou, GPS, GLONASS, QZSS, etc. Compared with traditional single GPS positioning, joint positioning using multiple systems increases the number of visible and usable satellites, which improves positioning accuracy and speed. It can also achieve stable high-precision positioning even in complex environments, providing more accurate positioning data.

DL2510Mk01

1 x FireBeetle 2 ESP32-P4 AI
1 x IO Expansion Board
1 x Adafruit SHARP Memory Display Breakout – 1.3″ 168×144 Monochrome
1 x Gravity: GNSS GPS BeiDou Receiver Module
1 x USB Battery Pack
1 x USB 3.1 Cable A to C

DL2510Mk01p

DL2510Mk01p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #15: Environment - GNSS GPS - Mk34
15-34
DL2509Mk01p.ino
DL2509Mk01
1 x FireBeetle 2 ESP32-P4 AI
1 x IO Expansion Board
1 x Adafruit SHARP Memory Display Breakout - 1.3" 168x144 Monochrome
1 x Gravity: GNSS GPS BeiDou Receiver Module
1 x USB Battery Pack
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"
// SHARP Memory Display
#include <Adafruit_SharpMem.h>
#include <Adafruit_GFX.h>
// GNSS
#include "DFRobot_GNSS.h"

// Use I2C for communication, but use the serial port for communication if the line of codes were masked 
#define I2C_COMMUNICATION 

// ESP32 user hardware uart
DFRobot_GNSS_I2C gnss(&Wire ,GNSS_DEVICE_ADDR);
String sDate = "";
String sUTC = "";
String sLat = "";
String sLon = "";


// SHARP Memory Display
// any pins can be used
#define SHARP_SCK  30
#define SHARP_MOSI 29
#define SHARP_SS   28
// Set the size of the display here, e.g. 144x168!
Adafruit_SharpMem display(SHARP_SCK, SHARP_MOSI, SHARP_SS, 144, 168);
// The currently-available SHARP Memory Display (144x168 pixels)
// requires > 4K of microcontroller RAM; it WILL NOT WORK on Arduino Uno
// or other <4K "classic" devices!  The original display (96x96 pixels)
// does work there, but is no longer produced.
#define BLACK 0
#define WHITE 1

// EEPROM Unique ID Information
#define EEPROM_SIZE 64
String uid = "";

// Software Version Information
String sver = "15-34";

void loop() {


  // isGNSS
  isGNSS();

  // isGNSS Display
  isDisplayGNSS();

  // Delay 1 Second
  delay( 1000 );

}

getDisplay.ino

// SHARP Memory Display
// SHARP Memory Display - UID
void isDisplayUID(){

  // text display
  display.clearDisplay();
  display.setRotation(4);
  display.setTextSize(2);
  display.setTextColor(BLACK);
  display.setCursor(0,0);
  // Don Luc
  display.println( "Don Luc" );
  // EEPROM
  display.setCursor(0,25);
  display.println( "EEPROM" );
  display.setCursor(0,55);
  display.println( uid );
  // Version
  display.setCursor(0,85);
  display.println( "Version" );
  display.setCursor(0,115);
  display.println( sver );
  display.refresh();
  delay( 100 );

}
// isGNSS Display
void isDisplayGNSS(){

  // text display Date and Time
  display.clearDisplay();
  display.setRotation(4);
  display.setTextSize(2);
  display.setTextColor(BLACK);
  display.setCursor(0,0);
  display.print( "Lan: " );
  display.println( sLat );
  display.setCursor(0,25);
  display.print( "Lon: " );
  display.println( sLon );
  display.setCursor(0,55);
  display.println( "UTC" );
  display.setCursor(0,85);
  display.println( sDate );
  display.setCursor(0,115);
  display.println( sUTC );
  display.refresh();
  delay( 100 );
  
}

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));
  }

}

getGNSS.ino

// GNSS
// isSetupGNSS
void isSetupGNSS(){

  // GNSS
  //while(!gnss.begin()){
    //Serial.println("NO Deivces !");
   // delay(1000);
  //}

  gnss.begin();
  
  // GNSS
  gnss.enablePower();      

/** Set the galaxy to be used
 *   eGPS              USE gps
 *   eBeiDou           USE beidou
 *   eGPS_BeiDou       USE gps + beidou
 *   eGLONASS          USE glonass
 *   eGPS_GLONASS      USE gps + glonass
 *   eBeiDou_GLONASS   USE beidou +glonass
 *   eGPS_BeiDou_GLONASS USE gps + beidou + glonass
 */
  gnss.setGnss(eGPS_BeiDou_GLONASS);

  // GNSS
  // gnss.setRgbOff();
  gnss.setRgbOn();
  
  
}
// isGNSS
void isGNSS(){

  // GNSS
  sTim_t utc = gnss.getUTC();
  sTim_t date = gnss.getDate();
  sLonLat_t lat = gnss.getLat();
  sLonLat_t lon = gnss.getLon();
  
  sDate = "";
  sUTC = "";
  sLat = "";
  sLon = "";

  // Latitude
  sLat = lat.latitudeDegree;
  // Longitude
  sLon = lon.lonitudeDegree;

  // Date
  sDate = date.year;
  sDate = sDate + "/";
  sDate = sDate + date.month;
  sDate = sDate + "/";
  sDate = sDate + date.date;

  // UTC
  sUTC = utc.hour;
  sUTC = sUTC + ":";
  sUTC = sUTC + utc.hour;
  sUTC = sUTC + ":";
  sUTC = sUTC + utc.minute;

}

setup.ino

// Setup
void setup()
{
 
  // Delay
  delay( 100 );

  // EEPROM Size
  EEPROM.begin(EEPROM_SIZE);
  
  // EEPROM Unique ID
  isUID();

  // Delay
  delay(100);

  // SHARP Display start & clear the display
  display.begin();
  display.clearDisplay();

  // Delay
  delay(100);

  // isSetupGNSS
  isSetupGNSS();

  // Delay
  delay( 100 );

  // Display - UID
  // Don Luc Electronics
  // Version
  // EEPROM
  isDisplayUID();
    
  // Delay 5 Second
  delay( 5000 );

}

——

People can contact us: https://www.donluc.com/?page_id=1927

Consultant, R&D, Electronics, IoT, Teacher and Instructor

  • 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 , Underwater and UAV Vehicle
  • Unmanned Vehicles Terrestrial, Marine and UAV
  • 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: https://learn.dfrobot.com/user-10186.html
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin8
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

Project #15: Environment – Arduino UNO R4 WiFi – Mk34

——

#DonLucElectronics #DonLuc #Environment #DHT11 #ArduinoUNOR4 #Project #IoT #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

Arduino UNO R4 WiFi

——

Arduino UNO R4 WiFi

——

Arduino UNO R4 WiFi

——

Arduino UNO R4 WiFi

The new Arduino UNO R4 development board UNO R4 WiFi. It runs on the Renesas RA4M1 (Arm Cortex®-M4) processor with a clock speed of 48MHz, which provides a 3x increase over the UNO R3. In addition to that, the SRAM has been upgraded from 2kB to 32kB and the flash memory has been increased from 32kB to 256kB to accommodate to more complex projects. Furthermore, in response to requests from the Arduino community, the USB port has been upgraded to USB-C and the maximum power supply voltage has been increased to 24V. The board provides a CAN bus, allowing users to minimize wiring and perform different tasks by connecting multiple extension boards. Finally, the new board also includes a 12-bit analog DAC. The WiFi version comes with an Espressif S3 WiFi module, expanding creative opportunities for makers, educators, and hobbyists alike. Based on the success of UNO R3, the UNO R4 board is the ideal prototype and learning tool for anyone. While retaining the well-known features of the UNO series, such as standard form factor, shield compatibility, 5V voltage, and robustness, new features have been added.

DL2509Mk03

1 x Arduino UNO R4 WiFi
1 x Adafruit SHARP Memory Display Breakout – 1.3″ 168×144 Monochrome
1 x Gravity: DHT11 Temperature & Humidity Sensor
1 x USB Battery Pack
1 x USB 3.1 Cable A to C

DL2509Mk03p

DL2508Mk03p.ino

/****** Don Luc Electronics © *****Software Version Information
Project #15: Environment - Arduino UNO R4 WiFi - Mk34
15-34
DL2509Mk03.ino
DL2509Mk03
1 x Arduino UNO R4 WiFi
1 x Adafruit SHARP Memory Display Breakout - 1.3" 168x144 Monochrome
1 x Gravity: DHT11 Temperature & Humidity Sensor
1 x USB Battery Pack
1 x USB 3.1 Cable A to C
*/

// Include the Library Code
// DHT11
#include <DHT11.h>
// SHARP Memory Display
#include <Adafruit_SharpMem.h>
#include <Adafruit_GFX.h>

// DHT11
#define DHT11PIN 2
DHT11 dht11(DHT11PIN);
int temperature = 0;
int humidity = 0;

// SHARP Memory Display
// any pins can be used
#define SHARP_SCK  13
#define SHARP_MOSI 11
#define SHARP_SS   10
// Set the size of the display here, e.g. 144x168!
Adafruit_SharpMem display(SHARP_SCK, SHARP_MOSI, SHARP_SS, 144, 168);
// The currently-available SHARP Memory Display (144x168 pixels)
// requires > 4K of microcontroller RAM; it WILL NOT WORK on Arduino Uno
// or other <4K "classic" devices!  The original display (96x96 pixels)
// does work there, but is no longer produced.
#define BLACK 0
#define WHITE 1

// Software Version Information
String sver = "15-34";

void loop() {

  // DHT11
  isDHT11();

  // isDT11 Display
  isDisplayDHT();

  // Delay 1 Second
  delay( 1000 );

}

getDHT.ino

// DHT11
// isDHT11
void isDHT11(){

  // Attempt to read the temperature and humidity values from the DHT11 sensor.
  int result = dht11.readTemperatureHumidity(temperature, humidity);

}

getDisplay.ino

// Adafruit SHARP Memory Display
// Adafruit SHARP Memory Display - UID
void isDisplayUID(){

  // text display
  display.setRotation(4);
  display.setTextSize(3);
  display.setTextColor(BLACK);
  display.setCursor(0,2);
  display.println( "Don Luc" );
  //display.setTextSize(2);
  display.setTextColor(BLACK);
  display.setCursor(0,35);
  display.println( sver );
  display.refresh();
  delay( 100 );

}
// isDHT11 Display
void isDisplayDHT(){

  // text display Date and Time
  display.clearDisplay();
  display.setRotation(4);
  display.setTextSize(3);
  display.setTextColor(BLACK);
  display.setCursor(0,0);
  display.println( "Temp (C)" );
  display.setCursor(0,35);
  display.print( temperature );
  display.setCursor(45,35);
  display.println( "C" );
  //display.setTextSize(3);
  //display.setTextColor(BLACK);
  display.setCursor(0,65);
  display.println( "Hum (%)" );
  display.setCursor(0,95);
  display.print( humidity );
  display.setCursor(45,95);
  display.println( "%" );
  display.refresh();
  delay( 100 );
  
}

setup.ino

// Setup
void setup()
{
  
  // Delay
  delay(100);
  
  // SHARP Display start & clear the display
  display.begin();
  display.clearDisplay();

  // Delay
  delay( 100 );

  // Display - UID
  // Don Luc Electronics
  // Version
  isDisplayUID();

  // Delay 5 Second
  delay( 5000 );

}

——

People can contact us: https://www.donluc.com/?page_id=1927

Consultant, R&D, Electronics, IoT, Teacher and Instructor

  • 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 , Underwater and UAV Vehicle
  • Unmanned Vehicles Terrestrial, Marine and UAV
  • 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: https://learn.dfrobot.com/user-10186.html
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin8
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

Project #15: Environment – Geiger – Mk33

——

#DonLucElectronics #DonLuc #Environment #Geiger #DFRobot #Project #IoT #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

Geiger

——

Geiger

——

Geiger

——

Gravity: Geiger Counter Module Ionizing Radiation Detector

Ionizing radiation, an invisible and intangible enemy, exists not only in nuclear power plant reactors. In fact, we are bombarded by radiation from the surrounding environment and outer space all the time, but fortunately our body is strong enough to resist the natural background radiation.

No active contact does not mean that high-energy ionizing radiation will not be encountered. Natural marble building materials, ore gems with different colors, and “negative ion powder” of unknown composition may contain different amounts of radioactive elements. With the use of a Geiger counter, these radioactive sources have nowhere to hide.

In addition, the Geiger counter is a good random number generator, and undetermined high-energy particle ionization events can provide enough random entropy to get you a truly random number, rather than a fixed random sequence based on a random algorithm.

DL2509Mk02

1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: 2.0″ 320×240 IPS TFT LCD
1 x GDL Line 10 CM
1 x Gravity: IO Shield for FireBeetle 2
1 x Gravity: Geiger Counter Module Ionizing Radiation Detector
1 x Lithium Ion Battery – 1000mAh
1 x Switch
1 x SPDT Slide Switch
1 x USB 3.1 Cable A to C

DL2509Mk02p

DL2508Mk01p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #15: Environment - Geiger  - Mk33
15-33
DL2509Mk02p.ino
DL2509Mk02
1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: 2.0" 320x240 IPS TFT LCD
1 x GDL Line 10 CM
1 x Gravity: IO Shield for FireBeetle 2
1 x Gravity: Geiger Counter Module Ionizing Radiation Detector
1 x Lithium Ion Battery - 1000mAh
1 x Switch
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"
// DFRobot Display GDL API
#include <DFRobot_GDL.h>
// DFRobot Geiger
#include <DFRobot_Geiger.h>

// DFRobot Geiger
#define detect_pin D5
DFRobot_Geiger  geiger(detect_pin);
float iCPM = 0;
float inSvh = 0;
float iuSvh = 0;

// 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);

// EEPROM Unique ID Information
#define EEPROM_SIZE 64
String uid = "";

// Software Version Information
String sver = "15-33";

void loop() {

  // isGeiger
  isGeiger();

  // isGeiger Display
  isDisplayGeiger();

  // Delay 3 Second
  //delay( 3000 );

}

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 Sans Bold 12pt
  screen.setFont(&FreeSansBold12pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // Don Luc Electronics
  screen.setCursor(0, 30);
  screen.println("Don Luc Electronics");
  // SD
  screen.setCursor(0, 60);
  screen.println("Geiger");
  // 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 );

}
// isGeiger Display
void isDisplayGeiger(){

  // DFRobot Display 240x320
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => white
  screen.fillScreen(0xffff);
  // Text Color => blue
  screen.setTextColor(0x001F);
  // Font => Free Sans Bold 12pt
  screen.setFont(&FreeSansBold12pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // Geiger
  screen.setCursor(0, 30);
  screen.println("Geiger");
  // CPM
  screen.setCursor(0, 60);
  screen.println("CPM: ");
  screen.setCursor(90, 60);
  screen.println( iCPM );
  // nSvh
  screen.setCursor(0, 90);
  screen.println( "nSvh: " );
  screen.setCursor(90, 90);
  screen.println( inSvh );
  // uSvh
  screen.setCursor(0, 120);
  screen.println( "uSvh: " );
  screen.setCursor(90, 120);
  screen.println( iuSvh );
  
}

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));
  }

}

getGeiger,ino

// DFRobot Geiger
// isGeiger
void isGeiger(){

  // Delay 3 Second
  delay( 3000 );
  
  // Geiger
  iCPM = geiger.getCPM();
  inSvh = geiger.getnSvh();
  iuSvh = geiger.getuSvh();
  
}

setup.ino

// Setup
void setup()
{
 
  // Delay
  delay( 100 );

  // EEPROM Size
  EEPROM.begin(EEPROM_SIZE);
  
  // EEPROM Unique ID
  isUID();
  
  // Delay
  delay(100);

  // DFRobot Geiger
  geiger.start();

  // Delay
  delay(100);
  
  // DFRobot Display 240x320
  screen.begin();

  // Delay
  delay( 100 );

  // DFRobot Display 240x320 - UID
  // Don Luc Electronics
  // Version
  isDisplayUID();

  // Delay 5 Second
  delay( 5000 );

}

——

People can contact us: https://www.donluc.com/?page_id=1927

Consultant, R&D, Electronics, IoT, Teacher and Instructor

  • 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 , Underwater and UAV Vehicle
  • Unmanned Vehicles Terrestrial, Marine and UAV
  • 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: https://learn.dfrobot.com/user-10186.html
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin8
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

Project #15: Environment – KY-039 – Mk32

——

#DonLucElectronics #DonLuc #KY039 #ESP32 #Arduino #EEPROM #Display #Elecrow #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant

——

KY-039

——

KY-039

——

KY-039

——

KY-039 Heartbeat Sensor Module

This project uses bright infrared (IR) LED and a phototransistor to detect the pulse of the finger, a red LED flashes with each pulse.
Pulse monitor works as follows: The LED is the light side of the finger, and phototransistor on the other side of the finger, phototransistor used to obtain the flux emitted, when the blood pressure pulse by the finger when the resistance of the phototransistor will be slight changed.

We chose a very high resistance resistor R1, because most of the light through the finger is absorbed,it is desirable phototransistor sensitive enough.Resistance can be selected by experiment to get the best results. The most important is to keep the shield stray light into the phototransistor. For home lighting that is particularly important because the lights at home mostly based 50HZ or 60HZ fluctuate, so faint heartbeat will add considerable noise.

DL2506Mk04

1 x Crowduino Uno – SD
1 x Crowtail – Base Shield
1 x Crowtail – I2C LCD
1 x KY-039 Heartbeat Sensor Module
1 x Crowtail – LED(Green)
1 x USB Battery Pack
1 x USB Mini-B Cable

Crowduino Uno – SD

SCL – A5
SDA – A4
KYH – A0
LED – 6
VIN – +5V
GND – GND

DL2506Mk04p

DL2506Mk04p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #15: Environment - KY-039 - Mk31
DL2506Mk04p.ino
DL2506Mk04
1 x Crowduino Uno - SD
1 x Crowtail - Base Shield
1 x Crowtail - I2C LCD
1 x KY-039 Heartbeat Sensor Module
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"

// KY-039 Heartbeat
int iHeartbeat = A0;
// Pulse
float pulse;
// Sum
int sum = 0;

// 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-31";

void loop() {

  // Heartbeat
  // isHeartbeat
  isHeartbeat();

  // Display Heartbeat
  isDisplayHeartbeat();

  // Delay
  delay( 100 );

}

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 Heartbeat
void isDisplayHeartbeat(){

  // Clear
  lcd.clear();
  // Set the cursor to column 0, line 0
  lcd.setCursor(0, 0);
  lcd.print( "Heartbeat" );
  // Set the cursor to column 0, line 1
  lcd.setCursor(0, 1);
  lcd.print( pulse );
  
}

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));
  }
  
}

getHeartbeat.ino

// KY-039 Heartbeat
// isHeartbeat
void isHeartbeat(){

  // Sum
  sum = 0;
  
  // KY-039 Heartbeat
  for (int i = 0; i < 20; i++){
  
    sum += analogRead(iHeartbeat);

  }

  // Pulse
  pulse = sum / 200.00;

}

setup.ino

// Setup
void setup()
{
 
  // Delay
  delay(100);
  
  // isUID EEPROM Unique ID
  isUID();
  
  // Delay
  delay(100);

  // Initialize the LED Green
  pinMode(iLEDGreen, OUTPUT);
  // LED Green
  digitalWrite(iLEDGreen, HIGH);

  // Delay
  delay(100);

  // KY-039 Heartbeat
  pinMode(iHeartbeat, INPUT);

  // Delay
  delay( 100 );

  // Display UID
  isDisplayUID();
  
  // Delay 10 Second
  delay( 10000 );

}

——

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 – Temperature and Humidity – Mk31

——

#DonLucElectronics #DonLuc #DHT11 #ESP32 #Arduino #EEPROM #Display #Elecrow #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant

——

Temperature and Humidity

——

Temperature and Humidity

——

Temperature and Humidity

——

3.5” 320×480 ESP32 LCD Touch Display

This 3.5“ display is a high-performance development module integrates the ESP32 WROOM 32E module. It has powerful development capabilities and rich resources, providing great convenience for developers. It is equipped with a 3.5-inch screen with a resolution of 320 x 480 and supports rich color display of up to 262K colors (RGB666), ensuring clear images and bright colors. The module provides a variety of interfaces, including SPI, UART, etc., which are convenient for connecting various peripherals to meet diverse development needs.

In addition, it supports external speakers to play audio, has its own RGB three-color indicator for rich status indication, and is also equipped with a resistive touch screen for convenient human-computer interaction. It uses a standard TYPE-C interface to facilitate program downloads and power supply, and comes with a micro TF card slot for easy expansion of storage space. It supports external lithium batteries, is lightweight and portable, and has a built-in battery charging management circuit to ensure safe battery charging and discharging. We also provide a wealth of sample programs and technical support to help developers get started quickly. It is suitable for smart home, industrial control and maker projects.

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

DL2506Mk02

1 x 3.5” 320×480 ESP32 LCD Touch Display
1 x Crowtail – Temperature and Humidity Sensor 2.0
1 x USB Battery Pack
1 x USB 3.1 Cable A to C

3.5” ESP32 LCD Touch Display

DHT – 25
VIN – +3.3V
GND – GND

DL2506Mk02p

DL2506Mk02p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #15: Environment - Temperature and Humidity - Mk31
DL2506Mk02p.ino
DL2506Mk02
1 x 3.5” 320x480 ESP32 LCD Touch Display
1 x Crowtail - Temperature and Humidity Sensor 2.0
1 x USB Battery Pack
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"
// TFT Display
#include <TFT_eSPI.h>
// SPI
#include <SPI.h>
// Temperature and Humidity
#include "DHT.h"

// TFT Display
// Invoke custom library with default width and height
// (320x480)
TFT_eSPI tft = TFT_eSPI();
int xpos =  0;
int ypos = 40;

// Temperature and Humidity
// DHT 11 
#define DHTTYPE DHT11
#define DHTPIN 25
DHT dht(DHTPIN, DHTTYPE);
// Temperature
float t;
// Humidity
float h;

// EEPROM Unique ID Information
#define EEPROM_SIZE 64
String uid = "";

// Software Version Information
String sver = "15-31";

void loop() {

  
  // Temperature and Humidity
  // isDHT
  isDHT();

  // Display Temperature and Humidity
  isDisplayDHT();

  // Delay
  delay( 1000 );

}

getDHT.ino

// Temperature and Humidity
// DHT
// isDHT
void isDHT(){

  // Temperature and Humidity
  // Temperature
  t = dht.readTemperature();
  // Humidity
  h = dht.readHumidity();
  
}

getDisplay.ino

// getDisplay
// 3.5” 320x480 ESP32 LCD Touch Display
// Display UID
void isDisplayUID(){

  // x and y Coordinate 
  xpos =  0;
  ypos = 40;
  
  // TFT Display
  // Clear screen to navy background
  tft.fillScreen(TFT_NAVY);
  
  // Don Luc Electronics
  // TextSize
  tft.setTextSize(1);
  // Text Color
  tft.setTextColor(TFT_YELLOW, TFT_BLUE);
  // Fill Rectangle
  tft.fillRect(0, 0, 350, 30, TFT_BLUE);
  // Font datum
  tft.setTextDatum(TC_DATUM);
  // Draw String
  tft.drawString("Don Luc Electronics", 160, 2, 4);

  // Text Color
  tft.setTextColor(TFT_YELLOW, TFT_BLACK);
  // Set cursor near top left corner of screen
  tft.setCursor(xpos, ypos);

  // TFT Display
  // TextSize
  tft.setTextSize(2);
  // Move cursor down a line
  tft.println();
  
  // Software Version Information
  tft.print("Version: ");
  tft.println( sver );
  // Move cursor down a line
  tft.println();
  tft.println();

  // EEPROM
  tft.print("EEPROM: ");
  tft.println( uid );

}
// Display Temperature and Humidity
void isDisplayDHT(){

  // x and y Coordinate 
  xpos =  0;
  ypos = 40;
  
  // TFT Display
  // Clear screen to navy background
  tft.fillScreen(TFT_NAVY);
  
  // Don Luc Electronics
  // TextSize
  tft.setTextSize(1);
  // Text Color
  tft.setTextColor(TFT_YELLOW, TFT_BLUE);
  // Fill Rectangle
  tft.fillRect(0, 0, 350, 30, TFT_BLUE);
  // Font datum
  tft.setTextDatum(TC_DATUM);
  // Draw String
  tft.drawString("Don Luc Electronics", 160, 2, 4);

  // Text Color
  tft.setTextColor(TFT_YELLOW, TFT_BLACK);
  // Set cursor near top left corner of screen
  tft.setCursor(xpos, ypos);

  // TFT Display
  // TextSize
  tft.setTextSize(2);
  // Move cursor down a line
  tft.println();

  // Temperature
  tft.print("Temperature: ");
  tft.print( t );
  tft.println( " C" );
  tft.println();

  // Humidity
  tft.print("Humidity: ");
  tft.print( h );
  tft.println( " %" );
  
}

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));
  }
  
}

setup.ino

// Setup
void setup()
{
 
  // Delay
  delay(100);

  // EEPROM Size
  EEPROM.begin(EEPROM_SIZE);
  
  // isUID EEPROM Unique ID
  isUID();
  
  // Delay
  delay(100);

  // TFT Display
  tft.begin();
  // Rotation
  tft.setRotation(2);

  // Delay
  delay(100);

  // Temperature and Humidity
  dht.begin();

  // Delay
  delay( 100 );

  // Display UID
  isDisplayUID();
  
  // Delay 10 Second
  delay( 10000 );

}

——

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 – Gas Sensor MQ3 – Mk30

——

#DonLucElectronics #DonLuc #GasSensorMQ3 #Arduino #EEPROM #Display #Elecrow #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant

——

Gas Sensor MQ3

——

Gas Sensor MQ3

——

Gas Sensor MQ3

——

Crowtail – Gas Sensor MQ3

The module contains a MQ-3 Gas Sensor and ETA1036. High sensitivity to alcohol and small sensitivity to benzine with a stable and long worklife are most important reasons to choose the MQ-3. The ETA1036 is a high efficiency synchronous step-up converter that can provide up to 3W of power to a boosted output from a low voltage source. The start-up voltage requires only 0.85v and the efficiency up to 96%. The MQ-3 is useful for alcohol detecting.

Crowtail – LED Matrix 2.0 – (Red)

A 8×8 LED matrix has lots of applications when we DIY some electronic kit. So we this Crowtail- 8×8 LED Matrix use the HT16K33 which is a neat little chip that has the ability to drive a multiplexed 8×8 matrix. The I2C communication protocol uses only 2 pins, and you can have up to 8 selectable I2C addresses so that a total of 8 matrices, each one controlling 8×8 LEDs for 64 total LEDs.

DL2505Mk05

1 x Crowduino Uno – SD
1 x Crowtail – Base Shield
1 x Crowtail – I2C LCD
1 x Crowtail – Gas Sensor MQ3
1 x Crowtail – LED Matrix 2.0
1 x Crowtail – LED(Green)
1 x USB Battery Pack
1 x USB Mini-B Cable

Crowduino Uno – SD

SCL – A5
SDA – A4
MQ3 – A0
LED – 6
VIN – +5V
GND – GND

DL2505Mk05p

DL2505Mk05p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #15: Environment - Gas Sensor MQ3 - Mk30
DL2505Mk05p.ino
DL2505Mk05
1 x Crowduino Uno - SD
1 x Crowtail - Base Shield
1 x Crowtail - I2C LCD
1 x Crowtail - Gas Sensor MQ3
1 x Crowtail - LED Matrix 2.0
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"
// Matrix Adafruit LED Backpack
#include "Adafruit_LEDBackpack.h"

// 8x8 Matrix 
Adafruit_8x8matrix matrix = Adafruit_8x8matrix();
// BMP
static const uint8_t PROGMEM
  smile_bmp[] =
  { B00111100,
    B01000010,
    B10100101,
    B10000001,
    B10100101,
    B10011001,
    B01000010,
    B00111100 },
  neutral_bmp[] =
  { B00111100,
    B01000010,
    B10100101,
    B10000001,
    B10111101,
    B10000001,
    B01000010,
    B00111100 },
  frown_bmp[] =
  { B00111100,
    B01000010,
    B10100101,
    B10000001,
    B10011001,
    B10100101,
    B01000010,
    B00111100 };

// MQ3 Alcohol
int iMQ3Alcohol = A0;
// MQ3 Value
float MQ3Value;
// Sober
#define Sober 120
// Drunk
#define Drunk 400

// 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-30";

void loop() {

  // MQ3 Alcohol
  // isMQ3
  isMQ3();

  // Display Alcohol
  isDisplayAlcohol();

  // Delay
  delay( 2000 );

}

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 Alcohol
void isDisplayAlcohol(){

  // Clear
  lcd.clear();
  // Set the cursor to column 0, line 0
  lcd.setCursor(0, 0);
  lcd.print( "MQ3 Alcohol" );
  // Set the cursor to column 0, line 1
  lcd.setCursor(0, 1);
  lcd.print( MQ3Value );
  
}

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));
  }
  
}

getMQ3.ino

// MQ3 Alcohol
// isMQ3
void isMQ3(){

  // MQ3 Alcohol
  MQ3Value = digitalRead(iMQ3Alcohol);

  // Determine the status
  if (MQ3Value < Sober) {
    
    // Smile
    matrix.clear();
    matrix.drawBitmap(0, 0, smile_bmp, 8, 8, LED_ON);
    matrix.writeDisplay();
    
  } else if (MQ3Value >= Sober && MQ3Value < Drunk) {

     // Neutral
     matrix.clear();
     matrix.drawBitmap(0, 0, neutral_bmp, 8, 8, LED_ON);
     matrix.writeDisplay();

    
  } else {

    // DRUNK
    matrix.clear();
    matrix.drawBitmap(0, 0, frown_bmp, 8, 8, LED_ON);
    matrix.writeDisplay();

  }

}

setup.ino

// Setup
void setup()
{
 
  // Delay
  delay(100);
  
  // isUID EEPROM Unique ID
  isUID();
  
  // Delay
  delay(100);

  // Initialize the LED Green
  pinMode(iLEDGreen, OUTPUT);
  // LED Green
  digitalWrite(iLEDGreen, HIGH);

  // Delay
  delay(100);

  // 8x8 Matrix 
  matrix.begin(0x70);
  // Smile
  matrix.drawBitmap(0, 0, smile_bmp, 8, 8, LED_ON);
  matrix.writeDisplay();

  // 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 – Serial Camera – Mk29

——

#DonLucElectronics #DonLuc #Arduino #Camera #SD #RTC #EEPROM #Display #Elecrow #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant

——

Serial Camera

——

Serial Camera

——

Serial Camera

——

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

——

SD

——

SD

——

SD

——

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

——

GPS

——

GPS

——

GPS

——

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

——

RTC

——

RTC

——

RTC

——

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