How to use a Pro Micro as a cheap controller/converter

santeri

23 Jun 2015, 21:59

The new Pro Micro arrived today and this time I used the Soarer's Converter instead of TMK. My Model M woke up! It lives! Thanks for everybody for their input! This keyboard feels amazing!

Some keys are mapped wrong and I followed Soarer's instructions on this, but scwr did not find Soarer's converter and therefore did not push the new config file to pro micro. Any ideas on how to fix this?

User avatar
jorgenslee

12 Jul 2015, 14:25

Just adding here, if you are on Mac(yosemite), this commands works for me in identifying the device:

Code: Select all

ls /dev/cu.*
I usually got this: /dev/cu.usbmodem1441

User avatar
gogusrl

21 Sep 2015, 15:07

Ok, I want to buy an arduino clone to use in my hand wired keyboard.
These are my options, which one do I pick ?
http://www.robofun.ro/arduino/a-star-32u4-mini-sv
http://www.robofun.ro/arduino/a-star-32u4-mini-ulv
http://www.robofun.ro/arduino/a-star-32u4-mini-lv
http://www.robofun.ro/arduino/arduino_micro

Should mention I end up with 14 rows, 6 columns so a regular pro micro will not be enough.

User avatar
scottc

21 Sep 2015, 15:16

Those are all very expensive... for that price you might as well get a Teensy or Teensy++.

User avatar
HzFaq

21 Sep 2015, 15:26

I used one of these for an ADB converter which worked fine, but the postage took about a month...

http://www.ebay.co.uk/itm/360681719211? ... EBIDX%3AIT

User avatar
gogusrl

21 Sep 2015, 15:59

Is this an option ?

http://www.robofun.ro/teensy-lc

edit : I already bought a few pro micro's for converters but it doesn't have enough pins.

edit : they have the teensy++ as well but it's ~60$.

User avatar
Muirium
µ

21 Sep 2015, 16:27

I've got a spare Teensy 2++ I could sell you at cost.

User avatar
gogusrl

21 Sep 2015, 16:38

A regular teensy would be ok if I could find one for a decent price.

User avatar
flabbergast

21 Sep 2015, 20:18

Teensy LC is an ARM thing, not very well supported yet.

exp-tech.de has Teensy 2.0 for a decent price (20,50€ plus shipping from Germany - which might be a lot, but if you buy more things from them it's not so prohibitive).

EDIT: watterott is even cheaper, again shipping from DE.

User avatar
Oobly

24 Sep 2015, 14:20


User avatar
nathanrosspowell

12 Oct 2015, 22:27

I didn't see anyone post successful steps to uploading firmware via Windows. I have had some success today, so I will post the steps:

Software:
* Drivers: https://learn.sparkfun.com/tutorials/pr ... okup-guide
* Loader: http://xloader.russemotto.com/
* Putty: http://selfmod.net/using-usb-to-serial- ... ith-putty/

Steps:
1) Connect the Pro Micro to USB
2) Point it at the downloaded drivers if it doesn't install automatically
3) Open the device manager to see what COM port it connected on - e.g. COM7
4) Open a putty serial connection at that port at 1200
5) When you close this connection, the Pro Micro will go into bootloader
6) Check in the device manager, the Pro Micro will be connected on a different port for a few seconds - e.g. COM8
7) Add this line to `devices.txt` in the XLoader folder: `Leonardo(32U4);atmega32U4;avr109;57600`
8) Set up the XLoader with the bootloader port - e.g. COM8
9) Repeat the putty connection
10) When you close the connection, be ready to click 'Upload' on XLoader

I can't 100% verify as I think I have an issue with my hex file at the moment. I will update when I have more information.

User avatar
jou

12 Oct 2015, 23:57

Connecting to the serial port with 1200 baud to kick the board into bootloader only works for Arduino sketches.

I use a pair of tweezers to get into the bootloader:
  • Squeeze them to about the right distance
  • Touch RST and GND with the two ends of it
  • Lift one side
  • Put the lifted up side back on the pad
  • Lift the whole tweezer
With that, I never had much of a trouble to get into the bootloader reliably.

User avatar
nathanrosspowell

24 Oct 2015, 21:52

jou wrote: Connecting to the serial port with 1200 baud to kick the board into bootloader only works for Arduino sketches.

I use a pair of tweezers to get into the bootloader:
  • Squeeze them to about the right distance
  • Touch RST and GND with the two ends of it
  • Lift one side
  • Put the lifted up side back on the pad
  • Lift the whole tweezer
With that, I never had much of a trouble to get into the bootloader reliably.
This is working for me, but when in bootloader mode I can't figure out which port it is on (under windows) :x
I can see it as an Arduino under device manager before for a second before it reverts back to a HID input with the name that I flashed with method of using putty.

Overall, getting quick confused and frustrated with this little board :lol:

User avatar
flabbergast

26 Oct 2015, 17:03

nathanrosspowell wrote: This is working for me, but when in bootloader mode I can't figure out which port it is on (under windows) :x
I can see it as an Arduino under device manager before for a second before it reverts back to a HID input with the name that I flashed with method of using putty.
Would this help?

User avatar
HzFaq

26 Oct 2015, 17:06

I think if you look in device manager it's under the COM ports header. I know mine is COM7 normally and COM3 or something in bootloader mode.

edit - The heading is Ports (COM & LPT) or something similar.

Tiny

29 Oct 2015, 00:48

nathanrosspowell wrote: I didn't see anyone post successful steps to uploading firmware via Windows. I have had some success today, so I will post the steps:

Software:
* Drivers: https://learn.sparkfun.com/tutorials/pr ... okup-guide
* Loader: http://xloader.russemotto.com/
* Putty: http://selfmod.net/using-usb-to-serial- ... ith-putty/

Steps:
1) Connect the Pro Micro to USB
2) Point it at the downloaded drivers if it doesn't install automatically
3) Open the device manager to see what COM port it connected on - e.g. COM7
4) Open a putty serial connection at that port at 1200
5) When you close this connection, the Pro Micro will go into bootloader
6) Check in the device manager, the Pro Micro will be connected on a different port for a few seconds - e.g. COM8
7) Add this line to `devices.txt` in the XLoader folder: `Leonardo(32U4);atmega32U4;avr109;57600`
8) Set up the XLoader with the bootloader port - e.g. COM8
9) Repeat the putty connection
10) When you close the connection, be ready to click 'Upload' on XLoader

I can't 100% verify as I think I have an issue with my hex file at the moment. I will update when I have more information.
For some reason XLoader can't flash my .hex file. Can someone help me?

User avatar
flabbergast

29 Oct 2015, 10:36

Tiny wrote: For some reason XLoader can't flash my .hex file. Can someone help me?
You'll need to be more specific than this if you want us to diagnose a problem.

Tiny

29 Oct 2015, 12:50

flabbergast wrote:
Tiny wrote: For some reason XLoader can't flash my .hex file. Can someone help me?
You'll need to be more specific than this if you want us to diagnose a problem.
What can I post that would be helpful?

User avatar
flabbergast

29 Oct 2015, 13:50

Are the drivers OK, i.e. can you upload Arduino sketches from Arduino GUI? (I.e. is your Pro Micro working properly?)
Are you sure that you can put your Pro Micro into the bootloader mode (i.e. do you see it being enumerated as a different COM port for 8 seconds after reset)?
Any (error or other) messages from the XLoader?

Tiny

29 Oct 2015, 16:36

flabbergast wrote: Are the drivers OK, i.e. can you upload Arduino sketches from Arduino GUI? (I.e. is your Pro Micro working properly?)
Are you sure that you can put your Pro Micro into the bootloader mode (i.e. do you see it being enumerated as a different COM port for 8 seconds after reset)?
Any (error or other) messages from the XLoader?
Can confirm that I am entering bootloader mode fine as the COM port changes from 3 to 4 and XLoader does not output any error messages only says that the file failed to upload. I am not sure whether the drivers are OK as I have not tried to upload Arduino sketches or used the Arduino GUI. I think testing the drivers would be the best place to start for me. Will be back with an update.

User avatar
flabbergast

29 Oct 2015, 21:44

Well, Arduino is a java-based behemoth, but it also comes with 'avrdude.exe' which is another program you can use for uploading hex files, and that one is terminal-based, so you can make it be very verbose in what's going on.

Tiny

30 Oct 2015, 00:15

flabbergast wrote: Well, Arduino is a java-based behemoth, but it also comes with 'avrdude.exe' which is another program you can use for uploading hex files, and that one is terminal-based, so you can make it be very verbose in what's going on.
:D I'm actually in an AP CS class that works primarily with Java so that makes me really excited! I can use my cs knowledge for something!

User avatar
jou

30 Oct 2015, 00:28

Knowing Java won't help you much unfortunately. The Arduimo app is a wrapper around GCC and avrdude (plus a basic serial console). You still need to write C code for the micro controller…

And Java is a terrible platform for GUI applications

Hak Foo

01 Nov 2015, 07:26

Here's something that MAY be helpful for this. I was having a hard time getting it into programming by mashing the reset leads, and an even worse time trying to do it in the half-broken FreeBSD install I had... but this worked in a Win10 install with minimal hassles.

http://electronicsdesign.nl/wp/promicro_avrdude/

The trick seems to be, after you run the $port.Open() command he suggests, you get a couple seconds of window to start the programmer running- before it detaches the new port so prepare the call in a second window. If it fails, you can keep repeating the steps from $port.Open().

User avatar
flabbergast

01 Nov 2015, 07:50

The "trick" to open the port with 1200 baud only works when the pro micro is running an arduino sketch (it requires the pro micro to enumerate as a serial port, and the firmware has to monitor the port for this event and reset the controller. Firmware compiled in arduino GUI automatically does this; none of the keyboard firmwares do this).

Hak Foo

01 Nov 2015, 08:35

Fair enough. These things are almost cheap enough that you can throw them away instead of re-flashing. I guess I'm probably also biased because the Soarer firmware's "updatable config" feature and lack of recent updates means I just have to flash it once, and then work with the mapping tools in the future. Firmware that requires recompiling may be more of a saga.

User avatar
flabbergast

01 Nov 2015, 09:16

Sure, it's good to be aware of that anyway ;)
I personally have never had a problem with getting into bootloader on these boards; but then I don't use Windows and a lot of problems seem to come from Windows' handling of serial ports. By the way, on handwired boards where I expect to have to do the resetting I a lot, I just wire a pushbutton between the reset and ground pads. Pressing a button twice quickly is then a breeze.

Tiny

02 Nov 2015, 03:24

Was able to flash the pro micro using "avrdude -p atmega32u4 -P YOUR_SERIAL_PORT -c avr109 -U flash:w:filename.hex" in a command window.

User avatar
gogusrl

02 Nov 2015, 20:24


User avatar
gogusrl

07 Nov 2015, 23:53

edit : works now. well, 3 keys out of 18 but it's still a start :)

Post Reply

Return to “Workshop”