Project #16: Sound – ESP32 – Mk27

——

#DonLucElectronics #DonLuc #MiniMP3Player #FireBeetle2ESP32E #ESP32 #DFRobot #Display #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

ESP32

——

ESP32

——

ESP32

——

FireBeetle 2 ESP32-E

FireBeetle 2 ESP32-E, specially designed for IoT, is an ESP-WROOM-32E-based main controller board with dual-core chips. FireBeetle 2 ESP32-E supports Arduino programming, support Scratch graphical programming and MicroPython programming. We provide you with detailed online tutorials and application cases, and there are thousands of sensors with welding-free Gravity interfaces and actuators to help you get started easily. Besides, the stamp hole design makes it able to be easily embedded in your PCB, greatly saving your costs and time to build and test a prototype.

Gravity: Digital Push Button (Red)

Digital push button with LED, wide voltage range, durable design, and easy plug-and-play functionality. Comes with a cable and features a gold surface.

Gravity: Analog Rotation Potentiometer Sensor

This Arduino-compatible rotation potentiometer rotates 300 degrees, allowing easy interaction and MIDI production with expansion boards; works on 3.3V-5V.

MP3

1.mp3 – William Shakespeare
2.mp3 – Albert Einstein
3.mp3 – Luc Paquin
4.mp3 – Carl Sagan
5.mp3 – Dalek

DL2510Mk03

1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: 2.0″ 320×240 IPS TFT LCD
1 x GDL Line 10 CM
1 x Gravity: IO Shield for FireBeetle 2
1 x Mini MP3 Player
1 x 1K Ohm Resistor
1 x Speaker
1 x Gravity: Analog Rotation Potentiometer
1 x Gravity: Digital Push Button (Red)
1 x Lithium Ion Battery – 1000mAh
1 x Switch
1 x SPDT Slide Switch
1 x USB-A to Micro-B Cable

DL2510Mk03p

DL2510Mk03p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #16: Sound – ESP32 – Mk27
16-27
DL2509Mk03p.ino
DL2509Mk03
1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: 2.0" 320x240 IPS TFT LCD
1 x GDL Line 10 CM
1 x Gravity: IO Shield for FireBeetle 2
1 x Mini MP3 Player
1 x 1K Ohm Resistor
1 x Gravity: Analog Rotation Potentiometer
1 x Gravity: Digital Push Button (Red)
1 x Speaker
1 x Lithium Ion Battery - 1000mAh
1 x Switch
1 x SPDT Slide Switch
1 x USB-A to Micro-B Cable
*/

// Include the Library Code
// EEPROM Library to Read and Write EEPROM
// with Unique ID for Unit
#include "EEPROM.h"
// Arduino
#include "Arduino.h"
// DFRobot Display GDL API
#include <DFRobot_GDL.h>
// DFRobot DFPlayer Mini
#include "DFRobotDFPlayerMini.h"

// FPSerial
#define FPSerial Serial1

// DFRobot DFPlayer Mini
DFRobotDFPlayerMini myDFPlayer;

// Button R
int iButR = D12;
int iValR;

// Volume Potentiometer
int iVolPot = A0;
int iValV;

// 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 = "16-27";

void loop() {
  
  // isMP3
  isMP3();

  // isDisplayMP3
  isDisplayMP3();

  // Delay
  delay( 200 );
  
}

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("GDFPlayer Mini");
  // 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 );

}
// isDisplayMP3
void isDisplayMP3(){

  // DFRobot Display 240x320
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => white
  screen.fillScreen(0xffff);
  // Text Color => blue
  screen.setTextColor(0x001F);
  // Font => Free Sans Bold 12pt
  screen.setFont(&FreeSansBold12pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // Geiger
  screen.setCursor(0, 30);
  screen.println("MP3");
  // 1.mp3 - William Shakespeare
  screen.setCursor(0, 60);
  screen.println("1.mp3 - William Shakespeare");
  // 2.mp3 - Albert Einstein
  screen.setCursor(0, 90);
  screen.println( "2.mp3 - Albert Einstein" );
  // 3.mp3 - Luc Paquin
  screen.setCursor(0, 120);
  screen.println( "3.mp3 - Luc Paquin" );
// 4.mp3 - Carl Sagan
  screen.setCursor(0, 150);
  screen.println( "4.mp3 - Carl Sagan" );
 // 5.mp3 - Dalek
  screen.setCursor(0, 180);
  screen.println( "5.mp3 - Dalek" );
  
}

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

}

getMiniMP3.ino

// Mini MP3
// isSetupMP3
void isSetupMP3(){

  // Mini MP3
  // isACK
  // doReset
  myDFPlayer.begin(FPSerial, true, true);

  // Set serial communictaion time out 500ms
  myDFPlayer.setTimeOut(500);
  
}
// isMP3
void isMP3(){
  
  // Volume Potentiometer
  iValV = analogRead(iVolPot);
  
  // Mapping function
  iValV = map(iValV, 0, 4095, 0, 30);

  // Set volume value. From 0 to 30
  myDFPlayer.volume( iValV );

  // iValR
  iValR = digitalRead(iButR);

  // Check high iButR is pressed down.
  if (iValR == HIGH) { 

    // Play next mp3
    myDFPlayer.next();

  }
  
}

setup.ino

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

  // EEPROM Size
  EEPROM.begin(EEPROM_SIZE);

  // EEPROM Unique ID
  isUID();

  // Delay
  delay( 100 );

  // FPSerial
  // rx
  // tx
  FPSerial.begin(9600, SERIAL_8N1, D7, D5);

  // Delay
  delay( 100 );

  // Button R
  pinMode(iButR, INPUT);

  // Delay
  delay(100);

  // isSetupMP3
  isSetupMP3();

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

  // Delay
  delay(100);

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

  // Delay 5 Second
  delay( 5000 );

  

}

——

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

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

  • Programming Language
  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
  • IoT
  • Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
  • Robotics
  • Automation
  • Camera and Video Capture Receiver Stationary, Wheel/Tank , Underwater and UAV Vehicle
  • Unmanned Vehicles Terrestrial, Marine and UAV
  • Machine Learning
  • Artificial Intelligence (AI)
  • RTOS
  • Sensors, eHealth Sensors, Biosensor, and Biometric
  • Research & Development (R & D)
  • Consulting

Follow Us

Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
DFRobot: https://learn.dfrobot.com/user-10186.html
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin8
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

Project #16: Sound – Mini MP3 Player – Mk26

——

#DonLucElectronics #DonLuc #MiniMP3Player #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

Mini MP3 Player

——

Mini MP3 Player

——

Mini MP3 Player

——

Mini MP3 Player

Mini MP3 Player is a compact and inexpensive MP3 module that can be connected directly to the speaker. The module can be used alone with a battery power supply, speaker, and keypad, or through the serial port control, as the Arduino UNO compatible board or any microcontroller with a serial port module. The module itself perfectly integrated hardware decodes MP3, WAV, and WMA’s. The software supports TF card drivers to support FAT16, FAT32 file systems. This can be done by the simple serial command that plays the specified music, as well as how to play music and other functions, easy to use, stable and reliable.

Play next MP3 every 8 second.

1.mp3 – William Shakespeare
2.mp3 – Albert Einstein
3.mp3 – Luc Paquin
4.mp3 – Carl Sagan
5.mp3 – Dalek

DL2510Mk02

1 x SparkFun RedBoard Qwiic
1 x Mini MP3 Player
1 x Speaker
1 x USB Battery Pack
1 x USB-A to Micro-B Cable

DL2510Mk02p

DL2510Mk02p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #16: Sound – Mini MP3 Player – Mk26
16-26
DL2509Mk02p.ino
DL2509Mk02
1 x SparkFun RedBoard Qwiic
1 x Mini MP3 Player
1 x Speaker
1 x USB Battery Pack
1 x USB-A to Micro-B Cable
*/

// Include the Library Code
// EEPROM Library to Read and Write EEPROM
// with Unique ID for Unit
#include "EEPROM.h"
// Arduino
#include "Arduino.h"
// Software Serial
#include "SoftwareSerial.h"
// DFRobot DFPlayer Mini
#include "DFRobotDFPlayerMini.h"

// Software Serial RX, TX
SoftwareSerial mySoftwareSerial(10, 11);
// DFRobot DFPlayer Mini
DFRobotDFPlayerMini myDFPlayer;

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

// Software Version Information
String sver = "16-26";

void loop() {
  
  // isMP3
  isMP3();

}

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

}

getMiniMP3.ino

// Mini MP3
// isSetupMP3
void isSetupMP3(){

  // Mini MP3
  myDFPlayer.begin(mySoftwareSerial);
  
  // Set volume value. From 0 to 30
  myDFPlayer.volume(20);
  
  // Play the first MP3
  myDFPlayer.play(1);
  
}
// isMP3
void isMP3(){
  
  // Timer
  static unsigned long timer = millis();
  
  // isMp3
  if (millis() - timer > 8000) {
    
    // Time
    timer = millis();
    
    // Play next mp3 every 8 second
    myDFPlayer.next();

  }

  myDFPlayer.available();
  
}

setup.ino

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

  // EEPROM Unique ID
  isUID();

  // Delay
  delay( 100 );

  // Software Serial
  mySoftwareSerial.begin(9600);

  // Delay
  delay( 100 );

  // isSetupMP3
  isSetupMP3();
    
  // Delay 1 Second
  delay( 1000 );

}

——

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

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

  • Programming Language
  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
  • IoT
  • Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
  • Robotics
  • Automation
  • Camera and Video Capture Receiver Stationary, Wheel/Tank , Underwater and UAV Vehicle
  • Unmanned Vehicles Terrestrial, Marine and UAV
  • Machine Learning
  • Artificial Intelligence (AI)
  • RTOS
  • Sensors, eHealth Sensors, Biosensor, and Biometric
  • Research & Development (R & D)
  • Consulting

Follow Us

Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
DFRobot: https://learn.dfrobot.com/user-10186.html
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin8
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

Project #14: Components – Laser Pointer – Mk22

——

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

——

Laser Pointer

——

Laser Pointer

——

Laser Pointer

——

Crowtail – Laser Pointer 2.0

A change of Laser Pointer is that we make it compatible with Crowtail base board, you can use it more easier than before. This laser pointer or laser pen is a small handheld device with a laser diode emitting a very narrow coherent low-powered laser beam of visible light, it is frequently used in lecture halls and demonstrations to point at topics of interest on a presentation board. In a school setting, they have become ubiquitous, and they are very useful teaching aids. Please note that DO NOT Point this module to eyes directly, It may cause some blindness, glare and afterimages. Application Idea: Pointing, Industrial and research use, Leisure and entertainment, Etc…

Features

  • Supply voltage: 5 Volt
  • Power: 5mW
  • Wavelength: 650nm

DL2507Mk02

1 x Crowduino Uno – SD
1 x Crowtail – Base Shield
1 x Crowtail – I2C LCD
1 x Crowtail – Laser Pointer 2.0
1 x Crowtail – Switch
1 x Crowtail – LED(Green)
1 x USB Battery Pack
1 x USB Mini-B Cable

Crowduino Uno – SD

SCL – A5
SDA – A4
SWI – 4
LAS – 5
LED – 6
VIN – +5V
GND – GND

DL2507Mk02p

DL2507Mk02p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #14: Components - Laser Pointer - Mk22
DL2507Mk02p.ino
DL2507Mk02
1 x Crowduino Uno - SD
1 x Crowtail - Base Shield
1 x Crowtail - I2C LCD
1 x Crowtail - Laser Pointer 2.0
1 x Crowtail - Switch
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"

// Laser Pointer
int iLaserPointer = 5;

// Switch
int iSwitch = 4;
String sO = "";

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

// LED Green
int iLEDGreen = 6;

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

// Software Version Information
String sver = "14-22";

void loop() {

  // Laser
  isLaser();

  // Display Laser
  isDisplayLaser();

  // Delay
  delay( 100 );

}

getDisplay.ino

// getDisplay
// Crowbits - OLED 128X64 UID
// Display UID
void isDisplayUID(){

  // Set up the LCD's number of rows and columns: 
  lcd.begin(16, 2);
  // Print a message to the LCD.
  // Cursor
  lcd.setCursor(0, 0);
  lcd.print("Don Luc Electron");
  // Cursor
  lcd.setCursor(0, 1);
  // Print a message to the LCD.
  lcd.print( sver );

}
// Display Laser
void isDisplayLaser(){

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

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

getLaser.ino

// Laser
// is Laser
void isLaser(){

 // Switch
 if(digitalRead(iSwitch)){
  
  // Laser Pointer
  digitalWrite(iLaserPointer, HIGH);
  // LED Green
  digitalWrite(iLEDGreen, HIGH);
  // On
  sO = "On";
  
 }
 else{

  // Laser Pointer
  digitalWrite(iLaserPointer, LOW);
  // LED Green
  digitalWrite(iLEDGreen, LOW);
  // Off
  sO = "Off";

 }

}

setup.ino

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

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

  // Delay
  delay(100);

  // Laser Pointer
  pinMode(iLaserPointer, OUTPUT); 

  // Delay
  delay( 100 );

  // Switch
  pinMode(iSwitch, OUTPUT);

  // Delay
  delay( 100 );

  // Display UID
  isDisplayUID();
  
  // Delay 10 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 – KY-039 – Mk32

——

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

——

KY-039

——

KY-039

——

KY-039

——

KY-039 Heartbeat Sensor Module

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

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

DL2506Mk04

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

Crowduino Uno – SD

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

DL2506Mk04p

DL2506Mk04p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #15: Environment - KY-039 - Mk31
DL2506Mk04p.ino
DL2506Mk04
1 x Crowduino Uno - SD
1 x Crowtail - Base Shield
1 x Crowtail - I2C LCD
1 x KY-039 Heartbeat Sensor Module
1 x Crowtail - LED(Green)
1 x USB Battery Pack
1 x USB Mini-B Cable
*/

// Include the Library Code
// EEPROM library to read and write EEPROM with unique ID for unit
#include <EEPROM.h>
// Wire
#include <Wire.h>
// Liquid Crystal
#include "LiquidCrystal.h"

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

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

// LED Green
int iLEDGreen = 6;

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

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

void loop() {

  // Heartbeat
  // isHeartbeat
  isHeartbeat();

  // Display Heartbeat
  isDisplayHeartbeat();

  // Delay
  delay( 100 );

}

getDisplay.ino

// getDisplay
// Crowbits - OLED 128X64 UID
// Display UID
void isDisplayUID(){

  // Set up the LCD's number of rows and columns: 
  lcd.begin(16, 2);
  // Print a message to the LCD.
  // Cursor
  lcd.setCursor(0, 0);
  lcd.print("Don Luc Electron");
  // Cursor
  lcd.setCursor(0, 1);
  // Print a message to the LCD.
  lcd.print( sver );

}
// Display Heartbeat
void isDisplayHeartbeat(){

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

getEEPROM.ino

// EEPROM
// isUID EEPROM Unique ID
void isUID() {
  
  // Is Unit ID
  uid = "";
  for (int x = 0; x < 7; x++)
  {
    uid = uid + char(EEPROM.read(x));
  }
  
}

getHeartbeat.ino

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

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

  }

  // Pulse
  pulse = sum / 200.00;

}

setup.ino

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

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

  // Delay
  delay(100);

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

  // Delay
  delay( 100 );

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

}

——

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

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

  • Programming Language
  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
  • IoT
  • Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
  • Robotics
  • Automation
  • Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
  • Unmanned Vehicles Terrestrial and Marine
  • Machine Learning
  • Artificial Intelligence (AI)
  • RTOS
  • Sensors, eHealth Sensors, Biosensor, and Biometric
  • Research & Development (R & D)
  • Consulting

Follow Us

Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Patreon: https://patreon.com/DonLucElectronics59
DFRobot: https://learn.dfrobot.com/user-10186.html
Hackster.io: https://www.hackster.io/neosteam-labs
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin8
Twitch: https://www.twitch.tv/lucpaquin
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

Project #15: Environment – Temperature and Humidity – Mk31

——

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

——

Temperature and Humidity

——

Temperature and Humidity

——

Temperature and Humidity

——

3.5” 320×480 ESP32 LCD Touch Display

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

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

Crowtail – Temperature and Humidity Sensor 2.0

This module can help you detect the temperature and humidity of the environment of your house. The module contains a DHT11 temperature and humidity sensor that is a complex sensor with a calibrated digital signal out. It uses digital module acquisition technology and the temperature and humidity sensor technology. The sensor consists of a resistance-type moisture element and an NTC temperature measuring element. Because of the single-wire serial interface, it is easy to use the module.

DL2506Mk02

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

3.5” ESP32 LCD Touch Display

DHT – 25
VIN – +3.3V
GND – GND

DL2506Mk02p

DL2506Mk02p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #15: Environment - Temperature and Humidity - Mk31
DL2506Mk02p.ino
DL2506Mk02
1 x 3.5” 320x480 ESP32 LCD Touch Display
1 x Crowtail - Temperature and Humidity Sensor 2.0
1 x USB Battery Pack
1 x USB 3.1 Cable A to C
*/

// Include the Library Code
// EEPROM library to read and write EEPROM with unique ID for unit
#include "EEPROM.h"
// TFT Display
#include <TFT_eSPI.h>
// SPI
#include <SPI.h>
// Temperature and Humidity
#include "DHT.h"

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

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

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

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

void loop() {

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

  // Display Temperature and Humidity
  isDisplayDHT();

  // Delay
  delay( 1000 );

}

getDHT.ino

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

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

getDisplay.ino

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

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

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

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

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

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

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

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

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

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

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

getEEPROM.ino

// EEPROM
// isUID EEPROM Unique ID
void isUID() {
  
  // Is Unit ID
  uid = "";
  for (int x = 0; x < 7; x++)
  {
    uid = uid + char(EEPROM.read(x));
  }
  
}

setup.ino

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

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

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

  // Delay
  delay(100);

  // Temperature and Humidity
  dht.begin();

  // Delay
  delay( 100 );

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

}

——

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

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

  • Programming Language
  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
  • IoT
  • Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
  • Robotics
  • Automation
  • Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
  • Unmanned Vehicles Terrestrial and Marine
  • Machine Learning
  • Artificial Intelligence (AI)
  • RTOS
  • Sensors, eHealth Sensors, Biosensor, and Biometric
  • Research & Development (R & D)
  • Consulting

Follow Us

Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Patreon: https://patreon.com/DonLucElectronics59
DFRobot: https://learn.dfrobot.com/user-10186.html
Hackster.io: https://www.hackster.io/neosteam-labs
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin8
Twitch: https://www.twitch.tv/lucpaquin
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

Project #15: Environment – Gas Sensor MQ3 – Mk30

——

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

——

Gas Sensor MQ3

——

Gas Sensor MQ3

——

Gas Sensor MQ3

——

Crowtail – Gas Sensor MQ3

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

Crowtail – LED Matrix 2.0 – (Red)

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

DL2505Mk05

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

Crowduino Uno – SD

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

DL2505Mk05p

DL2505Mk05p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #15: Environment - Gas Sensor MQ3 - Mk30
DL2505Mk05p.ino
DL2505Mk05
1 x Crowduino Uno - SD
1 x Crowtail - Base Shield
1 x Crowtail - I2C LCD
1 x Crowtail - Gas Sensor MQ3
1 x Crowtail - LED Matrix 2.0
1 x Crowtail - LED(Green)
1 x USB Battery Pack
1 x USB Mini-B Cable
*/

// Include the Library Code
// EEPROM library to read and write EEPROM with unique ID for unit
#include <EEPROM.h>
// Wire
#include <Wire.h>
// Liquid Crystal
#include "LiquidCrystal.h"
// Matrix Adafruit LED Backpack
#include "Adafruit_LEDBackpack.h"

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

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

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

// LED Green
int iLEDGreen = 6;

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

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

void loop() {

  // MQ3 Alcohol
  // isMQ3
  isMQ3();

  // Display Alcohol
  isDisplayAlcohol();

  // Delay
  delay( 2000 );

}

getDisplay.ino

// getDisplay
// Crowbits - OLED 128X64 UID
// Display UID
void isDisplayUID(){

  // Set up the LCD's number of rows and columns: 
  lcd.begin(16, 2);
  // Print a message to the LCD.
  // Cursor
  lcd.setCursor(0, 0);
  lcd.print("Don Luc Electron");
  // Cursor
  lcd.setCursor(0, 1);
  // Print a message to the LCD.
  lcd.print( sver );

}
// Display Alcohol
void isDisplayAlcohol(){

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

getEEPROM.ino

// EEPROM
// isUID EEPROM Unique ID
void isUID() {
  
  // Is Unit ID
  uid = "";
  for (int x = 0; x < 7; x++)
  {
    uid = uid + char(EEPROM.read(x));
  }
  
}

getMQ3.ino

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

  // MQ3 Alcohol
  MQ3Value = digitalRead(iMQ3Alcohol);

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

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

    
  } else {

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

  }

}

setup.ino

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

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

  // Delay
  delay(100);

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

  // Delay
  delay( 100 );

  // Display UID
  isDisplayUID();
  
  // Delay 5 Second
  delay( 5000 );

}

——

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

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

  • Programming Language
  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
  • IoT
  • Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
  • Robotics
  • Automation
  • Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
  • Unmanned Vehicles Terrestrial and Marine
  • Machine Learning
  • Artificial Intelligence (AI)
  • RTOS
  • Sensors, eHealth Sensors, Biosensor, and Biometric
  • Research & Development (R & D)
  • Consulting

Follow Us

Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Patreon: https://patreon.com/DonLucElectronics59
DFRobot: https://learn.dfrobot.com/user-10186.html
Hackster.io: https://www.hackster.io/neosteam-labs
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin8
Twitch: https://www.twitch.tv/lucpaquin
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

Project #12: Robotics – Vibration – Mk29

——

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

——

Vibration

——

Vibration

——

Vibration

——

Crowtail – Vibration Sensor 2.0

The Crowtail- Vibration Sensor is Used to trigger the effect of various vibration with normally closed type vibration sensor SW – 420. It is widely used to reported the theft alarm, intelligent car, earthquake alarm, motorcycle alarm, etc. This module is compared with the normally open type vibration sensor module, vibration trigger for longer periods of time, can drive the relay module.

  • 1. The product is not vibration, vibration switch is closed on state, output output low level, the green light is lit;
  • 2. When product vibration, the vibration switch instantaneous disconnection, output, output level green light is not bright;
  • 3. The output can be attached directly to the single chip microcomputer, through single chip microcomputer to detect the high and low level, thus to detect if there is a vibration environment, report to the police;

DL2505Mk01

1 x Crowduino Uno – SD
1 x Crowtail – Base Shield
1 x Crowtail – I2C LCD
1 x Crowtail – Vibration Sensor 2.0
1 x Crowtail – Buzzer 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
BUZ – 4
VIB – 5
LED – 6
VIN – +5V
GND – GND

DL2505Mk01p

DL2505Mk01p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #12: Robotics - Vibration - Mk29
DL2505Mk01p.ino
DL2505Mk01
1 x Crowduino Uno - SD
1 x Crowtail - Base Shield
1 x Crowtail - I2C LCD
1 x Crowtail - Vibration Sensor 2.0
1 x Crowtail - Buzzer 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"

// Vibration
int iVibrationPin = 5;
int iVibrationState = 0;
String ZZ = "";

// Buzzer
int iBuzzer =  4;

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

// LED Green
int iLEDGreen = 6;

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

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

void loop() {

  // isVibration
  isVibration();

  // Display Vibration
  isDisplayVibration();

  // Delay
  delay( 50 );

}

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 Vibration
void isDisplayVibration(){

  // Clear
  lcd.clear();
  // Set the cursor to column 0, line 0
  lcd.setCursor(0, 0);
  lcd.print( "Vibration" );
  // 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));
  }
  
}

getVibration.ino

// Vibration
// isVibration
void isVibration(){

  // Vibration
  iVibrationState = digitalRead(iVibrationPin);
  // Check if the vibration sensor is vibrating.
  // If it is, the vibrationState is LOW:
  if (iVibrationState == LOW) {     
       
    // Turn LED on:
    // LED Green
    digitalWrite(iLEDGreen, HIGH);  
    // Buzzer On
    digitalWrite(iBuzzer, HIGH);
    // High
    ZZ = "High";
    
  } else {
    
    // Turn LED off:
    digitalWrite(iLEDGreen, LOW);
    // Buzzer Off
    digitalWrite(iBuzzer, LOW); 
    // Low
    ZZ = "Low";
      
  }

}

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

  // Delay
  delay(100);

  // Vibration 
  pinMode(iVibrationPin, INPUT);
  
  // Buzzer
  pinMode(iBuzzer, OUTPUT);
  // Buzzer Off
  digitalWrite(iBuzzer, LOW);
  // Low
  ZZ = "Low";

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

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