Assignment1 IOT102
Assignment1 IOT102
Mssv: CE171752
Circuit
Code
// this constant won't change:
const int buttonPin = 2; // the pin that the pushbutton is attached to
void setup() {
// Initialize the push button pin as input
pinMode(buttonPin, INPUT);
void loop() {
// Read the state of the push button
buttonState = digitalRead(buttonPin);