Last active
November 17, 2022 06:48
-
-
Save todocono/a9990a51be6e0157662acd546d362467 to your computer and use it in GitHub Desktop.
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
/* | |
Based on SendMultipleValue by Oliver Steele, 2020-2022 | |
See more at https://osteele.github.io/Arduino_SerialRecord/ | |
Arduino code | |
Programmed in class - Interaction Lab 2022Fall | |
This example code is in the public domain. | |
*/ | |
#include "SerialRecord.h" | |
SerialRecord writer(2); | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
writer[0]= analogRead(A0); // volume | |
writer[1] = analogRead(A1); // pitch | |
writer.send(); | |
// This delay slows down the loop, so that it runs less frequently. This can | |
// make it easier to debug the sketch, because new values are printed at a | |
// slower rate. | |
delay(20); //it used to say 10 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment