Hi, I am creating my first arduino project, it is a robot that starts if the pir sensor goes off. The part i am having difficulties with is here,
void loop(){
if(digitalRead(pirPin) == HIGH){
digitalWrite(buzzPin, HIGH); //the buzzer visualizes the sensors output pin state
delay (1000); //high for 1 sec
** digitalWrite(buzzpin, LOW);**
delay (1000); //low for 1 sec
digitalWrite(robopin, HIGH); //output pin state of pir pin
delay (50000);
It says that I need to declare buzzpin in this scope (the one when buzzpin is low). If you know how to help me I would greatly appreciate it!