I tried a number of the Dronebot Workshop's I²S audio projects using the Arduino Nano ESP32 processor. I couldn't get any of the sketches to work. As soon as I changed to a ESP32-WROOM DA processor, they all worked immediately.
Does anyone have an idea why the Nano ES32 didn't work? It's supposed to support I²S audio.
@donpk Since we can't see wiring and code it is impossible to say why I2S did not work for you but did for Bill. I do NOT see any I2S + NANO in Bill's list of videos/articles. Please supply link to the video/article that Bill did on NANO + I2S. All the articles that I see that Bill did re I2S were esp32-based.
I did find official Arduino documentation on I2S on the NANO so it is supposed to work.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@zander Thanks, Ron, for your reply. In fact, you're right, Bill's I2S projects don't use the Nano ESP32, but rather a different ESP32 processor. When I tried an ESP32-WROOM-DA processor, Bill's audio projects worked fine.
I'm not sure why they don't work with the Arduino Nano ESP32 because it supports I2S and some of the I2S examples in the Arduino IDE work okay with the Nano ESP32.
I've posted this issue with some of the audio sketches on the Arduino Forum. If I come up with a solution, I'll post it here.
@donpk So you have proved the hardware (NANO) is okay and the samples work, so what does that leave?
I just noticed you are saying 'NANO ESP32' instead of' NANO. ' It should still work, but maybe the code you are trying to get to work is somehow different.
All guesses without wiring diagrams and code.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@zander Yes, the board which isn't working with Bill's I2S projects is the Arduino Nano ESP32 which Bill has featured in another video.
Here is a link to the post I made on the Arduino site. We'll see if they have any suggestions.
@donpk If you had shown us the simple compile error earlier, then this issue would have been solved earlier. The answer is right there in the error message. If this is code you did not write, then the cause is likely due to https://docs.espressif.com/projects/arduino-esp32/en/latest/migration_guides/2.x_to_3.0.html
If you post a link to the code or post the actual code I can verify the fix.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@donpk There is a chance that making this trivial fix will uncover or lead to further errors, as the Migration document implies.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@zander Here is a link to Bill's article "Sound with ESP32 – I2S Protocol". The section of the article I am referring to is "ESP32 Internet Radio" and the code called "Simple Internet Radio Demo" and is contained in that section of the article.
That code runs okay on an ESP32-WROOM-DA processor, but does not run okay with an Arduino Nano ESP32 processor, that is, the sketch compiles okay, but does not produce internet audio.
@donpk If it is the same code, then I would suspect the wiring. Did you follow Bill's wiring?
I have a NANO-ESP32 so will try to do the experiment but no promises as my workbench is a huge mess due to a personal situation.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@zander Yes, I used the same code as Bill and when I used a ESP32-WROOM-DA processor, I used his wiring. As I have said, with that processor, Bill's code works okay.
For the Arduino Nano ESP32, i used the wiring in the I2S section of this Arduino Cheat Sheet. For that processor, Bill's code compiled, but did not work.
@donpk Is this familiar?
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@zander Yes, those pinouts are from the link I posted.
I used the Arduino Nano ESP32 pin 7 for the MAX98357A I2S BCLK, pin 8 for LRC and pin 9 for DIN.
@donpk Here is my test results (completed)
1. The Audio library is 'marked' as esp32 ONLY.
2. Before I knew about 1, I tried to compile for a standard NANO and of course it failed.
3. Now I am trying the standard esp32 DOIT dev board, and it appears to be working, see screen grab below. (no pins connected)
4. I now connected the NANO esp32 board, and after putting the board into Arduino Bootloader mode got the sketch to upload.
5. After a lot of button presses, cable removal and re-inserts and more button presses I finally got the result seen in pic 2.
Unless you have a compelling reason to use this dual mode board, I strongly suggest you use a simpler esp32 board like the board recommended by the NERDS, the DOIT.
2nd pic is the NANO esp32
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@donpk If you insist on using the NANO ESP32 then make sure you UNDERSTAND the following document. Remember, the pin numbers are different depending on if you are in NANO or ESP32 mode. Keep in mind the library you are using ONLY works (and compiles) on ESP32 boards.
https://docs.arduino.cc/tutorials/nano-esp32/cheat-sheet/
Again, I STRONGLY recommend a standard devkit board like the following
Good luck.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.