[SOLVED] Have I bricked my Arduio Clone?

Hi All,

I got the following board from a local store.

According to the spec sheet it's an exact replica of the Arduino Mega R3 with a 16u2.

I confirmed this through my zest for experimentation as I successfully wiped the the firmware using FLIP and reinstalled the .hex files from here.

After reinstalling the firmware, I got my LCD screen and mini joystick working again without any issue.

|281x500

But my ultimate goal was to build my own HOTAS for my favourite flight simulator, so I was going see about having the mini joystick used in the flight simulator, in order to do that I would have to get the board to act like a HID game controller. So, probably with too much hast, I decided to follow the HoodLoader2 project on GitHub.

I successfully modified the board and confirmed that the board now appears as per the wiki page ...

|500x313

The trouble I have now is I feel I've gone a little too deep with this and I want to restore the board to it's original state, but using the the loader code found here I can't revert the board back as it just keeps failing, even when setting the HEXFILE code to 202 on line 11.

I've also tried to use FLIP to wipe the board ( I don't know if that will actaully work ) but FLIP is no longer able to open the port to the board. I've tried contacting the author of the project but I'm still waiting for a response.

Any suggestion would be greatly appreciated.

One suggestion would be to try to follow the procedure of writing a standard bootloader using Arduino IDE, instead of "hoot", "flip", "flop", "hotas" or other stuff most people didn't heard of here.

Hoot - Is the time I'm having learning electronics and coding.

FLIP - Is the Firmware tool by ATMEL that allows you to upload firmware to the numerous chips that Arduino boards use ... it's even mention on the Arduino site.

Flop - Is my attempt at converting my board to a HID.

HOTAS - Is an acronym for "Hands On Throttle And Stick" and commonly applied to aircraft. It basically means all aircraft functionality is accessed via switches and buttons placed on the primary flight controls of an aircraft - the Throttle and Control Column. It allows pilots to constantly keep their Hands on the controls while manipulating aircraft functions.

https://en.wikipedia.org/wiki/HOTAS

But.. I say it again Arduino IDE - Tools - Burn bootloader. Need an ISP. Did you tried that? Since you say it is quite a standard board, Arduino IDE might know better how to correctly call the underlying AVR commands for that specific board.

Ok, I think I got it,

To translate your problem in clear HLI (Human Language Interface) for you:

"I wanted to do fancy stuff by overwriting the 16U2 firmware on an Arduino Mega R3. I suspect I damaged the USB-serial firmware in it. How can I fix it?"

To answer that, my best bet is to re-program it using the onboard 16U2 ISP header, you can use an USB-ISP for that or another arduino, plus avrdude.

E.G. see this example :

DFU programming usually isn't useful for me, since the hacking I do often overwrites or replaces the DFU bootloader.

I don't care to use any of those methods above when I am done with a day of hacking the 16U2 and want to set the UNO back to stock

If you want to make a HOTAS and can be happy with 10 bit ADC then a 32U2 powered board like a Leonardo, Micro or Teensy 2 would be smart choices. You don't need to modify them at all, just write a HID sketch or a CDC sketch.

If you want 12 bit ADC then move up to a Due or other ARM chip board. For 12 bit ADC you have to be more painstaking in your wiring.

What's your sim, btw? Ever played IL2?

GoForSmoke:
If you want to make a HOTAS and can be happy with 10 bit ADC then a 32U2 powered board like a Leonardo, Micro or Teensy 2 would be smart choices. You don’t need to modify them at all, just write a HID sketch or a CDC sketch.

If you want 12 bit ADC then move up to a Due or other ARM chip board. For 12 bit ADC you have to be more painstaking in your wiring.

What’s your sim, btw? Ever played IL2?

I think I’ll get get an STM32 board, just doing some research now on them.

Yes I played IL-2 many years ago, used to hold LAN meets with 16 people, was a lot of fun. Now days I fly DCS mostly, but I also fly IL-2 BOS, and will get IL-2 BOM soon.

Looking to build the HOTAS first before going back to the sims though, otherwise I’ll never finish it :wink:

blimpyway: Ok, I think I got it,

To translate your problem in clear HLI (Human Language Interface) for you:

"I wanted to do fancy stuff by overwriting the 16U2 firmware on an Arduino Mega R3. I suspect I damaged the USB-serial firmware in it. How can I fix it?"

To answer that, my best bet is to re-program it using the onboard 16U2 ISP header, you can use an USB-ISP for that or another arduino, plus avrdude.

E.G. see this example :

Hi blimpyway ... I'll give that a go.

Before reading your reply I did try this method with no change ... http://www.gammon.com.au/bootloader

Have a look at these: http://www.pjrc.com/teensy/index.html

You can get them with or w/o pins, perfect for breadboard use or sliding female jumper ends (DuPont cables rock for this) onto. They are smaller than you might expect.

And the coding is easy especially when you have a start that might be all you need.
http://www.pjrc.com/teensy/td_joystick.html

IIRC, you should be able to have a combo stick, mouse and kb at the same time.

Also, the Teensy 2 chip is a 32U4, not a 32U2… my bad.

By any chance will you be going the fullsize Volvo Universal Joint stick? (like Fehler?)

GoForSmoke:
Have a look at these: http://www.pjrc.com/teensy/index.html

You can get them with or w/o pins, perfect for breadboard use or sliding female jumper ends (DuPont cables rock for this) onto. They are smaller than you might expect.

And the coding is easy especially when you have a start that might be all you need.
http://www.pjrc.com/teensy/td_joystick.html

IIRC, you should be able to have a combo stick, mouse and kb at the same time.

Also, the Teensy 2 chip is a 32U4, not a 32U2… my bad.

By any chance will you be going the fullsize Volvo Universal Joint stick? (like Fehler?)

Thanks for the info, have been looking at the Teensy boards too.

Don’t know what you’re referring to re the universal joint stick, is that project title? I have seen guys build control columns using uni-joints.

For me I’m stripping out the internal gimbal from my VKB Gladiator Pro …

Yah, the uni-joints. The 2 I saw used Volvo drive shaft universal joints. They had magnets on the shaft ends and linear Hall sensors placed over them.

GoForSmoke: Yah, the uni-joints. The 2 I saw used Volvo drive shaft universal joints. They had magnets on the shaft ends and linear Hall sensors placed over them.

Yes I've seen a couple of examples of those, pretty nice. I think I saw a nice example of replica Spitfire control column using a uni-joint.

It's quite common for custom builders to use hall sensors, they provide much more reliable inputs to the sim than pots, but they allow you more freedom in how the gimbal "feels" in the sim.

The VKB gimbal I'm using uses hall sensors, just need to work out the wiring.

Ok, so I seemed to have restored my board back to it's original state.

Following the FAQ on Nico's GitHub page to "Restore stock 16u2 bootloader"

https://github.com/NicoHood/HoodLoader2/wiki/Troubleshoot-FAQ#restore-stock-16u2-bootloader

... seems to have done the trick ... this time. I actually tried this before a couple of times when I wanted to roll back the changes but it didn't work, I have no idea why it's worked now.

Anyway problem solved. Cheers.