Skip to content

Instantly share code, notes, and snippets.

@IsmailSan
Created September 3, 2019 09:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IsmailSan/8f263c710fa3cb5f12cd1ee861d1037b to your computer and use it in GitHub Desktop.
Save IsmailSan/8f263c710fa3cb5f12cd1ee861d1037b to your computer and use it in GitHub Desktop.
Espectro32
int LED=15; // LED di pin IO15 pada espectro32
int button=4; // Button di pin IO4 pada espectro32
void setup() {
pinMode(LED,OUTPUT); //Led Sebagai Output
pinMode(button,INPUT); // Button Sebagai Input
}
void loop() {
int buttonState = digitalRead(button);
if(buttonState == HIGH) {
digitalWrite(LED,HIGH);
} else {
digitalWrite(LED,LOW);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment