Created
January 6, 2020 04:59
-
-
Save futureshocked/1780c5ff1e9bafece817b422a9ebe08c to your computer and use it in GitHub Desktop.
This sketch implements a simple line sensor for the Arduino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Line Sensor Breakout - Analog | |
int out; | |
void setup() | |
{ | |
Serial.begin(9600); // sets the serial port to 9600 | |
} | |
void loop() | |
{ | |
out = analogRead(0); // read analog input pin 0 | |
Serial.println(out, DEC); // print the value of the sensor | |
delay(100); // wait 100ms for next reading | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment