Розмір відео: 1280 X 720853 X 480640 X 360
Показувати елементи керування програвачем
Автоматичне відтворення
Автоповтор
links:www.arduino.cc/en/softwareua-cam.com/video/Wg-gi426Hoo/v-deo.htmlrandomnerdtutorials.com/installing-the-esp32-board-in-arduino-ide-windows-instructions/
code:char input;const int led = 13; const int buzzer = 12;void setup(){Serial.begin(9600); pinMode(led, OUTPUT); pinMode(buzzer, OUTPUT);digitalWrite(led, LOW);digitalWrite(buzzer, LOW);}void loop(){if(Serial.available()){input = Serial.read(); if(input == '0'){digitalWrite(led, LOW); }if(input == '1'){digitalWrite(led, HIGH);}if(input == '2') {digitalWrite(buzzer, HIGH); }if(input == '3') {digitalWrite(buzzer, LOW);}if(input == '4') {digitalWrite(buzzer, HIGH); digitalWrite(led, HIGH); }if(input == '5') {digitalWrite(buzzer, LOW);digitalWrite(led, LOW); }}}
links:
www.arduino.cc/en/software
ua-cam.com/video/Wg-gi426Hoo/v-deo.html
randomnerdtutorials.com/installing-the-esp32-board-in-arduino-ide-windows-instructions/
code:
char input;
const int led = 13;
const int buzzer = 12;
void setup()
{
Serial.begin(9600);
pinMode(led, OUTPUT);
pinMode(buzzer, OUTPUT);
digitalWrite(led, LOW);
digitalWrite(buzzer, LOW);
}
void loop()
{
if(Serial.available())
{
input = Serial.read();
if(input == '0')
{
digitalWrite(led, LOW);
}
if(input == '1')
{
digitalWrite(led, HIGH);
}
if(input == '2')
{
digitalWrite(buzzer, HIGH);
}
if(input == '3')
{
digitalWrite(buzzer, LOW);
}
if(input == '4')
{
digitalWrite(buzzer, HIGH);
digitalWrite(led, HIGH);
}
if(input == '5')
{
digitalWrite(buzzer, LOW);
digitalWrite(led, LOW);
}
}}