geekhack

geekhack Projects => Making Stuff Together! => Topic started by: djpolstee on Tue, 05 September 2017, 10:35:01

Title: Problem with Arduino or problem with me?
Post by: djpolstee on Tue, 05 September 2017, 10:35:01
I put together a Gherkin this weekend, an intermediate step to building larger keyboards. Unfortunately, I failed to follow rule 0, which is to test components before soldering. Which leads me to where I am currently.

Is there a problem with my Arduino or with me?

I'm trying to use (anything) dfu-programmer to flash a compiled gherkin.hex to the Arduino Pro Micro (atmega32u4), and regardless of what I've tried, dfu-programmer always reports "no device present". I've tried using dfu-programmer on Mac and Kali Linux, and I've tried resetting into DFU mode by jumping rst and ground as both a 1 press and 2 press. On my mac, I can see that I get a different port assigned to it during the boot, but dfu-programmer still reports the same thing. Additionally, the ArduinoIDE sees the arduino fine, but also can't "burn bootloader".

At this stage, I'm pretty sure it's me but I'm not sure how to proceed. As I continue to scour GH for hints, any suggestions would be appreciated.
Title: Re: Problem with Arduino or problem with me?
Post by: TalkingTree on Tue, 05 September 2017, 11:03:38
Arduino Pro Micro runs on the Caterina Bootloader which the most hideous trolling prank ever conceived by the human being.
You have to press the reset button, or short the Reset with Ground pads, twice to enter the flashing mode which is not even DFU compatible.
You should be able to flash it with avrdude by setting the programmer flag (-c) to avr109.
Alternatively, if you own a USBAsp programmer, you can flash a different bootloader.
Title: Re: Problem with Arduino or problem with me?
Post by: djpolstee on Tue, 05 September 2017, 11:08:23
Interesting. Thank you for your response! I'll start down that path.
Title: Re: Problem with Arduino or problem with me?
Post by: djpolstee on Tue, 05 September 2017, 11:27:43
Thank you TalkingTree! I was able to get the Pro Micro to flash with the hex file. And it sort of works now. I'll need to play with it some more, but I think my soldering has caused the next issue.
Title: Re: Problem with Arduino or problem with me?
Post by: TalkingTree on Tue, 05 September 2017, 14:12:55
Don't mention, I'm glad you made it.
Title: Re: Problem with Arduino or problem with me?
Post by: MikeTheTiger on Thu, 07 September 2017, 04:27:11
I also am having trouble getting my Gherkin working properly. I can flash the Pro Micro, but when its attached, none of the keys register key presses. I had a similar problem earlier this week assembling my maxipad gamepad. The problem turned out to be that I had the Pro Micro facing the wrong way: board components down, when they should be facing up (away from the pcb). Is there a certain way the Pro Micro is supposed to face???
Title: Re: Problem with Arduino or problem with me?
Post by: TalkingTree on Thu, 07 September 2017, 04:31:48
Is there a certain way the Pro Micro is supposed to face???
Of course. If you flip the controller the wrong way, you've basically changed all the pins and pads in your matrix.
Title: Re: Problem with Arduino or problem with me?
Post by: MikeTheTiger on Fri, 08 September 2017, 09:10:53
Is there a certain way the Pro Micro is supposed to face???
Of course. If you flip the controller the wrong way, you've basically changed all the pins and pads in your matrix.

So on a Gherkin, it faces downward?
Title: Re: Problem with Arduino or problem with me?
Post by: TalkingTree on Fri, 08 September 2017, 10:50:45
So on a Gherkin, it faces downward?
MCU side of the Pro Micro should face the bottom side of the PCB.
Read the assembly notes (http://www.40percent.club/2016/12/gherkin-assembly.html).

(https://4.bp.blogspot.com/-FSgtkB1Ol2U/WF3ANbBy-3I/AAAAAAAB_sM/DQu62F2TBkYDkVLv-wPV3ruU7kgxBUmhQCLcB/s1600/06.jpg)
Title: Re: Problem with Arduino or problem with me?
Post by: MikeTheTiger on Fri, 08 September 2017, 19:52:16
So on a Gherkin, it faces downward?
MCU side of the Pro Micro should face the bottom side of the PCB.
Read the assembly notes (http://www.40percent.club/2016/12/gherkin-assembly.html).

Show Image
(https://4.bp.blogspot.com/-FSgtkB1Ol2U/WF3ANbBy-3I/AAAAAAAB_sM/DQu62F2TBkYDkVLv-wPV3ruU7kgxBUmhQCLcB/s1600/06.jpg)


Thanks. That what I was doing and it still gave me issues. Guess I'll give it another try.