15 lines
284 B
Arduino
15 lines
284 B
Arduino
|
const int HALL_PIN = A0;
|
||
|
|
||
|
void setup() {
|
||
|
Serial.begin(9200);
|
||
|
pinMode(LED_BUILTIN, OUTPUT);
|
||
|
pinMode(HALL_PIN, INPUT);
|
||
|
}
|
||
|
|
||
|
void loop() {
|
||
|
int hall_value = analogRead(HALL_PIN);
|
||
|
Serial.println(hall_value);
|
||
|
// digitalWrite(LED_BUILTIN, hall_value);
|
||
|
delay(10); //debounce?
|
||
|
}
|