Skip to content

Instantly share code, notes, and snippets.

@michaelsarduino
Created December 23, 2015 17:21
Show Gist options
  • Save michaelsarduino/2615925325c5a516df83 to your computer and use it in GitHub Desktop.
Save michaelsarduino/2615925325c5a516df83 to your computer and use it in GitHub Desktop.
void setup() {
Serial.begin(9600);
}
void loop() {
if(analogRead(7) < 890)
{
Serial.println("Magnet gefunden!");
}
else
{
Serial.println("Kein Magnet in der Naehe...");
}
delay(100);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment