onehorse
Well-known member
I just got around to soldering up my audio board and was trying out the audio library for the first time. I downloaded the Audio.zip file, put it in the libraries section of my Arduino folder and tried to compile a very simple sketch:
This is the compile error I got:
I am sure I am doing (or not doing!) something dumb here. Could someone provide a clue to the clueless?
Do I have to download these github files?
I have a pair of digital INMP441 I2S microphones connected to Teensy 3.1 pins 9 (BCLK), 13 (SD), and 23 (WS) and I would like to get the serial data output from the mics sent to the headphone output so I can verify the mics work, and then later get the serial data in a form I can manipulate. I have the Audio board soldered to the Teensy, and I would like to use the Audio library to the fullest extent.
I want to use the mics in master mode, where the Teensy 3.1 provides the clock signals and accepts the serial data from the mics as input. There is the problem of the 2 x 32 bits per cycle carrying 24-bit data words. I don't know how to finesse this issue other than rewriting parts of the audio library to accommodate this serial data structure. First things first, how can at least compile an audio sketch using the audio library?
Edit: I reinstalled Teensiduino 1.20 and now I can compile without error. It took a while but now my brand new Teensy is also recognized and I was able to upload the sketch that receives I2S audio from the audio shield line in pins and sends it to the headphones. I get nothing from a mono speaker attached to the headphones. Is the microphone serial data line connected to pin 13 of the Teensy 3.1 (soldered to the audio board) the same as line in here?
A comment from the wise would help here; I am going about this the wrong way or am I on the right path?
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
// GUItool: begin automatically generated code
// GUItool: end automatically generated code
This is the compile error I got:
Code:
C:\Program Files\Arduino\hardware\tools\arm-none-eabi\bin\arm-none-eabi-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mcpu=cortex-m4 -DF_CPU=48000000 -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -mthumb -nostdlib -D__MK20DX256__ -DTEENSYDUINO=120 -fno-rtti -felide-constructors -std=gnu++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Program Files\Arduino\hardware\teensy\cores\teensy3 -IC:\Users\Pesky Products\Documents\Arduino\libraries\Audio -IC:\Program Files\Arduino\libraries\Wire -IC:\Program Files\Arduino\libraries\SPI -IC:\Program Files\Arduino\libraries\SD C:\Users\PESKYP~1\AppData\Local\Temp\build3634049013559787273.tmp\audio_INMP441_ino.cpp -o C:\Users\PESKYP~1\AppData\Local\Temp\build3634049013559787273.tmp\audio_INMP441_ino.cpp.o
In file included from audio_INMP441_ino.ino:1:0:
C:\Users\Pesky Products\Documents\Arduino\libraries\Audio/Audio.h:39:2: error: #error "You need to update DMAChannel.h & DMAChannel.cpp"
C:\Users\Pesky Products\Documents\Arduino\libraries\Audio/Audio.h:40:2: error: #error "https://github.com/PaulStoffregen/cores/blob/master/teensy3/DMAChannel.h"
C:\Users\Pesky Products\Documents\Arduino\libraries\Audio/Audio.h:41:2: error: #error "https://github.com/PaulStoffregen/cores/blob/master/teensy3/DMAChannel.cpp"
I am sure I am doing (or not doing!) something dumb here. Could someone provide a clue to the clueless?
Do I have to download these github files?
I have a pair of digital INMP441 I2S microphones connected to Teensy 3.1 pins 9 (BCLK), 13 (SD), and 23 (WS) and I would like to get the serial data output from the mics sent to the headphone output so I can verify the mics work, and then later get the serial data in a form I can manipulate. I have the Audio board soldered to the Teensy, and I would like to use the Audio library to the fullest extent.
I want to use the mics in master mode, where the Teensy 3.1 provides the clock signals and accepts the serial data from the mics as input. There is the problem of the 2 x 32 bits per cycle carrying 24-bit data words. I don't know how to finesse this issue other than rewriting parts of the audio library to accommodate this serial data structure. First things first, how can at least compile an audio sketch using the audio library?
Edit: I reinstalled Teensiduino 1.20 and now I can compile without error. It took a while but now my brand new Teensy is also recognized and I was able to upload the sketch that receives I2S audio from the audio shield line in pins and sends it to the headphones. I get nothing from a mono speaker attached to the headphones. Is the microphone serial data line connected to pin 13 of the Teensy 3.1 (soldered to the audio board) the same as line in here?
A comment from the wise would help here; I am going about this the wrong way or am I on the right path?
Last edited: