MUSE PROTO board

Hi Raspiaudio:slight_smile:

Maybe you can help with a few problems I have with the board.

  1. Each time I upload firmware I need to press on/off and only after that process starts. Is there a way how to avoid this manual step? In my project there is no access to the board except through usb.
  2. Please, suggest a way how to control battery discharging states.

Hi
1-What environment dev are you using? Arduino?

2-what would you like to achieve? Just tracking the battery level?

Thx
Olivier

  1. VSCode
  2. Iā€™d like to play some sound if the battery is empty.

1- just to try, go to https://raspiaudio.github.io/ with a chrome browser, choose Muse proto, connect to the right com port. Open the console and click on reset? do you see you device rebooting? if yes there is no hardware defect. And you should look in the VScode how to do a soft reset after uploading some code.

2-check what we have done here with the battery around line 128

  1. Perfectly worked for me, thank you. It restarts from the console. Iā€™ll try to find a way how to do a soft reset in VSCode.

  2. Very good example, exactly what I needed.

Thank you!

p.s. BTW, very cool approach with https://raspiaudio.github.io!

  1. Iā€™ve just tryed to upload Squeezelitexxx from https://raspiaudio.github.io/ and it also fails.

Then did an experiment and uploaded empty sketch into the board. It works just fine and I can continuously upload it again and again. So something wrong with my sketch. Maybe you have some ideas what service or IO port can interfere with reset capability and setting the device into boot mode?

Could be something related to IO0 check this in your code

If I comment these lines in my setup function, I can upload correctly:

#define SD_CS 13

if (!SD.begin(SD_CS))
{
Serial.printf(ā€œSD initialization failed!ā€);
}

I see, have you a SD card in when you upload? It could be the issue

Yes, it is in a slot all the time. And you are right, if I remove it, it seems like I can upload firmware without manual intervention with the button. But now I need to manually remove SD card :slight_smile:

ideed this is a known limitation, I will add it it the guide thx

1 Like

So it is a limitation of esp32? Looks like I found a workaround here:

Before writing firmware, I trigger Unmount_SD() by clicking some combination of buttons that my device has and it works fine.

If there is a better workaround, maybe a hardware patch, let me know, please.
I would like to work with an assembled device and have the possibility to upgrade firmware via USB without opening it.

If in your application you cannot remove the SD to upload a new sketch, then simpest way would be to put the board manually in bootloader mode each time you would like to upload a new sketch.
To put in bootloader mode you need to push the IO0 button and power it on, from there it is waiting for a new software upload. I try to always expose IO0 as a user button in case the automatic bootloader logic fails for some reason.

1 Like

This works perfectly with my setup! Thank you for this tip.

Dear Olivier,
Is it possible to know if USB charging is happening right now? Iā€™d like not to play sounds when a battery is charging.

not sure that it is possible without adding a wire, but check the ADC value of IO33 maybe you have a specific value when it is plugged.

What are you building? please share it if you can

Basically, it is a music player with 5 buttons, each representing a playlist of songs (7 songs per button). Each time I start it, it plays a random playlist. It always plays something. But when I charge it at night, it would be cool not to disturb.

Am I connecting it right? I need to turn it on while charging.

Hi!
Iā€™m getting stuck with finding the Port for the Muse Proto board. I tried on windows and now on a Mac. On Windows the Port option was grayed out, and on my mac its only showing 2 dated ports (which donā€™t work).
I tried downloading the [CP210x USB to UART Bridge VCP Driver and I made a folder for the driver in file: /your username/Documents/Arduino/drivers
Any help starting me off would be appreciated

Are you sure of your USB cable? Some does not have data pins

1 Like

You are right that seemed to have been the issue