to digital pin
This commit is contained in:
parent
5427168fb2
commit
5f6f2825fe
@ -7,6 +7,10 @@ void setup() {
|
|||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
int hall_value = digitalRead(HALL_PIN);
|
int hall_value = digitalRead(HALL_PIN);
|
||||||
digitalWrite(LED_BUILTIN, hall_value);
|
if (hall_value == HIGH) {
|
||||||
|
digitalWrite(LED_BUILTIN, LOW);
|
||||||
|
} else {
|
||||||
|
digitalWrite(LED_BUILTIN, HIGH);
|
||||||
|
}
|
||||||
delay(10); //debounce?
|
delay(10); //debounce?
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user