Загрузка...

Episode 28 || Part 1 || All About flame sensor withesp32

#explore #arduino #arduinoproject #esp32 #esp32project #esp32projects #viral #viralvideo #video #viralvideos
// jaha bhi library include ki hai waha per angle bracket laga dena
#define AO_PIN 36 // ESP32's pin GPIO36
connected to AO pin of the flame sensor
void setup() {
// initialize serial communication
Serial.begin(9600);
// set the ADC attenuation to 11 dB (up to ~3.3V
input)
analogSetAttenuation(ADC_11db);
}
void loop() {
int infrared_value = analogRead(AO_PIN);
Serial.print("The AO value: ");
Serial.println(infrared_value);
}
#define DO_PIN 13 // ESP32's pin GPIO13
connected to DO pin of the flame sensor
void setup() {
// initialize serial communication
Serial.begin(9600);
// initialize the ESP32's pin as an input
pinMode(DO_PIN, INPUT);
}
void loop() {
int flame_state = digitalRead(DO_PIN);
if (flame_state == HIGH)
Serial.println("No flame dected = The fire is
NOT detected");
else
Serial.println("Flame dected = The fire is
detected");
}

Видео Episode 28 || Part 1 || All About flame sensor withesp32 канала YOGELECTRONICS_HUB
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять