Compare commits

...

2 Commits

View File

@ -10,6 +10,9 @@ I2S i2s(OUTPUT);
#define BLOCKSIZE 64 // Heavy block size #define BLOCKSIZE 64 // Heavy block size
#define BUFFERSIZE (2 * BLOCKSIZE) // Stereo interleaved #define BUFFERSIZE (2 * BLOCKSIZE) // Stereo interleaved
bool state;
int delta;
int16_t buffer[BUFFERSIZE]; int16_t buffer[BUFFERSIZE];
inline int16_t float_to_i16(float x) { inline int16_t float_to_i16(float x) {
@ -70,9 +73,17 @@ void setup() {
while (100); while (100);
} }
delay(100); delay(2000);
hv->sendFloatToReceiver(hv_string_to_hash("osc_freq_input"), 880);
} }
void loop() { void loop() {
if (millis() - delta > 1000) {
int freq;
if (state) freq = 440;
else freq = 880;
hv->sendFloatToReceiver(hv_string_to_hash("osc_freq_input"), freq);
state = !state;
delta = millis();
}
} }