DFRobot
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