The Alpha Geek – Geeking Out

Digital Electronics

Digital Electronics

1 2 3 48

Project #12: Robotics – MOSFET – Mk28

——

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

——

MOSFET

——

MOSFET

——

MOSFET

——

Crowtail – MOSFET

Crowtail – MOSFET enables you to control higher voltage project, say 50 Volt DC, with low voltage, say 5 Volt, on microcontroller. MOSFET is also a kind of switch. There are two screw terminals on the board. One for input power source and the other for device you want to control. Crowtail – MOSFET will pass the power from one end to another when closed. But if outer power source is absent, your device can still draw power from microcontroller via the Crowtail interface.

Crowtail – Mini Fan 2.0

This is a Crowtail mini fan with the mini motor driver which use the whole analog circuit.

DL2504Mk04

1 x Crowduino Uno – SD
1 x Crowtail – Base Shield
1 x Crowtail – I2C LCD
1 x Crowtail – MOSFET 2.0
1 x Crowtail – Mini Fan 2.0
1 x 2 AAA Battery Holder with On/Off Switch
1 x Crowtail – Rotary Angle Sensor 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
POT – A0
MOS – 5
LEDG – 6
VIN – +5V
GND – GND

DL2504Mk04p

DL2504Mk04.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #12: Robotics - MOSFET - Mk28
DL2504Mk04p.ino
DL2504Mk04
1 x Crowduino Uno - SD
1 x Crowtail - Base Shield
1 x Crowtail - I2C LCD
1 x Crowtail - MOSFET 2.0
1 x Crowtail - Mini Fan 2.0
1 x Crowtail - Rotary Angle Sensor 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"

// MOSFET
int mosfetPin = 5;

// Liquid Crystal
// Connect via i2c
LiquidCrystal lcd(0);

// LED Green
int iLEDGreen = 6;

// Rotary Angle Sensor
int iPot = A1;
// Change Your Threshold Here
int Threshold = 0;
int zz = 0;

// EEPROM Unique ID Information
String uid = "";

// Software Version Information
String sver = "12-28";

void loop() {

  // isMOSFET
  isMOSFET();

  // Display MOSFET
  isDisplayMOSFET();

  // Delay
  delay( 500 );

}

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 MOSFET
void isDisplayMOSFET(){

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

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

getMOSFET.ino

// MOSFET
// isMOSFET
void isMOSFET(){

  // Rotary Angle Sensor
  // Threshold => 0~255
  zz = analogRead( iPot );
  Threshold = map( zz, 0, 1024, 0, 255);

  // MOSFET
  // Threshold
  analogWrite(mosfetPin, Threshold);

}

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

  // Rotary Angle Sensor
  pinMode(iPot, INPUT);
  
  // Delay
  delay(100);

  // Declare the motorPin as an OUTPUT:
  pinMode(mosfetPin, OUTPUT);

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

Web – E-Commerce

——

#DonLucElectronics #DonLuc #Arduino #Python #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant

——

Web - E-Commerce

——

Web - E-Commerce

——

Web - E-Commerce

——

Web - E-Commerce

——

Web - E-Commerce

——

Web - E-Commerce

——

I have been blogging for over 20 years now in other venues and I thought that it was time to post my thought about what has been my main business for over 45 years. I started as a food-wine consultant back in the early 80’s. I was also active in the emerging field of computer graphics and animation at the time and also started to be more and more involved in the IT world as I had trained as a programmer at university. By the dawn of the 90’s I was a full time IT consultant, programmer, graphics, animation specialist. Then the industry changed rapidly with the event of the big Internet crash of the late 90’s and I became a software developer and launch my own line of products. Now I am back where I started and I am a Business, Electronics, IoT, Teacher, Instructor, R&D, Consulting, IT, Programmer, Hardware and Robotics specialist.

I have seen many trends come and go, good and bad, and lived through many major industry changes. I do deplore some of the current state of the industry, and applaud some of the new trends. Since my motto has always been to learn something new daily, and that a wasted day is one where you learn nothing new, I decided to share some of that hard-earned let’s call it “Wisdom” for lack of a better term.

I know that I am considered as a dinosaur in this business where you are considered old when you hit 25, but there are some of us old fogies at over twice that, that are still active and can still provide a full contribution to this or these fields.

Don Luc Electronics Websites that were thought to be useful to electronics engineers professionals, geek, hobbyists, hackers and makers. We are experts in designing and programming embedded systems using a wide variety of platforms and microcontrollers. The project will first be assembled on a breadboard. If there is enough demand either a PCB, or a kit BOM (Bill of Material), or a kit BOM soldered version, or kit BOM enclosures, or a kit BOM soldered version enclosures, and sold here.

Web E-Commerce

Online sales continue to grow. Last year, more than a fifth of all retail sales happened online, and eCommerce is a multi-trillion dollar market. So, if you have a small business, you should probably have a web store. The good news is that with the right tools, it’s easy for any small business to quickly start selling online. With one of the best eCommerce website builders, you can list your products, take payments, and handle shipping, all without leaving the comfort of your home office.

Facebook Marketplace
Amazon Marketplace
eBay Marketplace
Mercado Libre Marketplace
Etsy Marketplace
TikTok Shop
Craigslist
Shopify
Shop Pay
Patreon
PrestaShop
BigCommerce
Wix
WooCommerce (WordPress)
Squarespace
Paypal
Etc…

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 #30 – UNIHIKER – AHT20 – Mk09

——

#DonLucElectronics #DonLuc #AHT20 #UNIHIKER #Display #IoT #Project #DFRobot #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

AHT20

——

AHT20

——

AHT20

——

AHT20 – Temperature and Humidity Sensor

The AHT20 is a high-precision but low-cost temperature and humidity sensor, which is equipped with an improved MEMS semiconductor capacitive humidity sensor element. It features standard I2C interface and a wide voltage supply of 2 Volt – 5 Volt. And with simple peripheral circuit, it performs stably even in harsh environments in the measuring range of -40 – +85 Celsius. This sensor can be widely used for measuring the environmental temperature and humidity of home electronic equipment, the temperature and humidity of automobiles and so on.

DL2504Mk03

1 x UNIHIKER K10
1 x Lithium Ion Battery – 1000mAh
1 x Switch
1 x USB 3.1 Cable A to C

DL2504Mk03p

DL2504Mk03p.mp

/****** Don Luc Electronics © ******
Software Version Information
Project #30 - UNIHIKER - AHT20 - Mk09
DL2504Mk03p.mp
DL2504Mk03
1 x UNIHIKER K10
1 x Lithium Ion Battery - 1000mAh
1 x Switch
1 x USB 3.1 Cable A to C
*/

// Include the Library Code
// Unihiker K10
#include "unihiker_k10.h"
// Arduino Image Cache
#include "arduino_image_cache.h"

// Create an object
// UNIHIKER K10
UNIHIKER_K10 k10;
// Screen
uint8_t screen_dir=2;
// AHT20
AHT20 aht20;

// Software Version Information 30-09
// Main program start
void setup() {
	
  // Begin
  k10.begin();
  // Init Screen
  k10.initScreen(screen_dir);
  // Canvas
  k10.creatCanvas();

}
// Loop
void loop() {

  // Draw Bitmap
  k10.canvas->canvasDrawBitmap(0,0,240,320,image_data1);
  // Text TEMPERATURE (C)
  k10.canvas->canvasText("TEMPERATURE (C)", 6, 0x330000);
  // Text AHT20 TempC
  k10.canvas->canvasText(aht20.getData(AHT20::eAHT20TempC), 7, 0x0000FF);
  // Text HUMIDITY
  k10.canvas->canvasText("HUMIDITY", 8, 0x330000);
  // Text AHT20 HumiRH
  k10.canvas->canvasText(aht20.getData(AHT20::eAHT20HumiRH), 9, 0x0000FF);
  // Update Canvas
  k10.canvas->updateCanvas();

}

——

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 #30 – UNIHIKER – UNIHIKER K10 – Mk08

——

#DonLucElectronics #DonLuc #UNIHIKER #Display #IoT #Project #DFRobot #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

UNIHIKER K10

——

UNIHIKER K10

——

UNIHIKER K10

Mindplus or MicroPython or Arduino IDE

UNIHIKER K10 is an AI learning device designed for education, serving as STEM AI kit and TinyML education kit for teens. It integrates a 2.8-inch color screen, Wi-Fi, Bluetooth, a camera, microphone, speaker, RGB light, temperature sensor, humidity sensor, light sensor, and accelerometer. Featuring edge connectors and Gravity IO interfaces, it enables the connection and control of various digital, analog, I2C, and UART sensors and actuators, making it perfect for IoT programming for beginners.

With its rich onboard resources, the UNIHIKER K10 eliminates the need for additional devices during learning and project development. It supports sensor control, IoT applications, and AI projects such as face detection and offline voice recognition, all in one compact device.

Core

  • MCU Module: ESP32-S3 N16R8
  • Processor:Xtensa® LX7
  • Dual core 32-bit up to 240 MHz
  • SRAM: 512KB
  • ROM: 384KB
  • Flash: 16MB
  • PSRAM: 8MB
  • RTC SRAM: 16KB
  • Wi-Fi Specification: IEEE 802.11b/g/n
  • Frequency: 2.4G
  • Band width: 20MHz, 40MHz
  • Bluetooth Specification: Bluetooth 5, Bluetooth mesh
  • Frequency: 125 Kbps, 500 Kbps, 1 Mbps, 2 Mbps

On-Board Component

  • Temperature and Humidity Sensor (AHT20)
  • Ambient Light Sensor (LTR303ALS)
  • Triaxial Acceleration Sensor (SC7A20H)
  • Display 2.8 inch, 240 x 320, Colored, LCD, (ILI9341)
  • Camera 2MP, 80°FOV, (GC2145)
  • A, B, RST,BOOT button A, B, RST,BOOT button
  • MEMS MIC, MEMS MIC x 2
  • Speaker Power, 2W
  • WS2812 RGB LED WS2812 RGB LED x 3

Interface

  • On-board interface USB-C power/program upload interface
  • 2 Pin PH2.0 battery
  • 3 Pin PH2.0 Full function GPIO x 2
  • 4 Pin PH2.0 I2C
  • Self-ejecting TF card slot
  • EdgeConnector Full function GPIO x 2
  • I2C x 1
  • Digital IO x 15
  • DL2504Mk02

    1 x UNIHIKER K10
    1 x USB Battery Pack
    1 x USB 3.1 Cable A to C

    ——

    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 #25 – Movement – SD – Mk12

    ——

    #DonLucElectronics #DonLuc #SD #GPS #RTC #EEPROM #Compass #Accelerometer #Movement #ESP32 #Bluetooth #Elecrow #DFRobot #Arduino #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant

    ——

    SD

    ——

    SD

    ——

    SD

    ——

    MicroSD Card Module

    There are different microSD card modules compatible with the ESP32. We’re using the microSD card module it communicates using SPI communication protocol. You can use any other microSD card module with an SPI interface. This microSD card module is also compatible with other microcontrollers like the Arduino boards. To learn how to use the microSD card module with the Arduino. You can connect it to the ESP32 using the default SPI pins.

    DL2502Mk05

    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 Crowtail – I2C Hub 2.0
    1 x Crowtail – Switch 2.0
    1 x Adafruit MicroSD card breakout board+
    1 x MicroSD 4 GB
    1 x Crowtail – LED(Red)
    1 x GPS Receiver – GP-20U7
    1 x Adafruit DS3231 Precision RTC FeatherWing
    1 x CR1220 Battery
    1 x Crowtail – 3-Axis Digital Compass
    1 x Crowtail – 3-Axis Digital Accelerometer
    1 x Lithium Ion Battery – 1000mAh
    1 x Switch
    1 x Bluetooth Serial Terminal
    1 x USB 3.1 Cable A to C

    FireBeetle 2 ESP32-E

    SCL – 22
    SDA – 21
    SCK – 18
    MOSI – 23
    MISO – 19
    CS – 4
    POT – 16
    LED – 17
    GPR – 0
    GPT – 2
    DC – D2
    CS – D6
    RST – D3
    RX2 – Bluetooth
    TX2 – Bluetooth
    VIN – +3.3V
    GND – GND

    DL2502Mk05p

    DL2502Mk05p.ino

    /****** Don Luc Electronics © ******
      Software Version Information
      Project #25 - Movement - SD - Mk12
      25-12
      DL2502Mk05p.ino
      DL2502Mk05
      1 x DFRobot FireBeetle 2 ESP32-E
      1 x Fermion: 2.0" 320x240 IPS TFT LCD
      1 x GDL Line 10 CM
      1 x Crowtail - I2C Hub 2.0
      1 x Crowtail - Switch 2.0
      1 x Adafruit MicroSD card breakout board+
      1 x MicroSD 4 GB
      1 x Crowtail - LED(Red)
      1 x GPS Receiver - GP-20U7
      1 x Adafruit DS3231 Precision RTC FeatherWing
      1 x CR1220 Battery
      1 x Crowtail - 3-Axis Digital Compass
      1 x Crowtail - 3-Axis Digital Accelerometer
      1 x Lithium Ion Battery - 1000mAh
      1 x Switch
      1 x Bluetooth Serial Terminal
      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>
    // Bluetooth Serial
    #include "BluetoothSerial.h"
    #if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
    #error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
    #endif
    // Accelemeter ADXL345
    #include <ADXL345.h>
    // Compass HMC5883L
    #include <HMC5883L.h>
    // RTC (Real-Time Clock)
    #include "RTClib.h"
    // GPS Receiver
    #include <TinyGPS++.h>
    // ESP32 Hardware Serial
    #include <HardwareSerial.h>
    // SD Card
    #include "FS.h"
    #include "SD.h"
    #include "SPI.h"
    
    // Define LED Red
    int iLED = 17;
    
    // Switch
    int iSwitch = 16;
    // Variable for reading the Switch status
    int iSwitchState = 0;
    
    // MicroSD Card
    const int chipSelect = 4;
    String zzzzzz = "";
    
    // ESP32 HardwareSerial
    HardwareSerial tGPS(1);
    
    // GPS Receiver
    #define gpsRXPIN 0
    // This one is unused and doesnt have a conection
    #define gpsTXPIN 2
    // The TinyGPS++ object
    TinyGPSPlus gps;
    // Latitude
    float TargetLat;
    // Longitude
    float TargetLon;
    // GPS Date, Time, Speed, Altitude
    // GPS Date
    String TargetDat;
    // GPS Time
    String TargetTim;
    // GPS Speeds M/S
    String TargetSMS;
    // GPS Speeds Km/h
    String TargetSKH;
    // GPS Altitude Meters
    String TargetALTM;
    // GPS Altitude Feet
    String TargetALTF;
    // GPS Status
    String GPSSt = "";
    
    // RTC (Real-Time Clock)
    RTC_DS3231 rtc;
    String dateRTC = "";
    String timeRTC = "";
    String tempRTC = "";
    
    // Compass HMC5883L
    HMC5883L compass;
    // Heading
    float heading;
    // Heading Degrees
    float headingDegrees;
    
    // Variable ADXL345 library
    ADXL345 adxl;
    // Accelerometer ADXL345
    // x, y, z
    int x;
    int y;
    int z;
    // Standard Gravity
    // xyz
    double xyz[3];
    double ax;
    double ay;
    double az;
    
    // FullString
    String FullString = "";
    
    // Bluetooth Serial
    BluetoothSerial SerialBT;
    
    // 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 = "25-12";
    
    void loop() {
    
      // Accelemeter ADXL345
      isADXL345();
    
      // Compass HMC5883L
      isHMC5883L();
    
      // RTC (Real-Time Clock)
      isRTC();
    
      // isGPS
      isGPS();
    
      // Accelemeter ADXL345 Compass HMC5883L Display
      isDisplayADXL345HMC5883L();
    
      // Read the state of the Switch value
      iSwitchState = digitalRead(iSwitch);
    
      // The Switch is HIGH:
      if (iSwitchState == HIGH) {
    
        // LED Red HIGH
        digitalWrite(iLED, HIGH);
    
        // MicroSD Card
        isSD();
    
      } else {
    
        // LED Red LOW
        digitalWrite(iLED, LOW);
    
      }
    
      // Delay 0.5 Second
      delay( 500 );
    
    }
    

    getAccelemeterADXL345.ino

    // Accelemeter ADXL345
    // Setup Accelemeter ADXL345
    void isSetupADXL345(){
    
      // Power On
      adxl.powerOn();
    
      // Set activity inactivity thresholds (0-255)
      // 62.5mg per increment
      adxl.setActivityThreshold(75);
      // 62.5mg per increment
      adxl.setInactivityThreshold(75);
      // How many seconds of no activity is inactive?
      adxl.setTimeInactivity(10);
     
      //look of activity movement on this axes - 1 == on; 0 == off 
      adxl.setActivityX(1);
      adxl.setActivityY(1);
      adxl.setActivityZ(1);
     
      //look of inactivity movement on this axes - 1 == on; 0 == off
      adxl.setInactivityX(1);
      adxl.setInactivityY(1);
      adxl.setInactivityZ(1);
     
      // Look of tap movement on this axes - 1 == on; 0 == off
      adxl.setTapDetectionOnX(0);
      adxl.setTapDetectionOnY(0);
      adxl.setTapDetectionOnZ(1);
     
      // Set values for what is a tap, and what is a double tap (0-255)
      // 62.5mg per increment
      adxl.setTapThreshold(50);
      // 625us per increment
      adxl.setTapDuration(15);
      // 1.25ms per increment
      adxl.setDoubleTapLatency(80);
      // 1.25ms per increment
      adxl.setDoubleTapWindow(200);
     
      // set values for what is considered freefall (0-255)
      // (5 - 9) recommended - 62.5mg per increment
      adxl.setFreeFallThreshold(7);
      // (20 - 70) recommended - 5ms per increment
      adxl.setFreeFallDuration(45);
     
      // Setting all interrupts to take place on int pin 1
      // I had issues with int pin 2, was unable to reset it
      adxl.setInterruptMapping( ADXL345_INT_SINGLE_TAP_BIT,   ADXL345_INT1_PIN );
      adxl.setInterruptMapping( ADXL345_INT_DOUBLE_TAP_BIT,   ADXL345_INT1_PIN );
      adxl.setInterruptMapping( ADXL345_INT_FREE_FALL_BIT,    ADXL345_INT1_PIN );
      adxl.setInterruptMapping( ADXL345_INT_ACTIVITY_BIT,     ADXL345_INT1_PIN );
      adxl.setInterruptMapping( ADXL345_INT_INACTIVITY_BIT,   ADXL345_INT1_PIN );
     
      // Register interrupt actions - 1 == on; 0 == off  
      adxl.setInterrupt( ADXL345_INT_SINGLE_TAP_BIT, 1);
      adxl.setInterrupt( ADXL345_INT_DOUBLE_TAP_BIT, 1);
      adxl.setInterrupt( ADXL345_INT_FREE_FALL_BIT,  1);
      adxl.setInterrupt( ADXL345_INT_ACTIVITY_BIT,   1);
      adxl.setInterrupt( ADXL345_INT_INACTIVITY_BIT, 1);
    
    }
    // Accelemeter ADXL345
    void isADXL345(){
    
      // Read the accelerometer values and store them in variables  x,y,z
      adxl.readXYZ(&x, &y, &z);
    
      // Standard Gravity
      // Acceleration
      adxl.getAcceleration(xyz);
    
      // Output
      ax = xyz[0];
      ay = xyz[1];
      az = xyz[2];
      
    }
    

    getCompassHMC5883L.ino

    // HMC5883L Triple Axis Digital Compass
    // Setup HMC5883L
    void isSetupHMC5883L(){
    
      // Initialize Initialize HMC5883L
      compass.begin();
    
      // Set measurement range
      compass.setRange(HMC5883L_RANGE_1_3GA);
    
      // Set measurement mode
      compass.setMeasurementMode(HMC5883L_CONTINOUS);
    
      // Set data rate
      compass.setDataRate(HMC5883L_DATARATE_30HZ);
    
      // Set number of samples averaged
      compass.setSamples(HMC5883L_SAMPLES_8);
    
      // Set calibration offset
      compass.setOffset(0, 0);
      
    }
    // Compass HMC5883L
    void isHMC5883L(){
    
      // Vector norm
      Vector norm = compass.readNormalize();
    
      // Calculate heading
      heading = atan2(norm.YAxis, norm.XAxis);
    
      // Set declination angle on your location and fix heading
      // You can find your declination on: http://magnetic-declination.com/
      // (+) Positive or (-) for negative
      // Latitude: 32° 39' 7.9" N
      // Longitude: 115° 28' 6.2" W
      // Magnetic Declination: +10° 35'
      // Declination is POSITIVE (EAST)
      // Inclination: 58° 4'
      // Magnetic field strength: 45759.1 nT
      // Formula: (deg + (min / 60.0)) / (180 / M_PI);
      float declinationAngle = (10.0 + (35.0 / 60.0)) / (180 / M_PI);
      heading += declinationAngle;
    
      // Correct for heading < 0deg and heading > 360deg
      if (heading < 0)
      {
        heading += 2 * PI;
      }
    
      if (heading > 2 * PI)
      {
        heading -= 2 * PI;
      }
    
      // Convert to degrees
      headingDegrees = heading * 180/M_PI; 
    
    }
    

    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("SD");
      // 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 );
    
    }
    // Accelemeter and Compass, ADXL345 and HMC5883L
    void isDisplayADXL345HMC5883L(){
    
      // 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);
      // Accelemeter ADXL345
      screen.setCursor(0, 30);
      screen.println("Accelemeter ADXL345");
      // Accelemeter ADXL345 X
      screen.setCursor(0, 60);
      screen.println("X: ");
      screen.setCursor(40, 60);
      screen.println( x );
      // Accelemeter ADXL345 Y
      screen.setCursor(0, 90);
      screen.println( "Y: " );
      screen.setCursor(40, 90);
      screen.println( y );
      // Accelemeter ADXL345 Z
      screen.setCursor(0, 120);
      screen.println( "Z: " );
      screen.setCursor(40, 120);
      screen.println( z );
      // Compass HMC5883L
      screen.setCursor(0, 150);
      screen.println( "Compass HMC5883L" );
      // Heading
      screen.setCursor(0, 180);
      screen.println( "Heading = " );
      screen.setCursor(130, 180);
      screen.println( heading );
      // Degress
      screen.setCursor(0, 210);
      screen.println( "Degress = " );
      screen.setCursor(130, 210);
      screen.println( headingDegrees );
      
    }
    

    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
    // Setup GPS
    void isSetupGPS() {
    
      // Setup GPS
      tGPS.begin(  9600 , SERIAL_8N1 , gpsRXPIN , gpsTXPIN );
      
    }
    // isGPS
    void isGPS(){
    
      // Receives NEMA data from GPS receiver
      // This sketch displays information every time a new sentence is correctly encoded
      while ( tGPS.available() > 0)
        
        if (gps.encode( tGPS.read() ))
        {
         
           // GPS Vector Pointer Target
           displayInfo();
           // GPS Date, Time, Speed, Altitude
           displayDTS();
           
        }
      
      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";
        
      }
    
    }
    // GPS Date, Time, Speed, Altitude
    void displayDTS(){
    
      // Date
      TargetDat = ""; 
      if (gps.date.isValid())
      {
        
         // Date
         // Year
         TargetDat += String(gps.date.year(), DEC);
         TargetDat += "/";
         // Month
         TargetDat += String(gps.date.month(), DEC);
         TargetDat += "/";
         // Day
         TargetDat += String(gps.date.day(), DEC);
        
      }
    
      // Time
      TargetTim = "";
      if (gps.time.isValid())
      {
        
         // Time
         // Hour
         TargetTim += String(gps.time.hour(), DEC);
         TargetTim += ":";
         // Minute
         TargetTim += String(gps.time.minute(), DEC);
         TargetTim += ":";
         // Secound
         TargetTim += String(gps.time.second(), DEC);
        
      }
    
      // Speed
      TargetSMS = "";
      TargetSKH = "";
      if (gps.speed.isValid())
      {
        
         // Speed
         // M/S
         int x = gps.speed.mps();
         TargetSMS = String( x, DEC);
         // Km/h
         int y = gps.speed.kmph();
         TargetSKH = String( y, DEC);
    
      }
    
      // Altitude
      TargetALTM = "";
      TargetALTF = "";
      if (gps.altitude.isValid())
      {
        
         // Altitude
         // Meters
         int z = gps.altitude.meters();
         TargetALTM = String( z, DEC);
         // Feet
         int zz = gps.altitude.feet();
         TargetALTF = String( zz, DEC);
    
      }
    
    }
    

    getRTC.ino

    // RTC (Real-Time Clock)
    // Setup RTC
    void isSetupRTC(){
    
      // RTC (Real-Time Clock)
      rtc.begin();
      
      // RTC Lost Power
      if (rtc.lostPower()) {
     
        // When time needs to be set on a new device, or after a power loss, the
        // following line sets the RTC to the date & time this sketch was compiled
        rtc.adjust(DateTime(F(__DATE__), F(__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;
    
      // Temperature
      tempRTC = rtc.getTemperature();
    
    }
    

    getSD.ino

    // MicroSD Card
    // MicroSD Setup
    void isSetupSD() {
    
        // MicroSD Card
        pinMode( chipSelect , OUTPUT );
        if(!SD.begin( chipSelect )){
            ;  
            return;
        }
        
        uint8_t cardType = SD.cardType();
    
        // CARD NONE
        if(cardType == CARD_NONE){
            ; 
            return;
        }
    
        // SD Card Type
        if(cardType == CARD_MMC){
            ; 
        } else if(cardType == CARD_SD){
            ; 
        } else if(cardType == CARD_SDHC){
            ; 
        } else {
            ; 
        } 
    
        // Size
        uint64_t cardSize = SD.cardSize() / (1024 * 1024);
     
    }
    // MicroSD Card
    void isSD() {
    
      zzzzzz = "";
    
      //DLE|EEPROM Unique ID|Version|Date|Time|Temperature|
      //Accelerometer X|Accelerometer Y|Accelerometer Z|
      //Accelerometer X|Accelerometer Y|Accelerometer Z|
      //Compass Heading|Compass Degress|
      //GPS|Latitude|Longitude|GPS Date|GPS Time|
      //GPS Speed M/S|GPS Speed Km/h|
      //GPS Altitude Feet|GPS Altitude Meters|*\r
      zzzzzz = "DLE|" + uid + "|" + sver + "|" + String( dateRTC ) + "|" 
      + String( timeRTC ) + "|" + String( tempRTC ) + "|" 
      + String(x) + "|" + String(y) + "|" + String(z) + "|" 
      + String(ax) + "|" + String(ay) + "|" + String(az) + "|"
      + String( heading ) + "|" + String( headingDegrees ) + "|" 
      + String(GPSSt) + "|" + String(TargetLat) + "|" + String(TargetLon) + "|"
      + String(TargetDat) + "|" + String(TargetTim) + "|" 
      + String(TargetSMS) + "|" + String(TargetSKH) + "|"
      + String(TargetALTF) + "|" + String(TargetALTM)+ "|*\r";
    
      // msg + 1
      char msg[zzzzzz.length() + 1];
    
      zzzzzz.toCharArray(msg, zzzzzz.length() + 1);
    
      // Append File
      appendFile(SD, "/dledata.txt", msg );
    
      // FullString
      // ************
      FullString = "************\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
        
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
    
      // FullString
      // zzzzzz
      FullString = zzzzzz;
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
    
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
    
      
    }
    // List Dir
    void listDir(fs::FS &fs, const char * dirname, uint8_t levels){
        
        // List Dir
        dirname;
        
        File root = fs.open(dirname);
        
        if(!root){
            return;
        }
        
        if(!root.isDirectory()){
            return;
        }
    
        File file = root.openNextFile();
        
        while(file){
            if(file.isDirectory()){
                file.name();
                if(levels){
                    listDir(fs, file.name(), levels -1);
                }
            } else {
                file.name();
                file.size();
            }
            file = root.openNextFile();
        }
        
    }
    // Write File
    void writeFile(fs::FS &fs, const char * path, const char * message){
        
        // Write File
        path;
        
        File file = fs.open(path, FILE_WRITE);
        
        if(!file){
            return;
        }
        
        if(file.print(message)){
            ;  
        } else {
            ;  
        }
        
        file.close();
        
    }
    // Append File
    void appendFile(fs::FS &fs, const char * path, const char * message){
        
        // Append File
        path;
        
        File file = fs.open(path, FILE_APPEND);
        
        if(!file){
            return;
        }
        
        if(file.print(message)){
            ;  
        } else {
            ;  
        }
        
        file.close();
        
    }
    

    setup.ino

    // Setup
    void setup()
    {
     
      // Serial Begin
      Serial.begin(115200);
      Serial.println("Starting BLE work!");
    
      // Bluetooth Serial
      SerialBT.begin("DL2502Mk05");
      Serial.println("Bluetooth Started! Ready to pair...");
    
      // Delay
      delay( 100 );
    
      // EEPROM Size
      EEPROM.begin(EEPROM_SIZE);
      
      // EEPROM Unique ID
      isUID();
      
      // Delay
      delay(100);
    
      // Wire
      Wire.begin();
    
      // Delay
      delay(100);
      
      // Setup RTC
      isSetupRTC();
      
      // Delay
      delay(100);
    
      //MicroSD Card
      isSetupSD();
    
      // Delay
      delay(100);
      
      // DFRobot Display 240x320
      screen.begin();
    
      // Delay
      delay(100);
    
      // Setup Accelemeter ADXL345
      isSetupADXL345();
    
      // Setup HMC5883L
      isSetupHMC5883L();
    
      // Delay
      delay( 100 );
    
      // GPS Receiver
      // Setup GPS
      isSetupGPS();
    
      // Delay
      delay( 100 );
    
      // iLED Red
      pinMode(iLED, OUTPUT);
    
      // LED Red LOW
      digitalWrite(iLED, LOW);
    
      // Delay
      delay( 100 );
    
      // Switch
      pinMode(iSwitch,INPUT);
    
      // 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

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

    • 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 – 2025
    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 #25 – Movement – GPS Receiver – Mk11

    ——

    #DonLucElectronics #DonLuc #GPS #RTC #EEPROM #Compass #Accelerometer #Movement #ESP32 #Bluetooth #Elecrow #DFRobot #Arduino #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant

    ——

    GPS Receiver

    ——

    GPS Receiver

    ——

    GPS Receiver

    ——

    Global Positioning System (GPS)

    The Global Positioning System (GPS) is a satellite-based radionavigation system owned by the United States government and operated by the United States Space Force. It is one of the global navigation satellite systems (GNSS) that provides geolocation and time information to a GPS receiver anywhere on or near the Earth where there is an unobstructed line of sight to four or more GPS satellites. Obstacles such as mountains and buildings block the relatively weak GPS signals.

    GPS Receiver – GP-20U7

    The GP-20U7 is a compact GPS receiver with a built-in high performances All-In-One GPS chipset. The GP-20U7 accurately provides position, velocity, and time readings as well possessing high sensitivity and tracking capabilities. Thanks to the low power consumption this receiver requires, the GP-20U7 is ideal for portable applications such as tablet PCs, smart phones, and other devices requiring positioning capability.

    DL2502Mk03

    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 Crowtail – I2C Hub 2.0
    1 x GPS Receiver – GP-20U7
    1 x Adafruit DS3231 Precision RTC FeatherWing
    1 x CR1220 Battery
    1 x Crowtail – 3-Axis Digital Compass
    1 x Crowtail – 3-Axis Digital Accelerometer
    1 x Lithium Ion Battery – 1000mAh
    1 x Switch
    1 x Bluetooth Serial Terminal
    1 x USB 3.1 Cable A to C

    FireBeetle 2 ESP32-E

    SCL – 22
    SDA – 21
    GPR – 0
    GPT – 2
    DC – D2
    CS – D6
    RST – D3
    RX2 – Bluetooth
    TX2 – Bluetooth
    VIN – +3.3V
    GND – GND

    DL2502Mk03p

    DL2502Mk03p.ino

    /****** Don Luc Electronics © ******
    Software Version Information
    Project #25 - Movement - GPS Receiver - Mk11
    25-11
    DL2502Mk03p.ino
    DL2502Mk03
    1 x DFRobot FireBeetle 2 ESP32-E
    1 x Fermion: 2.0" 320x240 IPS TFT LCD
    1 x GDL Line 10 CM
    1 x Crowtail - I2C Hub 2.0
    1 x GPS Receiver - GP-20U7
    1 x Adafruit DS3231 Precision RTC FeatherWing
    1 x CR1220 Battery
    1 x Crowtail - 3-Axis Digital Compass
    1 x Crowtail - 3-Axis Digital Accelerometer
    1 x Lithium Ion Battery - 1000mAh
    1 x Switch
    1 x Bluetooth Serial Terminal
    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>
    // Bluetooth Serial
    #include "BluetoothSerial.h"
    #if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
    #error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
    #endif
    // Accelemeter ADXL345
    #include <ADXL345.h>
    // Compass HMC5883L
    #include <HMC5883L.h>
    // RTC (Real-Time Clock)
    #include "RTClib.h"
    // GPS Receiver
    #include <TinyGPS++.h>
    // ESP32 Hardware Serial
    #include <HardwareSerial.h>
    
    // ESP32 HardwareSerial
    HardwareSerial tGPS(1);
    
    // GPS Receiver
    #define gpsRXPIN 0
    // This one is unused and doesnt have a conection
    #define gpsTXPIN 2
    // The TinyGPS++ object
    TinyGPSPlus gps;
    // Latitude
    float TargetLat;
    // Longitude
    float TargetLon;
    // GPS Date, Time, Speed, Altitude
    // GPS Date
    String TargetDat;
    // GPS Time
    String TargetTim;
    // GPS Speeds M/S
    String TargetSMS;
    // GPS Speeds Km/h
    String TargetSKH;
    // GPS Altitude Meters
    String TargetALTM;
    // GPS Altitude Feet
    String TargetALTF;
    // GPS Status
    String GPSSt = "";
    
    // RTC (Real-Time Clock)
    RTC_DS3231 rtc;
    String dateRTC = "";
    String timeRTC = "";
    
    // Compass HMC5883L
    HMC5883L compass;
    // Heading
    float heading;
    // Heading Degrees
    float headingDegrees;
    
    // Variable ADXL345 library
    ADXL345 adxl;
    // Accelerometer ADXL345
    // x, y, z
    int x;
    int y;
    int z;
    // Standard Gravity
    // xyz
    double xyz[3];
    double ax;
    double ay;
    double az;
    
    // FullString
    String FullString = "";
    
    // Bluetooth Serial
    BluetoothSerial SerialBT;
    
    // 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 = "25-11";
    
    void loop() {
    
    
      // Accelemeter ADXL345
      isADXL345();
    
      // Compass HMC5883L
      isHMC5883L();
    
      // isEEPROM
      isEEPROM();
    
      // RTC (Real-Time Clock)
      isRTC();
    
      // isGPS
      isGPS();
    
      // Accelemeter ADXL345 Compass HMC5883L Display
      isDisplayADXL345HMC5883L();
    
      // Delay 0.5 Second
      delay( 500 );
    
    }
    

    getAccelemeterADXL345.ino

    // Accelemeter ADXL345
    // Setup Accelemeter ADXL345
    void isSetupADXL345(){
    
      // Power On
      adxl.powerOn();
    
      // Set activity inactivity thresholds (0-255)
      // 62.5mg per increment
      adxl.setActivityThreshold(75);
      // 62.5mg per increment
      adxl.setInactivityThreshold(75);
      // How many seconds of no activity is inactive?
      adxl.setTimeInactivity(10);
     
      //look of activity movement on this axes - 1 == on; 0 == off 
      adxl.setActivityX(1);
      adxl.setActivityY(1);
      adxl.setActivityZ(1);
     
      //look of inactivity movement on this axes - 1 == on; 0 == off
      adxl.setInactivityX(1);
      adxl.setInactivityY(1);
      adxl.setInactivityZ(1);
     
      // Look of tap movement on this axes - 1 == on; 0 == off
      adxl.setTapDetectionOnX(0);
      adxl.setTapDetectionOnY(0);
      adxl.setTapDetectionOnZ(1);
     
      // Set values for what is a tap, and what is a double tap (0-255)
      // 62.5mg per increment
      adxl.setTapThreshold(50);
      // 625us per increment
      adxl.setTapDuration(15);
      // 1.25ms per increment
      adxl.setDoubleTapLatency(80);
      // 1.25ms per increment
      adxl.setDoubleTapWindow(200);
     
      // set values for what is considered freefall (0-255)
      // (5 - 9) recommended - 62.5mg per increment
      adxl.setFreeFallThreshold(7);
      // (20 - 70) recommended - 5ms per increment
      adxl.setFreeFallDuration(45);
     
      // Setting all interrupts to take place on int pin 1
      // I had issues with int pin 2, was unable to reset it
      adxl.setInterruptMapping( ADXL345_INT_SINGLE_TAP_BIT,   ADXL345_INT1_PIN );
      adxl.setInterruptMapping( ADXL345_INT_DOUBLE_TAP_BIT,   ADXL345_INT1_PIN );
      adxl.setInterruptMapping( ADXL345_INT_FREE_FALL_BIT,    ADXL345_INT1_PIN );
      adxl.setInterruptMapping( ADXL345_INT_ACTIVITY_BIT,     ADXL345_INT1_PIN );
      adxl.setInterruptMapping( ADXL345_INT_INACTIVITY_BIT,   ADXL345_INT1_PIN );
     
      // Register interrupt actions - 1 == on; 0 == off  
      adxl.setInterrupt( ADXL345_INT_SINGLE_TAP_BIT, 1);
      adxl.setInterrupt( ADXL345_INT_DOUBLE_TAP_BIT, 1);
      adxl.setInterrupt( ADXL345_INT_FREE_FALL_BIT,  1);
      adxl.setInterrupt( ADXL345_INT_ACTIVITY_BIT,   1);
      adxl.setInterrupt( ADXL345_INT_INACTIVITY_BIT, 1);
    
    }
    // Accelemeter ADXL345
    void isADXL345(){
    
      // Read the accelerometer values and store them in variables  x,y,z
      adxl.readXYZ(&x, &y, &z);
    
      // Output
      // FullString
      // ************
      FullString = "************\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
        
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
           
      }
      
      // FullString
      FullString = "Values of X , Y , Z: " + String(x) + " , " + 
      String(y) + " , " + String(z) + + "\r\n";
    
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
    
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
      
      // Standard Gravity
      // Acceleration
      adxl.getAcceleration(xyz);
    
      // Output
      ax = xyz[0];
      ay = xyz[1];
      az = xyz[2];
      
      // FullString
      // ************
      FullString = "************\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
        
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
           
      }
    
      // FullString
      // xg
      FullString = "X = " + String(ax) + " g" + "\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
    
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
      // yg
      FullString = "y = " + String(ay) + " g" + "\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
    
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
      // zg
      FullString = "z = " + String(az) + " g" + "\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
    
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
    
    }
    

    getCompassHMC5883L.ino

    // HMC5883L Triple Axis Digital Compass
    // Setup HMC5883L
    void isSetupHMC5883L(){
    
      // Initialize Initialize HMC5883L
      compass.begin();
    
      // Set measurement range
      compass.setRange(HMC5883L_RANGE_1_3GA);
    
      // Set measurement mode
      compass.setMeasurementMode(HMC5883L_CONTINOUS);
    
      // Set data rate
      compass.setDataRate(HMC5883L_DATARATE_30HZ);
    
      // Set number of samples averaged
      compass.setSamples(HMC5883L_SAMPLES_8);
    
      // Set calibration offset
      compass.setOffset(0, 0);
      
    }
    // Compass HMC5883L
    void isHMC5883L(){
    
      // Vector norm
      Vector norm = compass.readNormalize();
    
      // Calculate heading
      heading = atan2(norm.YAxis, norm.XAxis);
    
      // Set declination angle on your location and fix heading
      // You can find your declination on: http://magnetic-declination.com/
      // (+) Positive or (-) for negative
      // Latitude: 32° 39' 7.9" N
      // Longitude: 115° 28' 6.2" W
      // Magnetic Declination: +10° 35'
      // Declination is POSITIVE (EAST)
      // Inclination: 58° 4'
      // Magnetic field strength: 45759.1 nT
      // Formula: (deg + (min / 60.0)) / (180 / M_PI);
      float declinationAngle = (10.0 + (35.0 / 60.0)) / (180 / M_PI);
      heading += declinationAngle;
    
      // Correct for heading < 0deg and heading > 360deg
      if (heading < 0)
      {
        heading += 2 * PI;
      }
    
      if (heading > 2 * PI)
      {
        heading -= 2 * PI;
      }
    
      // Convert to degrees
      headingDegrees = heading * 180/M_PI; 
    
      // Output
      // FullString
      // ************
      FullString = "************\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
        
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
    
      // FullString
      // Heading
      FullString = "Heading = " + String( heading ) + "\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
    
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
    
      // FullString
      // Degress
      FullString = "Degress = " + String( headingDegrees ) + "\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
    
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
      
    }
    

    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");
      // GPS Receiver
      screen.setCursor(0, 60);
      screen.println("GPS Receiver");
      // 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 );
    
    }
    // Accelemeter and Compass, ADXL345 and HMC5883L
    void isDisplayADXL345HMC5883L(){
    
      // 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);
      // Accelemeter ADXL345
      screen.setCursor(0, 30);
      screen.println("Accelemeter ADXL345");
      // Accelemeter ADXL345 X
      screen.setCursor(0, 60);
      screen.println("X: ");
      screen.setCursor(40, 60);
      screen.println( x );
      // Accelemeter ADXL345 Y
      screen.setCursor(0, 90);
      screen.println( "Y: " );
      screen.setCursor(40, 90);
      screen.println( y );
      // Accelemeter ADXL345 Z
      screen.setCursor(0, 120);
      screen.println( "Z: " );
      screen.setCursor(40, 120);
      screen.println( z );
      // Compass HMC5883L
      screen.setCursor(0, 150);
      screen.println( "Compass HMC5883L" );
      // Heading
      screen.setCursor(0, 180);
      screen.println( "Heading = " );
      screen.setCursor(130, 180);
      screen.println( heading );
      // Degress
      screen.setCursor(0, 210);
      screen.println( "Degress = " );
      screen.setCursor(130, 210);
      screen.println( headingDegrees );
      
    }
    

    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));
      }
      
    }
    // isEEPROM
    void isEEPROM(){
    
      // FullString
      // ************
      FullString = "************\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
        
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
    
      // FullString
      // EEPROM
      FullString = "EEPROM = " + String( uid ) + "\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
    
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
      
    }
    

    getGPS.ino

    // GPS Receiver
    // Setup GPS
    void isSetupGPS() {
    
      // Setup GPS
      tGPS.begin(  9600 , SERIAL_8N1 , gpsRXPIN , gpsTXPIN );
      
    }
    // isGPS
    void isGPS(){
    
      // Receives NEMA data from GPS receiver
      // This sketch displays information every time a new sentence is correctly encoded
      while ( tGPS.available() > 0)
        
        if (gps.encode( tGPS.read() ))
        {
         
           // GPS Vector Pointer Target
           displayInfo();
           // GPS Date, Time, Speed, Altitude
           displayDTS();
           
        }
      
      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";
        
      }
    
      // FullString
      // ************
      FullString = "************\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
        
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
    
      // FullString
      // Latitude
      FullString = "Latitude = " + String( TargetLat ) + "\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
    
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
    
      // FullString
      // Longitude
      FullString = "Longitude = " + String( TargetLon ) + "\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
    
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
    
      // FullString
      // GPS Status
      FullString = "GPS Status = " + String( GPSSt ) + "\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
    
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
    
    
    }
    // GPS Date, Time, Speed, Altitude
    void displayDTS(){
    
      // FullString
      // ************
      FullString = "************\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
        
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
      
      // Date
      TargetDat = ""; 
      if (gps.date.isValid())
      {
        
         // Date
         // Year
         TargetDat += String(gps.date.year(), DEC);
         TargetDat += "/";
         // Month
         TargetDat += String(gps.date.month(), DEC);
         TargetDat += "/";
         // Day
         TargetDat += String(gps.date.day(), DEC);
        
      }
    
      // Date
      FullString = "Date = " + String( TargetDat ) + "\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
    
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
      
      // Time
      TargetTim = "";
      if (gps.time.isValid())
      {
        
         // Time
         // Hour
         TargetTim += String(gps.time.hour(), DEC);
         TargetTim += ":";
         // Minute
         TargetTim += String(gps.time.minute(), DEC);
         TargetTim += ":";
         // Secound
         TargetTim += String(gps.time.second(), DEC);
        
      }
    
      // FullString
      // Time
      FullString = "Time = " + String( TargetTim ) + "\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
    
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
      
      // Speed
      TargetSMS = "";
      TargetSKH = "";
      if (gps.speed.isValid())
      {
        
         // Speed
         // M/S
         int x = gps.speed.mps();
         TargetSMS = String( x, DEC);
         // Km/h
         int y = gps.speed.kmph();
         TargetSKH = String( y, DEC);
    
      }
    
      // FullString
      // GPS Speeds M/S
      FullString = "GPS Speeds M/S = " + String( TargetSMS ) + "\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
    
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
    
      // FullString
      // GPS Speeds Km/h
      FullString = "GPS Speeds Km/h = " + String( TargetSKH ) + "\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
    
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
      
      // Altitude
      TargetALTM = "";
      TargetALTF = "";
      if (gps.altitude.isValid())
      {
        
         // Altitude
         // Meters
         int z = gps.altitude.meters();
         TargetALTM = String( z, DEC);
         // Feet
         int zz = gps.altitude.feet();
         TargetALTF = String( zz, DEC);
    
      }
    
      // FullString
      //GPS Altitude Meters
      FullString = "GPS Altitude Meters = " + String( TargetALTM ) + "\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
    
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
    
      // FullString
      // GPS Altitude Feet
      FullString = "GPS Altitude Feet = " + String( TargetALTF ) + "\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
    
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
      
    }
    

    getRTC.ino

    // RTC (Real-Time Clock)
    // Setup RTC
    void isSetupRTC(){
    
      // RTC (Real-Time Clock)
      rtc.begin();
      
      // RTC Lost Power
      if (rtc.lostPower()) {
     
        // When time needs to be set on a new device, or after a power loss, the
        // following line sets the RTC to the date & time this sketch was compiled
        rtc.adjust(DateTime(F(__DATE__), F(__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;
    
      // FullString
      // ************
      FullString = "************\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
        
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
    
      // FullString
      // Date
      FullString = "Date = " + String( timeRTC ) + "\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
    
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
    
      // FullString
      // Time
      FullString = "Time = " + String( dateRTC ) + "\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
    
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
    
      // FullString
      // Temperature
      FullString = "Temperature = " + String( rtc.getTemperature() ) 
      + String( " C" ) + "\r\n";
      // FullString Bluetooth Serial + Serial
      for(int i = 0; i < FullString.length(); i++)
      {
    
        // Bluetooth Serial
        SerialBT.write(FullString.c_str()[i]);
        // Serial
        Serial.write(FullString.c_str()[i]);
        
      }
    
    }
    

    setup.ino

    // Setup
    void setup()
    {
     
      // Serial Begin
      Serial.begin(115200);
      Serial.println("Starting BLE work!");
    
      // Bluetooth Serial
      SerialBT.begin("DL2502Mk03");
      Serial.println("Bluetooth Started! Ready to pair...");
    
      // Delay
      delay( 100 );
    
      // EEPROM Size
      EEPROM.begin(EEPROM_SIZE);
      
      // EEPROM Unique ID
      isUID();
      
      // Delay
      delay(100);
    
      // Wire
      Wire.begin();
    
      // Delay
      delay(100);
      
      // Setup RTC
      isSetupRTC();
      
      // Delay
      delay(100);
      
      // DFRobot Display 240x320
      screen.begin();
    
      // Delay
      delay(100);
    
      // Setup Accelemeter ADXL345
      isSetupADXL345();
    
      // Setup HMC5883L
      isSetupHMC5883L();
    
      // Delay
      delay( 100 );
    
      // GPS Receiver
      // Setup GPS
      isSetupGPS();
    
      // 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

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

    • 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 – 2025
    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

    1 2 3 48
    Categories
    Archives