void setup() {
// put your setup code here, to run once:
pinMode(12, INPUT);
pinMode(5, OUTPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
int switchState = digitalRead(12);
if(switchState==1)
{
digitalWrite(5,HIGH);
Serial.println("Switch State ON, LED ON");
}
else
{
digitalWrite(5,LOW);
Serial.println("Switch State OFF, LED OFF");
}
}
// micro py script to control on bord led with respect to position of on bord boot or flash button