Created
March 26, 2023 20:35
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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