Skip to content

Instantly share code, notes, and snippets.

@tuttelikz
Created March 12, 2018 11:26
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 tuttelikz/e5869821f1527fce8eb557fe789287d2 to your computer and use it in GitHub Desktop.
Save tuttelikz/e5869821f1527fce8eb557fe789287d2 to your computer and use it in GitHub Desktop.
Snippet to read analog signal
//const int ProxSensor = 2;
void setup() {
// put your setup code here, to run once:
//pinMode(13, OUTPUT);
//pinMode(ProxSensor,INPUT);
Serial.begin(9600);
}
void loop() {
int sensorValue = analogRead(A3);
// print out the value you read:
Serial.println(sensorValue);
delay(1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment