Page 4 of 7

Re: How to Program Helder's All in One GBZ PCB with Arduino IDE

Posted: Sun Aug 14, 2016 7:42 pm
by RetroGamingNow
wermy wrote:For OSX users: I was able to program the board using the following steps:

Follow the instructions here to install the sparkfun boards for the Arduino IDE to use: https://github.com/sparkfun/Arduino_Boards
Wire up a button (or even just two wires that you momentarily press together to act as a button) to the RESET and GND pins on the board

In the Arduino IDE under the Tools menu:
Select Sparkfun Pro Micro for the Board option
Select ATMega32U4 5V, 16MHz for Processor
Select AVRISP for Programmer (NOT "AVR ISP mkii")

Press the Upload button in the Arduino IDE
Immediately press the reset button you wired up (or touch the wires together for a moment)
It should program it just fine!
I cant seem to get this to work. I was able to do everything you said above but seems like my MAC is not installing whatever drivers are necessary for this USBasp. What am i doing wrong?

Re: How to Program Helder's All in One GBZ PCB with Arduino IDE

Posted: Mon Aug 15, 2016 4:48 am
by SwingeyP
Hello again @Helder

I tried the board with a windows 7 laptop from work. Same result I am afraid.

I ordered two boards from you and so decided to wire up the second. This gives excatly the same result when connected to win10, Win7 and thePiZero. Weird to say the least. Both boards seem to program ok via the USBASP programmer. I just get nothing when connecting. No gamepads detected. No HID just an error reporting that the USB device connected has malfunctioned and an 'unrecognised USB device' in the device manager.

I find it hard to believe that both boards would not function in this way and i'm sure it's me doing something wrong. I have followed all the support threads wired up exactly as you describe. Swapped the D+ and D- wires just to check in all setting but still nothing.

I have built several arcade machines in the past using MAME and KADE. As a test I configued the KADE and tried that with my Win10 and WIn 7 machines. That worked no problem. I then connected that to the PiZero. Worked a treat! The problem doesn't appear to be with the USB on my machines or the PIZero.

Back to the AIO board I connected the USB from PI Zero connections to a USB to SERIAL convertor PCB. This allowed me to connect to COM1 and try a serial port 'sniffer' to see if anyting was going on. This also failed. Nothing happening at all when buttons pressed :-(

I'm sorry to be the one giving so much agro as everyone else seems to be up and running with no hassle.

What should I try next?

Thanks for all your help.

Paul.

Re: How to Program Helder's All in One GBZ PCB with Arduino IDE

Posted: Mon Aug 15, 2016 9:10 am
by Popcorn
For OSX, if you don't have the "Sparkfun Pro Micro" board listed in Tools / Boards, then do the following:

In the main menu bar, go to the "Arduino menu" and "Preferences"

In the last field titled "Additional Boards Manager URLs" field, enter this url:

Code: Select all

https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json
and press OK. Then go to Tools / Boards / Boards Manager.

Select Type "Contributed" and select "SparkFun AVR Boards" and "Install" and then "Close". Then in Tools / Boards, you should be able to select "SparkFun Pro Micro".

From there, just follow Wermy's instructions from there.

Re: How to Program Helder's All in One GBZ PCB with Arduino IDE

Posted: Fri Sep 09, 2016 5:00 am
by o-prime
I want to program the AIO PCB with the new controller sketches. But i get this error code while uploading:

...Desktop\Arduino\GBZ_Controller\NoAnalog\Gameboy.hex\Gameboy.hex.ino:1:21: fatal error: Gamepad.h: No such file or directory#include <Gamepad.h>^compilation terminated.exit status 1

Is this because this bootlaoder problem and i have to buy a USBASP to make it work?

Re: How to Program Helder's All in One GBZ PCB with Arduino IDE

Posted: Mon Sep 12, 2016 5:58 pm
by Helder
o-prime wrote:I want to program the AIO PCB with the new controller sketches. But i get this error code while uploading:

...Desktop\Arduino\GBZ_Controller\NoAnalog\Gameboy.hex\Gameboy.hex.ino:1:21: fatal error: Gamepad.h: No such file or directory#include <Gamepad.h>^compilation terminated.exit status 1

Is this because this bootlaoder problem and i have to buy a USBASP to make it work?
You need to download a library for it, use the images below to install the one I have highlighted.

Image

Image

Re: How to Program Helder's All in One GBZ PCB with Arduino IDE

Posted: Sat Oct 15, 2016 3:40 pm
by solder
Thx @Helder, went for it & flashed successfully on OSX using a piece of wire :o
3 tries after i noticed i was missing some Arduino library ;D
done.png
done.png (5.65 KiB) Viewed 14806 times

Re: How to Program Helder's All in One GBZ PCB with Arduino IDE

Posted: Thu Oct 20, 2016 10:55 am
by larsen2011
Also trying to use this update method, fixed the first problem (same as above for solder), now struggling with this:
In file included from D:\Documents\Arduino\New GBZ Controller Sketches\GamepadNoAnalog-HID\GamepadNoAnalog-HID.ino:1:0:

D:\Documents\Arduino\libraries\HID-Project\src/HID-Project.h:35:2: error: #error HID Project can only be used with an USB MCU.

#error HID Project can only be used with an USB MCU.
Any idea how to solve it @Helder?

Re: How to Program Helder's All in One GBZ PCB with Arduino IDE

Posted: Thu Oct 20, 2016 12:58 pm
by Helder
larsen2011 wrote:Also trying to use this update method, fixed the first problem (same as above for solder), now struggling with this:
In file included from D:\Documents\Arduino\New GBZ Controller Sketches\GamepadNoAnalog-HID\GamepadNoAnalog-HID.ino:1:0:

D:\Documents\Arduino\libraries\HID-Project\src/HID-Project.h:35:2: error: #error HID Project can only be used with an USB MCU.

#error HID Project can only be used with an USB MCU.
Any idea how to solve it @Helder?
Pictures of what you have chosen as your MCU is helpful. Be sure to choose the Leonardo as the MCU in the Auduino IDE.

Re: How to Program Helder's All in One GBZ PCB with Arduino IDE

Posted: Thu Oct 20, 2016 1:48 pm
by larsen2011
I'm a complete newbie to this Arduino topic... Sorry @helder

I've not chosen anything.
I've connected everything as per the first post, and used the software linked / the sketches linked and went through the guide. As mentioned, I was able to get rid of the first error message, as it was the same as @solder , now I don't know what to do now.

After connecting my board to the PC it showed up as "Arduino Leonardo" and not as the "Sparkfun" as shown in your pictures.

If there is another thread or external link that I can read through to get this solved, please share. Or let me please know what settings I need to change / choose in the software.

Thanks!

Re: How to Program Helder's All in One GBZ PCB with Arduino IDE

Posted: Thu Oct 20, 2016 3:12 pm
by Helder
larsen2011 wrote:I'm a complete newbie to this Arduino topic... Sorry @helder

I've not chosen anything.
I've connected everything as per the first post, and used the software linked / the sketches linked and went through the guide. As mentioned, I was able to get rid of the first error message, as it was the same as @solder , now I don't know what to do now.

After connecting my board to the PC it showed up as "Arduino Leonardo" and not as the "Sparkfun" as shown in your pictures.

If there is another thread or external link that I can read through to get this solved, please share. Or let me please know what settings I need to change / choose in the software.

Thanks!
Do everything that is on the first post and get the new sketches and when you choose the board you choose this:
Image

Be sure the board goes into the bootloader mode by using a switch or jumper wire from any GND point to the Reset on the ISP header area. Once you do go into bootloader choose the Com Port that shows in the COM Port menu in the above picture.