Project #30 – UNIHIKER – Heart Rate Sensor – Mk16

——

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

——

Heart Rate Sensor

——

Heart Rate Sensor

—–

Heart Rate Sensor

——

Heart Rate Sensor

The DFRobot heart rate sensor is a thumb-sized heart rate monitor designed for microcontrollers. It includes a Gravity interface, for easy plug-and-play connectivity. This sensor is a pulse sensor which is developed based on PPG (PhotoPlethysmoGraphy) techniques. This is a simple and low-cost optical technique that can be used to detect blood volume changes in the microvascular bed of tissues. It is relatively easy to detect the pulsatile component of the cardiac cycle according to this theory. The sensor has two holes that you can use to attach to your belt. You can wrap on your finger, wrist, earlobe or other areas where it has contact with skin. The heart sensor has two kinds of signal output mode: analog pulse mode and digital square wave mode. You can change its output mode using the dial switch. There are many user scenarios, including education, sports or maker/interactive projects.

DL2506Mk03

1 x UNIHIKER K10
1 x Gravity: PPG Heart Rate Monitor Sensor
1 x Lithium Ion Battery – 1000mAh
1 x Switch
1 x USB 3.1 Cable A to C

DL2506Mk03p

DL2506Mk03p.mp

/****** Don Luc Electronics © ******
Software Version Information
Project #30 - UNIHIKER - Heart Rate Sensor - Mk16
DL2506Mk03p.mp
DL2506Mk03
1 x UNIHIKER K10
1 x Gravity: PPG Heart Rate Monitor Sensor
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"
// Gravity: PPG Heart Rate Monitor Sensor
#include <DFRobot_Heartrate.h>

// Create an object
UNIHIKER_K10  k10;
// Screen
uint8_t screen_dir=2;
// Gravity: PPG Heart Rate Monitor Sensor
DFRobot_Heartrate heartrate;

// Main program start
void setup() {
	
  // Begin
  k10.begin();
  // Init Screen
  k10.initScreen(screen_dir);
  // Canver
  k10.creatCanvas();
  // Gravity: PPG Heart Rate Monitor Sensor
  heartrate.begin(DIGITAL_MODE);
  // Image
  k10.canvas->canvasDrawBitmap(0,0,240,320,image_data1);

}
// Loop
void loop() {
	
  // Heart Rate Senso
  k10.canvas->canvasText("Heart Rate Sensor", 6, 0xFF0000);
  // BPM
  k10.canvas->canvasText("BPM", 7, 0xFF0000);
  // Heart Rate
  k10.canvas->canvasText(heartrate.getRate(P0), 8, 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 #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 #30 – UNIHIKER – AI-Face Recognition – Mk15

——

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

——

AI-Face Recognition

——

AI-Face Recognition

——

AI-Face Recognition

——

AI-Face Recognition

AI face recognition uses artificial intelligence and machine learning algorithms to identify individuals based on their facial features. Press button A to learn the face and green LED on; press button B to recognize the face and blue LED on, and display the recognized face ID on the K10 screen.

DL2506Mk01

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

DL2506Mk01p

DL2506Mk01p.mp

/****** Don Luc Electronics © ******
Software Version Information
Project #30 - UNIHIKER - AI-Face Recognition - Mk15
DL2506Mk01p.mp
DL2506Mk01
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"
// AT Recognition
#include "AIRecognition.h"

// Dynamic variables
// ID
String mind_s_ID;
// Function declaration
// Button A Pressed
void onButtonAPressed();
// Button B Pressed
void onButtonBPressed();

// Create an object
UNIHIKER_K10  k10;
// Screen
uint8_t screen_dir=2;
// AI Recognition
AIRecognition ai;

// Main program start
void setup() {
	
  // Begin
  k10.begin();
  // Init Screen
  k10.initScreen(screen_dir);
  // Init AI
  ai.initAi();
  // Init Camera Imager
  k10.initBgCamerImage();
  // Set Camera Imager
  k10.setBgCamerImage(false);
  // Canver
  k10.creatCanvas();
  // Switch AI Mode
  ai.switchAiMode(ai.NoMode);
  // Button A
  k10.buttonA->setPressedCallback(onButtonAPressed);
  // // Button B
  k10.buttonB->setPressedCallback(onButtonBPressed);
  // Set Camera Image
  k10.setBgCamerImage(true);
  // Caver Text
  k10.canvas->canvasText("AI Face Recognition", 1, 0xFF0000);
  // Switch AI Mode
  ai.switchAiMode(ai.Face);

}
// Loop
void loop() {
	
  // Detect Content AI Recognized
  if (ai.isRecognized()) {

     // ID
     mind_s_ID = ai.getRecognitionID();
     ?? Face ID
     k10.canvas->canvasText((String("Face ID: ") + String(mind_s_ID)), 0, 150, 0x0000FF, k10.canvas->eCNAndENFont24, 50, true);
     // Update Canvas
     k10.canvas->updateCanvas();

  }

  // Delay
  delay(3000);

}

// Event callback function
// Button A Pressed
void onButtonAPressed() {
	
  // RGB Write
  k10.rgb->write(-1, 0x00FF00);
  // Send Face
  ai.sendFaceCmd(ENROLL);

}

// Button B Pressed
void onButtonBPressed() {

  // RGB Write
  k10.rgb->write(-1, 0x0000FF);
  // Send Face
  ai.sendFaceCmd(RECOGNIZE);

}

——

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 – AI-Face Detection – Mk14

——

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

——

AI-Face Detection

——

AI-Face Detection

——

AI-Face Detection

——

AI-Face Detection

A facial recognition system is a technology potentially capable of matching a human face from a digital image or a video frame against a database of faces. Such a system is typically employed to authenticate users through ID verification services, and works by pinpointing and measuring facial features from a given image. Turn on the camera, detect the face, and display the detected face length and width, as well as center point x and center point y coordinates, on the K10 screen.

DL2505Mk04

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

DL2505Mk04p

DL2505Mk04p.mp

/****** Don Luc Electronics © ******
Software Version Information
Project #30 - UNIHIKER - AI-Face Detection - Mk14
DL2505Mk04p.mp
DL2505Mk04
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"
// AT Recognition
#include "AIRecognition.h"

// Create an object
UNIHIKER_K10  k10;
// Screen
uint8_t screen_dir=2;
// AI Recognition
AIRecognition ai;

// Main program start
void setup() {
	
  // Begin
  k10.begin();
  // Init Screen
  k10.initScreen(screen_dir);
  // Init AI
  ai.initAi();
  // Init Camera Imager
  k10.initBgCamerImage();
  // Set Camera Imager
  k10.setBgCamerImage(false);
  // Canver
  k10.creatCanvas();
  // Switch AI Mode
  ai.switchAiMode(ai.NoMode);
  // Set Camera Image
  k10.setBgCamerImage(true);
  // Caver Text
  k10.canvas->canvasText("AI Face", 1, 0xFF0000);
  // Switch AI Mode
  ai.switchAiMode(ai.Face);

}
// Loop
void loop() {
	
  // Detect Content AI Face
  if (ai.isDetectContent(AIRecognition::Face)) {
    
      // Text Face Lengh
      k10.canvas->canvasText((String("Face Lengh: ") + String(ai.getFaceData(AIRecognition::Length))), 0, 45, 0x00FF00, k10.canvas->eCNAndENFont16, 50, true);
      // Text Face Width
      k10.canvas->canvasText((String("Face Width: ") + String(ai.getFaceData(AIRecognition::Width))), 0, 65, 0x00FF00, k10.canvas->eCNAndENFont16, 50, true);
      // Text Face Center X
      k10.canvas->canvasText((String("Face Center X: ") + String(ai.getFaceData(AIRecognition::CenterX))), 0, 85, 0x00FF00, k10.canvas->eCNAndENFont16, 50, true);
      // Text Face Center Y
      k10.canvas->canvasText((String("Face Center Y: ") + String(ai.getFaceData(AIRecognition::CenterY))), 0, 105, 0x00FF00, k10.canvas->eCNAndENFont16, 50, true);
      // Update Canvas
      k10.canvas->updateCanvas();
  }
  // Delay
  delay(3000);

}

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 – AI Motion – Mk12

——

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

——

AI Motion

——

AI Motion

——

AI Motion

—–

AI Motion Sensing

AI Motion Sensing scan text for clues that hint at AI involvement. They analyze sentence structure, predictability, and writing patterns using machine learning models trained on both human-written and AI-generated text. Some even go a step further by checking metadata or comparing content to known AI outputs.

Sets the motion detection sensitivity, the larger the setting value, the more sensitive the detection of motion, the range is 0-100. If you do not set the sensitivity when using motion detection, the default is 50.

DL2505Mk02

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

——

DL2505Mk02p

DL2505Mk02p.mp

/****** Don Luc Electronics © ******
Software Version Information
Project #30 - UNIHIKER - Ambient Light - Mk12
DL2505Mk02p.mp
DL2505Mk02
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"
// AT Recognition
#include "AIRecognition.h"

// Create an object
UNIHIKER_K10  k10;
// Screen
uint8_t screen_dir=2;
// AI Recognition
AIRecognition ai;

// Main program start
void setup() {
	
  // Begin
  k10.begin();
  // Init Screen
  k10.initScreen(screen_dir);
  // Init AI
  ai.initAi();
  // Init Camera Imager
  k10.initBgCamerImage();
  // Set Camera Imager
  k10.setBgCamerImage(false);
  // Canver
  k10.creatCanvas();
  // Switch AI Mode
  ai.switchAiMode(ai.NoMode);
  // Set Camera Image
  k10.setBgCamerImage(true);
  // Caver Text
  k10.canvas->canvasText("AI-Motion Detection", 1, 0x0000FF);
  // Switch AI Mode
  ai.switchAiMode(ai.Move);
  // Set Detection Threshold
  ai.setMotinoThreshold(30);
  // RGB
  k10.rgb->write(-1, 0x0000FF);

}
// Loop
void loop() {
	
  // Detect Content AI Recognition
  if (ai.isDetectContent(AIRecognition::Move)) {
		
    k10.rgb->write(-1, 0xFF0000);

  } else {
		
     k10.rgb->write(-1, 0x0000FF);

  }

}

——

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 – Ambient Light – Mk11

——

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

——

Ambient Light

——

Ambient Light

——

Ambient Light

——

LITE-ON Technology – Ambient Light Sensor

The LTR-303ALS-01 is a low voltage I2C digital light sensor [ALS] in a low cost miniature chipled lead-free surface mount package. This sensor converts light intensity to a digital output signal capable of direct I2C interface. It provides a linear response over a wide dynamic range from 0.01 lux to 64k lux and is well suited to applications under high ambient brightness.

Gravity: Analog Ambient Light Sensor

This Gravity: Analog ambient light sensor can assist you in detecting light density and provide an analog voltage signal to the controller as feedback. Additionally, you have the ability to trigger other components within your project by setting voltage thresholds.

DL2504Mk06

1 x UNIHIKER K10
1 x Gravity: Analog Ambient Light Sensor
1 x Lithium Ion Battery – 1000mAh
1 x Switch
1 x USB 3.1 Cable A to C

DL2504Mk06p

DL2504Mk06p.mp

/****** Don Luc Electronics © ******
Software Version Information
Project #30 - UNIHIKER - Ambient Light - Mk11
DL2504Mk06p.mp
DL2504Mk06
1 x UNIHIKER K10
1 x Gravity: Analog Ambient Light Sensor
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;

// 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 Read Light
  k10.canvas->canvasText("Read Light (lx)", 6, 0x330000);
  // Read Light
  k10.canvas->canvasText(k10.readALS(), 7, 0x0000FF);
  // Text Ambient Light
  k10.canvas->canvasText("Ambient Light (lx)", 8, 0x330000);
  // Ambient Light
  k10.canvas->canvasText(analogRead(P0), 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 – SC7A20 – Mk10

——

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

——

SC7A20

——

SC7A20

——

SC7A20

——

Triaxial Acceleration Sensor(SC7A20H)

The SC7A20 is an acceleration sensor IC, which features abundant functions, low power dissipation, small size, and precision measurement. It communicates with MCU through I²C/SPI interface, the acceleration measurement data can be accessed in interrupt mode or inquiry mode. INT1 and INT2 provide many auto-detected interrupt signals which are suitable to many motion detection fields, interrupt source include 6D/4D direction detection interrupt signal, free fall detection interrupt signal, sleep and wake up detection interrupt signal, and single/double click detection interrupt signal. A high-precision calibration module is available within the IC to accurately compensate the senor’s offset error and gain error. It has dynamically user selectable full scales of ±2G / ±4G / ±8G / ±16G and it is capable of measuring accelerations with output data rates from 1Hz to 400Hz.

DL2504Mk05

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

DL2504Mk05p

DL2504Mk05p.mp

/****** Don Luc Electronics © ******
Software Version Information
Project #30 - UNIHIKER - SC7A20H - Mk10
DL2504Mk05p.mp
DL2504Mk05
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;

// 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 Acceleration X
  k10.canvas->canvasText("Acceleration X", 6, 0x330000);
  // Acceleration X
  k10.canvas->canvasText((k10.getAccelerometerX()), 7, 0x0000FF);
  // Text Acceleration Y
  k10.canvas->canvasText("Acceleration Y", 8, 0x330000);
  // Acceleration Y
  k10.canvas->canvasText((k10.getAccelerometerY()), 9, 0x0000FF);
  // Text Acceleration Z
  k10.canvas->canvasText("Acceleration Z", 10, 0x330000);
  // Acceleration Z
  k10.canvas->canvasText((k10.getAccelerometerZ()), 11, 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

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