Skip to content

v1.6.3 Add ResetToBootloader Function

Compare
Choose a tag to compare
@beserge beserge released this 04 Jan 19:27
· 11 commits to master since this release

Adds ResetToBootloader function from libDaisy.

This simple example illustrates it working.

#include "DaisyDuino.h"

DaisyHardware hw;

void MyCallback(float **in, float **out, size_t size) {
  for (size_t i = 0; i < size; i++) {
    out[0][i] = in[0][i];
    out[1][i] = in[1][i];
  }
}

void setup() {
  float sample_rate;
  hw = DAISY.init(DAISY_SEED, AUDIO_SR_48K);
  sample_rate = DAISY.get_samplerate();

  DAISY.begin(MyCallback);

  // blink for 2 seconds
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, HIGH);
  delay(500);
  digitalWrite(LED_BUILTIN, LOW);
  delay(500);
  digitalWrite(LED_BUILTIN, HIGH);
  delay(500);
  digitalWrite(LED_BUILTIN, LOW);
  delay(500);

  hw.ResetToBootloader();
}

void loop() {}