DFRobot
Project #29 – DFRobot – Smoke – Mk07
——
#DonLucElectronics #DonLuc #DFRobot #FermionBLESensorBeacon #MEMSSmokeGas #FireBeetle2ESP32E #ESP32 #IoT #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant
——
——
——
——
Smoke
Smoke is a suspension of airborne particulates and gases emitted when a material undergoes combustion or pyrolysis, together with the quantity of air that is entrained or otherwise mixed into the mass. It is commonly an unwanted by-product of fires, but may also be used for pest control, communication, defensive and offensive capabilities in the military, cooking, or smoking. It is used in rituals where incense, sage, or resin is burned to produce a smell for spiritual or magical purposes. It can also be a flavoring agent and preservative.
Smoke inhalation is the primary cause of death in victims of indoor fires. The smoke kills by a combination of thermal damage, poisoning and pulmonary irritation caused by carbon monoxide, hydrogen cyanide and other combustion products. Smoke is an aerosol of solid particles and liquid droplets that are close to the ideal range of sizes for Mie scattering of visible light.
DL2403Mk03
1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: MEMS Smoke Gas Detection Sensor
1 x Fermion: BLE Sensor Beacon
1 x CR2032 Coin Cell Battery
1 x 1 x Lithium Ion Battery – 1000mAh
1 x Rocker Switch – SPST
1 x Resistor 10K Ohm
1 x SparkFun Serial Basic Breakout – CH340G
1 x SparkFun Cerberus USB Cable
1 x USB 3.1 Cable A to C
DFRobot FireBeetle 2 ESP32-E
LED – 2
RSW – 17
VIN – +3.3V
GND – GND
——
DL2403Mk03p.ino
/****** Don Luc Electronics © ****** Software Version Information Project #29 - DFRobot - Smoke - Mk07 29-07 DL2403Mk03p.ino 1 x DFRobot FireBeetle 2 ESP32-E 1 x Fermion: MEMS Smoke Gas Detection Sensor 1 x Fermion: BLE Sensor Beacon 1 x CR2032 Coin Cell Battery 1 x 1 x Lithium Ion Battery - 1000mAh 1 x Rocker Switch - SPST 1 x Resistor 10K Ohm 1 x SparkFun Serial Basic Breakout - CH340G 1 x SparkFun Cerberus USB Cable 1 x USB 3.1 Cable A to C */ // Include the Library Code // Bluetooth LE keyboard #include <BleKeyboard.h> // Arduino #include <Arduino.h> // BLE Device #include <BLEDevice.h> // BLE Utils #include <BLEUtils.h> // BLEScan #include <BLEScan.h> // BLE Advertised Device #include <BLEAdvertisedDevice.h> // BLE Eddystone URL #include <BLEEddystoneURL.h> // BLE Eddystone TLM #include <BLEEddystoneTLM.h> // BLE Beacon #include <BLEBeacon.h> // ENDIAN_CHANGE #define ENDIAN_CHANGE_U16(x) ((((x)&0xFF00) >> 8) + (((x)&0xFF) << 8)) // Bluetooth LE Keyboard BleKeyboard bleKeyboard; String sKeyboard = ""; // Send Size byte sendSize = 0; // Fermion: MEMS Smoke Gas Detection Sensor float Sensor_Data; // In seconds int scanTime = 5; // BLE Scan BLEScan *pBLEScan; // My Advertised Device Callbacks class MyAdvertisedDeviceCallbacks : public BLEAdvertisedDeviceCallbacks { // onResult void onResult(BLEAdvertisedDevice advertisedDevice) { // Advertised Device if (advertisedDevice.haveName()) { // Name: Fermion: Sensor Beacon if(String(advertisedDevice.getName().c_str()) == "Smoke Gas"){ // strManufacturerData std::string strManufacturerData = advertisedDevice.getManufacturerData(); uint8_t cManufacturerData[100]; strManufacturerData.copy((char *)cManufacturerData, strManufacturerData.length(), 0); // strManufacturerData.length for (int i = 0; i < strManufacturerData.length(); i++) { // cManufacturerData[i] cManufacturerData[i]; } // Sensor_Data Sensor_Data = int(cManufacturerData[2]<<8 | cManufacturerData[3]); } } } }; // The number of the Rocker Switch pin int iSwitch = 17; // Variable for reading the button status int SwitchState = 0; // Define LED int iLED = 2; // Software Version Information String sver = "29-07"; void loop() { // ScanResults isBLEScanResults(); // Fermion: MEMS Smoke Gas Detection Sensor isSmokeGas(); // Read the state of the Switch value: SwitchState = digitalRead(iSwitch); // Check if the button is pressed. If it is, the SwitchState is HIGH: if (SwitchState == HIGH) { // Bluetooth LE Keyboard isBluetooth(); } // Delay 2 Second delay(2000); }
getBLEScan.ino
// getBLEScan // Setup BLE Scan void isSetupBLEScan(){ // BLE Device BLEDevice::init(""); // Create new scan pBLEScan = BLEDevice::getScan(); // Set Advertised Device Callbacks pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks()); // Active scan uses more power, but get results faster pBLEScan->setActiveScan(true); // Set Interval pBLEScan->setInterval(100); // Less or equal setInterval value pBLEScan->setWindow(99); } // BLE Scan Results void isBLEScanResults(){ // Put your main code here, to run repeatedly: BLEScanResults foundDevices = pBLEScan->start(scanTime, false); // Delete results fromBLEScan buffer to release memory pBLEScan->clearResults(); }
getBleKeyboard.ino
// Ble Keyboard // Bluetooth // isBluetooth void isBluetooth() { // ESP32 BLE Keyboard if(bleKeyboard.isConnected()) { // Send Size Length sendSize = sKeyboard.length(); // Send Size, charAt for(byte i = 0; i < sendSize+1; i++){ // Write bleKeyboard.write(sKeyboard.charAt(i)); delay(50); } bleKeyboard.write(KEY_RETURN); } }
getSmokeGas.ino
// Fermion: MEMS Smoke Gas Detection Sensor // Smoke Gas void isSmokeGas(){ // bleKeyboard (10-1000ppm) // DFR|Version|Smoke Gas Detection|* sKeyboard = "DFR|" + sver + "|" + String(Sensor_Data) + "|*"; }
setup.ino
// Setup void setup() { // Give display time to power on delay(100); // Bluetooth LE keyboard bleKeyboard.begin(); // Give display time to power on delay(100); // Setup BLE Scan isSetupBLEScan(); // Initialize the Switch pin as an input pinMode(iSwitch, INPUT); // Initialize digital pin iLED as an output pinMode(iLED, OUTPUT); // Outputting high, the LED turns on digitalWrite(iLED, HIGH); // Delay 5 Second delay( 5000 ); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Teacher, Instructor, E-Mentor, 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/
LinkedIn: https://www.linkedin.com/in/jlucpaquin/
Don Luc
Project #29 – DFRobot – Fermion MEMS Smoke Gas – Mk06
——
#DonLucElectronics #DonLuc #DFRobot #MEMSSmokeGas #FireBeetle2ESP32E #ESP32 #IoT #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant
——
——
——
——
Fermion: MEMS Smoke Gas Detection Sensor
Fermion: MEMS Smoke Gas Detection Sensor employs state-of-the-art microelectromechanical system (MEMS) technology, endowing the sensor with compact dimensions, low power consumption, minimal heat generation, short preheating time, and swift response recovery. The sensor can measure smoke concentration qualitatively and is suitable for smoke alarm and other application scenarios.
Precautions for use:
- Kindly remove the protective film before usage.
- To prevent exposure to volatile silicon compounds vapors.
- Refrain from prolonged exposure to extreme environments.
- Avoid contact with water, condensation, and freezing.
- Minimize excessive vibration, impact, and dropping.
- For extended periods of non-usage, it is advisable to preheat the module for at least 24 hours.
DL2403Mk02
1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: MEMS Smoke Gas Detection Sensor
1 x 1 x Lithium Ion Battery – 1000mAh
1 x Rocker Switch – SPST
1 x Resistor 10K Ohm
1 x USB 3.1 Cable A to C
DFRobot FireBeetle 2 ESP32-E
LED – 2
RSW – 17
SMO – A0
VIN – +3.3V
GND – GND
——
DL2403Mk02p.ino
/****** Don Luc Electronics © ****** Software Version Information Project #29 - DFRobot - Fermion MEMS Smoke Gas - Mk06 29-06 DL2403Mk02p.ino 1 x DFRobot FireBeetle 2 ESP32-E 1 x Fermion: MEMS Smoke Gas Detection Sensor 1 x 1 x Lithium Ion Battery - 1000mAh 1 x Rocker Switch - SPST 1 x Resistor 10K Ohm 1 x USB 3.1 Cable A to C */ // Include the Library Code // Bluetooth LE keyboard #include <BleKeyboard.h> // Bluetooth LE Keyboard BleKeyboard bleKeyboard; String sKeyboard = ""; // Send Size byte sendSize = 0; // Fermion: MEMS Smoke Gas Detection Sensor int iSmokeGas = A0; int iSmokeGasVal = 0; // The number of the Rocker Switch pin int iSwitch = 17; // Variable for reading the button status int SwitchState = 0; // Define LED int iLED = 2; // Software Version Information String sver = "29-06"; void loop() { // Fermion: MEMS Smoke Gas Detection Sensor isSmokeGas(); // Read the state of the Switch value: SwitchState = digitalRead(iSwitch); // Check if the button is pressed. If it is, the SwitchState is HIGH: if (SwitchState == HIGH) { // Bluetooth LE Keyboard isBluetooth(); } // Delay 1 Second delay(1000); }
getBleKeyboard.ino
// Ble Keyboard // Bluetooth // isBluetooth void isBluetooth() { // ESP32 BLE Keyboard if(bleKeyboard.isConnected()) { // Send Size Length sendSize = sKeyboard.length(); // Send Size, charAt for(byte i = 0; i < sendSize+1; i++){ // Write bleKeyboard.write(sKeyboard.charAt(i)); delay(50); } bleKeyboard.write(KEY_RETURN); } }
getSmokeGas.ino
// Fermion: MEMS Smoke Gas Detection Sensor // Smoke Gas void isSmokeGas(){ // Connect Smoke Gas Sensor to Analog 0 iSmokeGasVal = analogRead( iSmokeGas ); // bleKeyboard (10-1000ppm) // DFR|Version|Smoke Gas Detection|* sKeyboard = "DFR|" + sver + "|" + String(iSmokeGasVal) + "|*"; }
setup.ino
// Setup void setup() { // Give display time to power on delay(100); // Bluetooth LE keyboard bleKeyboard.begin(); // Give display time to power on delay(100); // Initialize the Switch pin as an input pinMode(iSwitch, INPUT); // Initialize digital pin iLED as an output pinMode(iLED, OUTPUT); // Outputting high, the LED turns on digitalWrite(iLED, HIGH); // Delay 5 Second delay( 5000 ); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Teacher, Instructor, E-Mentor, 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/
Don Luc
Project #29 – DFRobot – Soil Moisture – Mk05
——
#DonLucElectronics #DonLuc #DFRobot #SoilMoistureSensor #FireBeetle2ESP32E #ESP32 #IoT #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant
——
——
——
——
Soil Moisture
Soil moisture is the critical parameter in agriculture. If there is a shortage or overabundance of water, plants may die. At the same time, this data depends on many external factors, primarily weather conditions and climate changes. That is why it is so vital to understand the most effective methods for analyzing soil moisture content.
This term refers to the entire quantity of water in the ground’s pores or on its surface. The moisture content of soil depends on such factors as weather, type of land, and plants. The parameter is vital in monitoring soil moisture activities, predicting natural disasters, managing water supply, etc. This data may signal a future flood or water deficit ahead of other indicators.
Soil moisture affects:
- Content of air, salinity, and amount of toxic substances.
- Ground structure and thickness.
- Temperature and heat capacity of the ground.
DL2403Mk01
1 x DFRobot FireBeetle 2 ESP32-E
1 x Gravity: Analog Soil Moisture Sensor
1 x Fermion: BLE Sensor Beacon
1 x CR2032 Coin Cell Battery
1 x 1 x Lithium Ion Battery – 1000mAh
1 x Rocker Switch – SPST
1 x Resistor 10K Ohm
1 x SparkFun Serial Basic Breakout – CH340G
1 x SparkFun Cerberus USB Cable
1 x USB 3.1 Cable A to C
DFRobot FireBeetle 2 ESP32-E
LED – 2
RSW – 17
VIN – +3.3V
GND – GND
——
DL2403Mk01p.ino
/****** Don Luc Electronics © ****** Software Version Information Project #29 - DFRobot - Soil Moisture - Mk05 29-05 DL2403Mk01p.ino 1 x DFRobot FireBeetle 2 ESP32-E 1 x Gravity: Analog Soil Moisture Sensor 1 x Fermion: BLE Sensor Beacon 1 x CR2032 Coin Cell Battery 1 x 1 x Lithium Ion Battery - 1000mAh 1 x Rocker Switch - SPST 1 x Resistor 10K Ohm 1 x SparkFun Serial Basic Breakout - CH340G 1 x SparkFun Cerberus USB Cable 1 x USB 3.1 Cable A to C */ // Include the Library Code // Bluetooth LE keyboard #include <BleKeyboard.h> // Arduino #include <Arduino.h> // BLE Device #include <BLEDevice.h> // BLE Utils #include <BLEUtils.h> // BLEScan #include <BLEScan.h> // BLE Advertised Device #include <BLEAdvertisedDevice.h> // BLE Eddystone URL #include <BLEEddystoneURL.h> // BLE Eddystone TLM #include <BLEEddystoneTLM.h> // BLE Beacon #include <BLEBeacon.h> // ENDIAN_CHANGE #define ENDIAN_CHANGE_U16(x) ((((x)&0xFF00) >> 8) + (((x)&0xFF) << 8)) // Bluetooth LE Keyboard BleKeyboard bleKeyboard; String sKeyboard = ""; // Send Size byte sendSize = 0; // Gravity: Analog Soil Moisture Sensor float Sensor_Data; // In seconds int scanTime = 5; // BLE Scan BLEScan *pBLEScan; // My Advertised Device Callbacks class MyAdvertisedDeviceCallbacks : public BLEAdvertisedDeviceCallbacks { // onResult void onResult(BLEAdvertisedDevice advertisedDevice) { // Advertised Device if (advertisedDevice.haveName()) { // Name: Fermion: Sensor Beacon if(String(advertisedDevice.getName().c_str()) == "Soil Moisture"){ // strManufacturerData std::string strManufacturerData = advertisedDevice.getManufacturerData(); uint8_t cManufacturerData[100]; strManufacturerData.copy((char *)cManufacturerData, strManufacturerData.length(), 0); // strManufacturerData.length for (int i = 0; i < strManufacturerData.length(); i++) { // cManufacturerData[i] cManufacturerData[i]; } // Sensor_Data Sensor_Data = int(cManufacturerData[2]<<8 | cManufacturerData[3]); } } } }; // The number of the Rocker Switch pin int iSwitch = 17; // Variable for reading the button status int SwitchState = 0; // Define LED int iLED = 2; // Software Version Information String sver = "29-05"; void loop() { // ScanResults isBLEScanResults(); // Gravity: Analog Soil Moisture Sensor isSoilMoisture(); // Read the state of the Switch value: SwitchState = digitalRead(iSwitch); // Check if the button is pressed. If it is, the SwitchState is HIGH: if (SwitchState == HIGH) { // Bluetooth LE Keyboard isBluetooth(); } // Delay 2 Second delay(2000); }
getBLEScan.ino
// getBLEScan // Setup BLE Scan void isSetupBLEScan(){ // BLE Device BLEDevice::init(""); // Create new scan pBLEScan = BLEDevice::getScan(); // Set Advertised Device Callbacks pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks()); // Active scan uses more power, but get results faster pBLEScan->setActiveScan(true); // Set Interval pBLEScan->setInterval(100); // Less or equal setInterval value pBLEScan->setWindow(99); } // BLE Scan Results void isBLEScanResults(){ // Put your main code here, to run repeatedly: BLEScanResults foundDevices = pBLEScan->start(scanTime, false); // Delete results fromBLEScan buffer to release memory pBLEScan->clearResults(); }
getBleKeyboard.ino
// Ble Keyboard // Bluetooth // isBluetooth void isBluetooth() { // ESP32 BLE Keyboard if(bleKeyboard.isConnected()) { // Send Size Length sendSize = sKeyboard.length(); // Send Size, charAt for(byte i = 0; i < sendSize+1; i++){ // Write bleKeyboard.write(sKeyboard.charAt(i)); delay(50); } bleKeyboard.write(KEY_RETURN); } }
getSoilMoisture.ino
// Gravity: Analog Soil Moisture Sensor // Soil Moisture void isSoilMoisture(){ // bleKeyboard // DFR|Version|Soil Moisture|* // SData => 0~900 Soil Moisture float SData = map( Sensor_Data, 1, 3000, 0, 900); sKeyboard = "DFR|" + sver + "|" + String(SData) + "|*"; }
setup.ino
// Setup void setup() { // Give display time to power on delay(100); // Bluetooth LE keyboard bleKeyboard.begin(); // Give display time to power on delay(100); // Setup BLE Scan isSetupBLEScan(); // Initialize the Switch pin as an input pinMode(iSwitch, INPUT); // Initialize digital pin iLED as an output pinMode(iLED, OUTPUT); // Outputting high, the LED turns on digitalWrite(iLED, HIGH); // Delay 5 Second delay( 5000 ); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Teacher, Instructor, E-Mentor, 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
- 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/
Don Luc
Project #29 – DFRobot – Gravity Soil Moisture Sensor – Mk04
——
#DonLucElectronics #DonLuc #DFRobot #SoilMoistureSensor #FireBeetle2ESP32E #ESP32 #IoT #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant
——
——
——
——
Gravity: Analog Soil Moisture Sensor
A soil moisture sensor can read the amount of moisture present in the soil surrounding it. It’s an ideal for monitoring an urban garden, or your pet plant’s water level. This is a must have component for a IOT Garden / Agriculture. The new soil moisture sensor uses Immersion Gold which protects the nickel from oxidation. Electroless nickel immersion gold has several advantages over more conventional surface platings such as HASL, including excellent surface planarity, good oxidation resistance, and usability for untreated contact surfaces such as membrane switches and contact points.
This Soil Moisture Sensor uses the two probes to pass current through the soil, and then it reads that resistance to get the moisture level. More water makes the soil conduct electricity more easily, while dry soil conducts electricity poorly. This sensor will be helpful to remind you to water your indoor plants or to monitor the soil moisture in your garden.
DL2402Mk04
1 x DFRobot FireBeetle 2 ESP32-E
1 x Gravity: Analog Soil Moisture Sensor
1 x 1 x Lithium Ion Battery – 1000mAh
1 x Rocker Switch – SPST
1 x Resistor 10K Ohm
1 x USB 3.1 Cable A to C
DFRobot FireBeetle 2 ESP32-E
LED – 2
RSW – 17
SMS – A0
VIN – +3.3V
GND – GND
——
DL2402Mk04p.ino
/****** Don Luc Electronics © ****** Software Version Information Project #29 - DFRobot - Gravity Soil Moisture Sensor - Mk04 29-04 DL2402Mk04p.ino 1 x DFRobot FireBeetle 2 ESP32-E 1 x Gravity: Analog Soil Moisture Sensor 1 x Rocker Switch - SPST 1 x Resistor 10K Ohm 1 x 1 x Lithium Ion Battery - 1000mAh 1 x USB 3.1 Cable A to C */ // Include the Library Code // Bluetooth LE keyboard #include <BleKeyboard.h> // Bluetooth LE Keyboard BleKeyboard bleKeyboard; String sKeyboard = ""; // Send Size byte sendSize = 0; // Gravity: Analog Soil Moisture Sensor int iSoilMoisture = A0; int iSoilMoistureVal = 0; // The number of the Rocker Switch pin int iSwitch = 17; // Variable for reading the button status int SwitchState = 0; // Define LED int iLED = 2; // Software Version Information String sver = "29-04"; void loop() { // Gravity: Analog Soil Moisture Sensor isSoilMoisture(); // Read the state of the Switch value: SwitchState = digitalRead(iSwitch); // Check if the button is pressed. If it is, the SwitchState is HIGH: if (SwitchState == HIGH) { // Bluetooth LE Keyboard isBluetooth(); } // Delay 1 Second delay(1000); }
getBleKeyboard.ino
// Ble Keyboard // Bluetooth // isBluetooth void isBluetooth() { // ESP32 BLE Keyboard if(bleKeyboard.isConnected()) { // Send Size Length sendSize = sKeyboard.length(); // Send Size, charAt for(byte i = 0; i < sendSize+1; i++){ // Write bleKeyboard.write(sKeyboard.charAt(i)); delay(50); } bleKeyboard.write(KEY_RETURN); } }
getSoilMoisture.ino
// Gravity: Analog Soil Moisture Sensor // Soil Moisture void isSoilMoisture(){ // Connect Soil Moisture Sensor to Analog 0 iSoilMoistureVal = analogRead( iSoilMoisture ); // SData => 0~900 Soil Moisture float SData = map( iSoilMoistureVal, 1, 3000, 0, 900); // bleKeyboard // DFR|Version|Soil Moisture|* sKeyboard = "DFR|" + sver + "|" + String(SData) + "|*"; }
setup.ino
// Setup void setup() { // Give display time to power on delay(100); // Bluetooth LE keyboard bleKeyboard.begin(); // Give display time to power on delay(100); // Initialize the Switch pin as an input pinMode(iSwitch, INPUT); // Initialize digital pin iLED as an output pinMode(iLED, OUTPUT); // Outputting high, the LED turns on digitalWrite(iLED, HIGH); // Delay 5 Second delay( 5000 ); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Teacher, Instructor, E-Mentor, 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
- 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/
Don Luc
Project #29 – DFRobot – Fermion BLE Sensor Beacon – Mk03
——
#DonLucElectronics #DonLuc #DFRobot #FermionBLESensorBeacon #AmbientLight #FireBeetle2ESP32E #ESP32 #IoT #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant
——
——
——
——
Fermion: BLE Sensor Beacon
BLE Beacon, also known as Low Energy Bluetooth Beacon, is a small wireless device that broadcasts signals using BLE technology. Due to its broadcast nature, pairing is not required between the beacon and receiving devices. Each beacon contains a unique identifier, detectable by nearby devices equipped with Bluetooth technology, such as ESP32 and smartphones supporting BLE scanning.
This Bluetooth beacon has a built-in 11-bit ADC, Fermion version, and multiple I/Os that can be multiplexed to SDA/SCL while broadcasting over Bluetooth. Users can access sensor data within broadcast range on a Bluetooth-equipped device such as a Smartphone or ESP32. This BLE beacon has a built-in 11-bit ADC and an I2C interface, allowing it to real-time collect and broadcast data from various types of sensors, including analog, digital, and I2C sensors.
DL2402Mk03
1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: BLE Sensor Beacon
1 x Gravity: Analog Ambient Light Sensor
1 x CR2032 Coin Cell Battery
1 x 1 x Lithium Ion Battery – 1000mAh
1 x Rocker Switch – SPST
1 x Resistor 10K Ohm
1 x SparkFun Serial Basic Breakout – CH340G
1 x SparkFun Cerberus USB Cable
1 x USB 3.1 Cable A to C
DFRobot FireBeetle 2 ESP32-E
LED – 2
RSW – 17
VIN – +3.3V
GND – GND
——
DL2402Mk03p.ino
/****** Don Luc Electronics © ****** Software Version Information Project #29 - DFRobot - - Mk03 29-03 DL2402Mk03p.ino 1 x DFRobot FireBeetle 2 ESP32-E 1 x Fermion: BLE Sensor Beacon 1 x Gravity: Analog Ambient Light Sensor 1 x CR2032 Coin Cell Battery 1 x 1 x Lithium Ion Battery - 1000mAh 1 x Rocker Switch - SPST 1 x Resistor 10K Ohm 1 x SparkFun Serial Basic Breakout - CH340G 1 x SparkFun Cerberus USB Cable 1 x USB 3.1 Cable A to C */ // Include the Library Code // Bluetooth LE keyboard #include <BleKeyboard.h> // Arduino #include <Arduino.h> // BLE Device #include <BLEDevice.h> // BLE Utils #include <BLEUtils.h> // BLEScan #include <BLEScan.h> // BLE Advertised Device #include <BLEAdvertisedDevice.h> // BLE Eddystone URL #include <BLEEddystoneURL.h> // BLE Eddystone TLM #include <BLEEddystoneTLM.h> // BLE Beacon #include <BLEBeacon.h> // ENDIAN_CHANGE #define ENDIAN_CHANGE_U16(x) ((((x)&0xFF00) >> 8) + (((x)&0xFF) << 8)) // Bluetooth LE Keyboard BleKeyboard bleKeyboard; String sKeyboard = ""; // Send Size byte sendSize = 0; // Gravity: Analog Ambient Light Sensor float Sensor_Data; // In seconds int scanTime = 5; // BLE Scan BLEScan *pBLEScan; // My Advertised Device Callbacks class MyAdvertisedDeviceCallbacks : public BLEAdvertisedDeviceCallbacks { // onResult void onResult(BLEAdvertisedDevice advertisedDevice) { // Advertised Device if (advertisedDevice.haveName()) { // Name: Fermion: Sensor Beacon if(String(advertisedDevice.getName().c_str()) == "Fermion: Sensor Beacon"){ // strManufacturerData std::string strManufacturerData = advertisedDevice.getManufacturerData(); uint8_t cManufacturerData[100]; strManufacturerData.copy((char *)cManufacturerData, strManufacturerData.length(), 0); // strManufacturerData.length for (int i = 0; i < strManufacturerData.length(); i++) { // cManufacturerData[i] cManufacturerData[i]; } // Sensor_Data Sensor_Data = int(cManufacturerData[2]<<8 | cManufacturerData[3]); } } } }; // The number of the Rocker Switch pin int iSwitch = 17; // Variable for reading the button status int SwitchState = 0; // Define LED int iLED = 2; // Software Version Information String sver = "29-03"; void loop() { // ScanResults isBLEScanResults(); // Gravity: Analog Ambient Light Sensor isAmbientLight(); // Read the state of the Switch value: SwitchState = digitalRead(iSwitch); // Check if the button is pressed. If it is, the SwitchState is HIGH: if (SwitchState == HIGH) { // Bluetooth LE Keyboard isBluetooth(); } // Delay 2 Second delay(2000); }
getAmbientLight.ino
// Gravity: Analog Ambient Light Sensor // Ambient Light void isAmbientLight(){ // bleKeyboard // DFR|Version|Lux|* // SData => 1~6000 Lux float SData = map(Sensor_Data, 1, 3000, 1, 6000); sKeyboard = "DFR|" + sver + "|" + String(SData) + "|*"; }
getBLEScan.ino
// getBLEScan // Setup BLE Scan void isSetupBLEScan(){ // BLE Device BLEDevice::init(""); // Create new scan pBLEScan = BLEDevice::getScan(); // Set Advertised Device Callbacks pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks()); // Active scan uses more power, but get results faster pBLEScan->setActiveScan(true); // Set Interval pBLEScan->setInterval(100); // Less or equal setInterval value pBLEScan->setWindow(99); } // BLE Scan Results void isBLEScanResults(){ // Put your main code here, to run repeatedly: BLEScanResults foundDevices = pBLEScan->start(scanTime, false); // Delete results fromBLEScan buffer to release memory pBLEScan->clearResults(); }
getBleKeyboard.ino
// Ble Keyboard // Bluetooth // isBluetooth void isBluetooth() { // ESP32 BLE Keyboard if(bleKeyboard.isConnected()) { // Send Size Length sendSize = sKeyboard.length(); // Send Size, charAt for(byte i = 0; i < sendSize+1; i++){ // Write bleKeyboard.write(sKeyboard.charAt(i)); delay(50); } bleKeyboard.write(KEY_RETURN); } }
setup.ino
// Setup void setup() { // Give display time to power on delay(100); // Bluetooth LE keyboard bleKeyboard.begin(); // Give display time to power on delay(100); // Setup BLE Scan isSetupBLEScan(); // Initialize the Switch pin as an input pinMode(iSwitch, INPUT); // Initialize digital pin iLED as an output pinMode(iLED, OUTPUT); // Outputting high, the LED turns on digitalWrite(iLED, HIGH); // Delay 5 Second delay( 5000 ); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Teacher, Instructor, E-Mentor, 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
- 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/
Don Luc
Project #29 – DFRobot – Gravity Analog Ambient Light Sensor – Mk02
——
#DonLucElectronics #DonLuc #DFRobot #AmbientLight #FireBeetle2ESP32E #ESP32 #IoT #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant
——
——
——
——
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. This ambient light sensor is operational within the voltage range of 3.3 to 5 volts.
DL2402Mk02
1 x DFRobot FireBeetle 2 ESP32-E
1 x Gravity: Analog Ambient Light Sensor
1 x 1 x Lithium Ion Battery – 1000mAh
1 x Rocker Switch – SPST
1 x Resistor 10K Ohm
1 x USB 3.1 Cable A to C
DFRobot FireBeetle 2 ESP32-E
LED – 2
RSW – 17
ALS – A0
VIN – +3.3V
GND – GND
——
DL2402Mk02p.ino
/****** Don Luc Electronics © ****** Software Version Information Project #29 - DFRobot - FireBeetle 2 ESP32-E - Mk02 29-02 DL2402Mk02p.ino 1 x DFRobot FireBeetle 2 ESP32-E 1 x Gravity: Analog Ambient Light Sensor 1 x Rocker Switch - SPST 1 x Resistor 10K Ohm 1 x 1 x Lithium Ion Battery - 1000mAh 1 x USB 3.1 Cable A to C */ // Include the Library Code // Bluetooth LE keyboard #include <BleKeyboard.h> // Bluetooth LE Keyboard BleKeyboard bleKeyboard; String sKeyboard = ""; // Send Size byte sendSize = 0; // Gravity: Analog Ambient Light Sensor int iAmbientLight = A0; int iAmbientLightVal = 0; // The number of the Rocker Switch pin int iSwitch = 17; // Variable for reading the button status int SwitchState = 0; // Define LED int iLED = 2; // Software Version Information String sver = "29-02"; void loop() { // Gravity: Analog Ambient Light Sensor isAmbientLight(); // Read the state of the Switch value: SwitchState = digitalRead(iSwitch); // Check if the button is pressed. If it is, the SwitchState is HIGH: if (SwitchState == HIGH) { // Bluetooth LE Keyboard isBluetooth(); } // Delay 1 Second delay(1000); }
getAmbientLight.ino
// Gravity: Analog Ambient Light Sensor // Ambient Light void isAmbientLight(){ // Connect Ambient Light Sensor to Analog 0 iAmbientLightVal = analogRead( iAmbientLight ); // bleKeyboard // DFR|Version|Lux|* sKeyboard = "DFR|" + sver + "|" + String(iAmbientLightVal) + "|*"; }
getBleKeyboard.ino
// Ble Keyboard // Bluetooth // isBluetooth void isBluetooth() { // ESP32 BLE Keyboard if(bleKeyboard.isConnected()) { // Send Size Length sendSize = sKeyboard.length(); // Send Size, charAt for(byte i = 0; i < sendSize+1; i++){ // Write bleKeyboard.write(sKeyboard.charAt(i)); delay(50); } bleKeyboard.write(KEY_RETURN); } }
setup.ino
// Setup void setup() { // Give display time to power on delay(100); // Bluetooth LE keyboard bleKeyboard.begin(); // Give display time to power on delay(100); // Initialize the Switch pin as an input pinMode(iSwitch, INPUT); // Initialize digital pin iLED as an output pinMode(iLED, OUTPUT); // Outputting high, the LED turns on digitalWrite(iLED, HIGH); // Delay 5 Second delay( 5000 ); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Teacher, Instructor, E-Mentor, 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
- 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/
Don Luc
Project #29 – DFRobot – FireBeetle 2 ESP32-E – Mk01
——
#DonLucElectronics #DonLuc #DFRobot #FireBeetle2ESP32E #ESP32 #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant
——
——
——
——
——
——
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. It supports WiFi and Bluetooth dual-mode communication and features a small size, ultra-low power consumption, on-board charging circuit, and easy-to-use interface, which can be conveniently used for smart home IoT, industrial IoT applications, and wearable devices, and so on. You can easily create your own IoT smart home system when connecting it with an IoT platform like IFTTT. FireBeetle 2 ESP32-E supports Arduino programming.
- Compatible with DFRobot FireBeetle V2 Series
- Small Size of 25.4 mm × 60 mm
- ESP32 Dual-core low power maincontroller, WiFi+BT4.0
- GDI Display Port, say to connect
- Onboard Charging Circuit and PH2.0 li-ion Battery Port
- Operating Voltage: 3.3 Volt
- Input Voltage: 3.3 Volt -5.5 Volt (Support USB Charging)
DL2402Mk01
1 x DFRobot FireBeetle 2 ESP32-E
1 x 1 x Lithium Ion Battery – 1000mAh
1 x USB 3.1 Cable A to C
DFRobot FireBeetle 2 ESP32-E
LED – 2
VIN – +3.3V
GND – GND
——
DL2402Mk01p.ino
/****** Don Luc Electronics © ****** Software Version Information Project #29 - DFRobot - FireBeetle 2 ESP32-E - Mk01 29-01 DL2402Mk01p.ino 1 x DFRobot FireBeetle 2 ESP32-E 1 x 1 x Lithium Ion Battery - 1000mAh 1 x USB 3.1 Cable A to C */ // Include the Library Code // Define LED int iLED = 2; // Software Version Information String sver = "29-01"; void loop() { // Outputting high, the LED turns on digitalWrite(iLED, HIGH); // Delay 1 Second delay(1000); // Outputting low, the LED turns off digitalWrite(iLED, LOW); // Delay 1 Second delay(1000); }
setup.ino
// Setup void setup() { // Initialize digital pin iLED as an output pinMode(iLED, OUTPUT); // Delay 5 Second delay( 5000 ); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Teacher, Instructor, E-Mentor, 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
- 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/
Don Luc