Open killerbeat12 opened 1 year ago
Try googling how to turn a buzzer on and off. Your code should look more like
`int Buzzer = 7; //for Arduino Microcontroller //int Buzzer = D7; //for ESP8266 Microcontroller //int Buzzer = 4; //for ESP32 Microcontroller
void setup(){ pinMode (Buzzer, OUTPUT); }
void loop(){ digitalWrite (Buzzer, HIGH); //turn buzzer on delay(1000); digitalWrite (Buzzer, LOW); //turn buzzer off delay(1000); }`
I am trying to read a simple input and write simple output, if have several sensors (light,vibration, buzzer etc) but i don't read any value if i change the vibration or light and also buzzer is not going on?
What extra's do i need to do to activate the inputs and outputs on this board and which one could i use? or are there examples somewhere?
example: i define the GPIO pin
define Buzzer 34
define Vibration 35
setup void setup() { pinMode(Buzzer , INPUT);
} void loop() { Serial.println(digitalRead(VIB)); digitalWrite(Buzzer , LOW); }