ragemachine
Active member
Hi all,
Have an integration question... I think I have figured it out, but want to get opinions.
I have an ESP8266 connected to a Teensy 3.6 with an Audio Shield on top. The one data connection between the ESP8266 and Teensy is i2c - pins 4+5 on the ESP8266 by default, and 18+19 on the Teensy (which are also connected to the Audio Shield).
Overall flow of program is supposed to be:
1) ESP8266 receives a file play command over wifi connection from external source
2) ESP8266 sends file number byte over i2c to Teensy
3) Teensy/Audio Shield plays file on SD card based on file number received
I think where I went wrong was trying to code the ESP8266 as i2c master and the Teensy as slave. The Teensy expects to be Master in order to send i2c data to the Audio Shield, right?
So if I re-write things such that the ESP8266 is a slave, with the Teensy doing pull requests, that ought to work?
My main question is: Can I put the code for the wire.requestfrom() in my Teensy main loop? Or is the Teensy Audio.h code doing something in the background that might interfere with that?
Thanks
Have an integration question... I think I have figured it out, but want to get opinions.
I have an ESP8266 connected to a Teensy 3.6 with an Audio Shield on top. The one data connection between the ESP8266 and Teensy is i2c - pins 4+5 on the ESP8266 by default, and 18+19 on the Teensy (which are also connected to the Audio Shield).
Overall flow of program is supposed to be:
1) ESP8266 receives a file play command over wifi connection from external source
2) ESP8266 sends file number byte over i2c to Teensy
3) Teensy/Audio Shield plays file on SD card based on file number received
I think where I went wrong was trying to code the ESP8266 as i2c master and the Teensy as slave. The Teensy expects to be Master in order to send i2c data to the Audio Shield, right?
So if I re-write things such that the ESP8266 is a slave, with the Teensy doing pull requests, that ought to work?
My main question is: Can I put the code for the wire.requestfrom() in my Teensy main loop? Or is the Teensy Audio.h code doing something in the background that might interfere with that?
Thanks