Skip to content

Instantly share code, notes, and snippets.

@todocono
Last active November 17, 2022 06:48
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 todocono/a9990a51be6e0157662acd546d362467 to your computer and use it in GitHub Desktop.
Save todocono/a9990a51be6e0157662acd546d362467 to your computer and use it in GitHub Desktop.
/*
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