Go Down

Topic: Start program on usb connected arduino with music (Read 516 times) previous topic - next topic


Hi all
I'm new to programming and cannot understand how i can do what i need:
How to start program on usb connected arduino at the same time with starting music on pc? After program starts to run i want to disconnect arduino from pc.


Utilizing the fact that the arduino resets when the serial port is closed on a computer, you could run a program on your PC that opens a serial port with the arduino, then closes it and starts the music at the same time. On the arduino, just go from the start assuming that the music is started. Once the serial port is closed, pulling the USB connection (assuming you have a separate power supply) shouldn't reset the arduino again (AFAIK)

The only problem with that is that the arduino takes a while to reset (search around for more exact times). You could get rid of the bootloader, and then it would just take several milliseconds.

Go Up