Skip to content

Instantly share code, notes, and snippets.

@ugeugeHigh
Last active January 30, 2019 10:54
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 ugeugeHigh/3fb7c73aabf0e2503050c0c26e048f51 to your computer and use it in GitHub Desktop.
Save ugeugeHigh/3fb7c73aabf0e2503050c0c26e048f51 to your computer and use it in GitHub Desktop.
void setup() {
Serial.begin(115200);
}
void loop() {
int val = analogRead(A5);
int out = map(val,0,1023,0,255);
Serial.write(out);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment