void setup() {
Serial.begin(115200);
pinMode(A0, INPUT);
pinMode(LED_BUILTIN, OUTPUT);
pinMode(5, INPUT_PULLUP);
}
void loop() {
// In this case the potentiometer is not being read. Only focus on the LED and switch.
int switch_state = digitalRead(5);
if (switch_state == HIGH) { //Need bracket after if/else statement.
digitalWrite(LED_BUILTIN, HIGH);
}
else {
digitalWrite(LED_BUILTIN, LOW);
}
//Need to visualize the values eh?
Serial.println(digitalRead((5)));
delay(100);
}