datomusic / duo-firmware

Firmware for the Dato DUO
7 stars 4 forks source link

Troubles uploading firmware from Arduino IDE #8

Open lintmachine opened 6 years ago

lintmachine commented 6 years ago

Hello, I'm attempting to upload the firmware to my Duo and running into some issues.

I've followed the setup instructions in the README, using the Arduino 1.8.5 IDE with Teensyduino 1.4 on a Mac, but the upload always fails with the following error:

Teensy did not respond to a USB-based request to enter program mode.
Please press the PROGRAM MODE BUTTON on your Teensy to upload your sketch.
An error occurred while uploading the sketch

The program appears to compile fine, but the upload doesn't succeed.

Is it necessary to push the tiny button on the Duo unit (through the hole next to the headphone jack) in order to program the board? I experimented with this, but was still seeing the same issues when trying to upload.

I also experimented with building using the Makefile, but ran into some other issues with path configurations.

Any help would be greatly appreciated. I have a couple of modifications I've made to the sequencer I'm excited to try out.

<3 Dato Duo!

Thanks, Chris

DavidMenting commented 6 years ago

Hi Chris,

That's correct. The repository here is only suitable for the Dato DUO Dev Kits we sent out to a few Kickstarter backers.

The source code for the Dato DUO in its final production version will be posted here. I'll mention this issue once the files are online, so you are notified.

Cheers, David

lintmachine commented 6 years ago

Thanks David,

Sadly, I seem to have damaged the microswitch on my Duo in my attempts to get things working. Was having a hard time hitting it through the hole with the pin and I applied a little too much pressure.

Luckily, the unit still works, but might be worth adding a mention in the README instructions for the final version to be gentle. Hoping I can figure out a way to get it working again.

Cheers, Chris

DavidMenting commented 6 years ago

I've updated the repository. Uploading through the Arduino IDE is not supported yet, and I haven't tested it on Windows or Linux yet. Please let me know how it goes.

As for the damaged switch: if you're capable of wielding a screwdriver, send an email to support@dato.mu for a replacement circuit board. I've added a notice to be careful in the Readme

lintmachine commented 6 years ago

Awesome! That a very generous offer. I'll send an email shortly.

In the mean time, I managed to open up the unit and short the switch manually (not convenient, but it works), which allowed me to successfully upload the firmware!

I noticed in the code, there is a DEV_MODE flag, which looks like it should allow going into dfu mode by holding down the play button. I added a define for it, and the unit does appear to go into dfu mode as expected, but it immediately reboots.

If I could get that working, I could reassemble the Duo and might not need the replacement board.

Here's a short video of the sequencer ratchet function I've been experimenting with: https://www.instagram.com/p/Bb2VCFxnAYh/

Thanks for getting the final code uploaded so quickly!

DavidMenting commented 6 years ago

Yep, DEV_MODE is there so you don't have to press the button every time. The rebooting in DEV_MODE should be fixed in 6b575c388098c75f1ba951759027d09bbe3e6d0f

The ratcheting in the video looks fun!

lintmachine commented 6 years ago

Sweet! I integrated that change and it's all working really well now! Much easier just to hold the play button down to enter DFU mode as well. Will make experimenting much easier now.

Thanks again for the quick response!

DavidMenting commented 6 years ago

I've added another method of entering the bootloader in 1.1.0-rc.3. If you sysex-dump DUO-bootloader.syx to the DUO's usb MIDI port, it will enter the bootloader even if DEV_MODE is off. Of course, you will have to load a 1.1.0-rc.3 or later firmware onto the DUO first.