Skip to content

Instantly share code, notes, and snippets.

@e-Gizmo
Created May 17, 2019 02:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save e-Gizmo/b396e1534c3f9df76d1cb487253a0f0f to your computer and use it in GitHub Desktop.
Save e-Gizmo/b396e1534c3f9df76d1cb487253a0f0f to your computer and use it in GitHub Desktop.
This is an example codes for Line Sensor - Single Analog Output.
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