The XC3902 Duinotech Arduino® Compatible UNO Starter Kit can be used to construct a variety of DIY projects.
Project 3 (Using buttons) in the instructions has a misprint where the push-button is only connected to the ground (black wire), so please refer to the image below when wiring your project.
Optional code you can use:
void setup()
{ pinMode(2, INPUT_PULLUP);
pinMode(8, OUTPUT };
}
void loop()
{if (digitalRead(2) == LOW)
{ digitalWrite(8, HIGH);
} else { digitalWrite(8, LOW);
}
}
If your project uses:
1. Pin 2 → Push button connected to GND
2.Pin 8 → Active buzzer (4-pin buzzer module)
Comments
0 comments
Article is closed for comments.