H there,
Is there anyway to program the esp32 with Arduino IDE? (I use a Mac, but that should not matter)
H there,
Is there anyway to program the esp32 with Arduino IDE? (I use a Mac, but that should not matter)
Well, nobody?
Thnx for the reply, but I already did that
The problem is actually: How can I connect my Voice to my mac (or pc or whatever is used) so that it will show up on /tty/S0 and which board should I select ?
Sure, thats the hard part
I see two options:
Just getting the hex file after building the arduino ino programm, copying that to the Pi and then flashing the ESP32 from there. I found this example
Actually sharing the Serial connection frmo the Rasp Pi to your computer and just using the Arduino IDE to flash. check out here
PD: I havent tested any pf this. Please, let me know how this goes.
-Yoel
Those are actually good leads! Thanks, I will update my results
In the meanwhile I have found another way, use the ESP demo and build it.
In the build folder there will be 2 bin files.
From your IDE, export the bin and rename it to match the demo bin. Make deploy
I will post a more detailed version
Nice ⌠Looking forward to seeing the progress
I have had some good results over the weekend, but I want to try other methods as well.
The way this worked for me at this point:
After the first succes I went on and the sketch now also lights up the leds and MQTT.
The MQTT was the main reason I wanted to try this, the libraries on c++ gave me some troubles when I subscribed to a topic which sends wav files. When the esp32 received such a large buffer, it rebooted, regardless of my max packet size (2000, while a message of 46000 or so is being received)
Then I saw the implementation of PubSubClient for arduino also has implemented streams and other differences, so I wanted to try that.
The voice now can handle these large messages without rebooting, so that looks promising
edit: also reboots⌠back to the drawing board. I think I will try sharing the serial port of the Pi to my mac with socat
I was thinking about why the Voice keeps rebooting and then I thought the incoming message from the Snips platform was just to big to handle (it publishes a wav file)
That would kill the incoming memory buffer, so I started looking for others solutions.
On of those was trying to implement a ring buffer of some kind, but it suddenly struck me that I needed another type of mqtt client, namely an ASYNCH client.
I am having great succes by using this: https://github.com/marvinroger/async-mqtt-client
The only thing I need is that the Voice does not reboot and post a message to a playFinished topic.
This is working now
I am now implementing the use of the everloop on hotword detection, but if someone from the team reads this:
Repo of my new code:
Victory
I have got a fully functional Snips Audio Server now, with green leds on hotword detection and blue on idle!
I have got some ideas, one of them being able to play the bytes received through the headphone output.
Any news on it? I assume we cannot use dacWrite at this point?
I also created a version that can be used with OTA.
Very nice because you do not need the Voice attached to the Pi anymore.
I will be implementing some ideas over the next weeks, but the feature I really want to implement is using the headphone jack to output the sounds.
While that is still under development, I will also try and print a nice case for it to build a Echo Dot like device
Follow up!
Current features:
I also implemented a task with a rotation animation, but that is not used yet.
Is there any news about the audio output?
I also would like to now that when that is fixed, it will also be possible to use the small left /right connectors?
While waiting for audio output, I have managed to flash this program to the Voice:
And it paired and played the wave file on my bluetooth headset!
So the next big step will be to play audio via Bluetooth!
Small update for anyone who finds it interesting.
After a couple of days struggling, I can now save the MQTT wave message as a raw audio file which plays on the BT speaker
I could not get it to work yet with only memory, so I tried first to save the message as a file.
Still a lot to do, but also made quite some progress