Project #29 - DFRobot - Fermion MEMS Smoke Gas - Mk06

Project #29 - DFRobot - Fermion MEMS Smoke Gas - Mk06

 

https://www.donluc.com/?p=3875

 

https://youtu.be/Ov-rIcZBjus

 

#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

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

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

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

CODE
// 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: http://www.donluc.com/?page_id=1927

 

Teacher, Instructor, E-Mentor, R&D and Consulting

 

-Programming Language
-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
-Etc...

 

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

icon DL2403Mk02.zip 974KB Download(0)
License
All Rights
Reserved
licensBg
0