Skip to content

Instantly share code, notes, and snippets.

@RadicalTeapot
Created March 26, 2023 20:35
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 RadicalTeapot/210a3560e971bff8f48366051d824e7c to your computer and use it in GitHub Desktop.
Save RadicalTeapot/210a3560e971bff8f48366051d824e7c to your computer and use it in GitHub Desktop.
Read values from analog in and send them out to touchdesigner using serial communication
const size_t count = 6;
const uint8_t pins[count] = {A0, A1, A2, A3, A4, A5};
size_t i;
void setup() {
Serial.begin(9600);
}
void loop() {
for (i = 0; i < count; i++)
{
if (i > 0)
Serial.print(" ");
Serial.print(analogRead(pins[i]));
}
Serial.println();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment