I test it out, and seem to work, but I'm getting a very distorted sine wave by using this simple patch.
///
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioSynthWaveformSine sine1; //xy=192,220
AudioOutputI2S i2s1; //xy=390,220
AudioConnection patchCord1(sine1, 0, i2s1, 0);
AudioConnection patchCord2(sine1, 0, i2s1, 1);
// GUItool: end automatically generated code
void setup() {
AudioMemory(1);
sine1.amplitude(0.5);
sine1.frequency(100);
}
void loop() {
}
These are few pictures from the scope. Changing the amplitude value of the sine wave result in different shapes. At minus gain is almost a square wave, and by increasing the gain it get folded. Any suggestion on what could be wrong?
The "i2s.h" file where is supposed to be located? In the Audio library I found only "output_i2s.h".
Thanks in advance
R.