Skip to content

Instantly share code, notes, and snippets.

@taesamja
Created July 5, 2016 01:21
Show Gist options
  • Save taesamja/cc1f274cb982d8f97bd1d82b5d054e15 to your computer and use it in GitHub Desktop.
Save taesamja/cc1f274cb982d8f97bd1d82b5d054e15 to your computer and use it in GitHub Desktop.
void setup() {
Serial.begin(9600);
}
void loop() {
int sensorVal = analogRead(A0);
sensorVal = map(sensorVal,0,1023,0,253);
Serial.write(sensorVal);
delay(10);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment