Skip to content

Instantly share code, notes, and snippets.

@ReidCarlberg
Created October 30, 2013 22:16
Show Gist options
  • Save ReidCarlberg/7241310 to your computer and use it in GitHub Desktop.
Save ReidCarlberg/7241310 to your computer and use it in GitHub Desktop.
const int xInput = A0;
const int yInput = A1;
const int zInput = A2;
void setup()
{
Serial.begin(9600);
}
void loop()
{
int xRaw = analogRead(xInput);
int yRaw = analogRead(yInput);
int zRaw = analogRead(zInput);
Serial.println("X: " + String(xRaw) + ", Y: " + String(yRaw) + ", Z: " + String(zRaw));
delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment