@richard.east It sounds like what happened was that the sketch you flashed onto the keyboard was, in some way, buggy and is crashing once you get out of the bootloader.
The fact that holding down Prog
gets you into the bootloader is a very good sign.
If you’re comfortable at the command line, I think the next thing to try is to try to get you back to the shipping firmware.
Once that’s done, and you have a reliable way to do it again, it’ll make experimentation much, much easier.
This procedure is a little bit ‘off the cuff’, as I’m out and don’t have hardware in front of me. I may mess up the exact commandline invocation, but nothing we do will hurt your keyboard. (It’ll just embarrass me for getting it wrong.)
I’m assuming you’re doing this on your linux box and that you have another (working) keyboard handy.
You’ll either need to have added yourself to the ‘dialout’ group to access the serial ports and then logged out and back in or execute the ‘avrdude’ command as root.
First, grab a copy of https://raw.githubusercontent.com/keyboardio/Model01-Firmware-Builds/master/v1.13-MP1-BUILD/atmega32u4_firmware.hex
That’s the regular firmware shipped on your keyboard.
Then, starting with your keyboard unplugged, type the command ls /dev/ttyACM*
If there are entries there, it means you’ve got something else acting as a serial port that may throw off some of our autodetection logic. If you do, stop there and tell me that. If you don’t, continue on to the next step.
While holding down Prog
, plug in your Model 01. Prog
should light up red.
type ls -al /dev/ttyACM*
You should see a single entry. That’s the serial port for the Model 01’s bootloader.
After about 8 seconds, the keyboard will give up waiting, try to run your program and (presumably) crash.
The next thing to do is to use the avrdude
commandline tool to flash an updated firmware onto your keyboard.
The command, if I have it right is:
avrdude -patmega32u4 -cavr109 -D -P /dev/ttyACM0 -b57600 -Uflash:w:atmega32u4_firmware.hex:i
If you got a different port number in response to your ls
, you’ll want to change ttyACM0
to that.
Before you execute this command, unplug your Model 01, and reconnect it, holding in the Prog key. When the Prog key turns red, run the command. You should see a bunch of debugging output, maybe a text progress bar and then the “LED” key should glow blue.
If that doesn’t work, paste the results of running avrdude in here and we’ll keep going from there.