pictographer
Well-known member
The code below produces a short beep.
How do I control the duration of the beep and make the beep repeat? Hardware is a pair of earbuds wired to A14 and Gnd.
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
// GUItool: begin automatically generated code
AudioSynthWaveformSine sine1; //xy=286,264
AudioOutputAnalog dac1; //xy=478,256
AudioConnection patchCord1(sine1, dac1);
// GUItool: end automatically generated code
void setup() {
sine1.amplitude(0.5);
sine1.frequency(440);
}
void loop() {
}
How do I control the duration of the beep and make the beep repeat? Hardware is a pair of earbuds wired to A14 and Gnd.