Created
May 17, 2019 02:47
-
-
Save e-Gizmo/b396e1534c3f9df76d1cb487253a0f0f to your computer and use it in GitHub Desktop.
This is an example codes for Line Sensor - Single Analog Output.
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
int sensor=A0; | |
int sensorVal=0; | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
// read the value from the sensor: | |
sensorVal = analogRead(sensor); | |
Serial.println(sensorVal); | |
delay(1000); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment