Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up --- Bug Reports --- Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

Poll

02/19 I will add RGB led support soon, I need for that to use 3 arduino PWM pins, which are currently being used by Pedal, Start & Right. I will do 2 firmwares, one with 11 buttons, and one with 8 button+led. How should they behave?

Leave the button pins as it is now, and disable the pedal, start and dpad right buttons when the RGB led is active
0 (0%)
Swap the pedal and start pins with some of the DPad ones, and disable only the DPAD when the RGB led is active
2 (50%)
Other (post a message to tell me what you think).
2 (50%)

Total Members Voted: 4

  

Author Topic: JayBee DIY 4 IR Led Lightgun System (no calibration needed)  (Read 57287 times)

0 Members and 1 Guest are viewing this topic.

sniiki

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 9
  • Last login:October 17, 2020, 12:33:41 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #600 on: September 12, 2020, 07:54:56 am »
It's most likely been discussed somewhere in this topic already but at least for me the GUI fw flasher did not work with an eBay Arduino Pro Micro chip even though it works exactly like Sparkfun version. So just in case I'll share this short guide for one way to flash it.
I copied the flashing script from Arduino IDE console.

Atmega32u4 needs to be reset to bootloader in order for it to accept new program. To get the program com port number you need to set the Pro Micro to bootloader mode by pressing reset (reset pin to ground) twice quickly. It'll then stay in bootloader for 8 secs and during that time you can check the com port from your Windows device manager / device list. Then just run the avrdude with correct com port in place of COM12.

avrdude.exe and avrdude.conf can be found e.g. from Arduino IDE install dir. Just copy and place them in same folder with JB hex file to avoid having to enter long paths. JB.hex should be of course whatever 1-4P hex file you wish.

Code: [Select]
avrdude -C avrdude.conf -v -patmega32u4 -cavr109 -PCOM12 -b57600 -D -Uflash:w:"JayBee_IRLightGun_4Points_2.26.ino.jbgunpm1.hex":i
I'm struggling to get the LEDs oriented to make tracking stable. Using a pair of LD271 in each position @80 mA. They don't seem to be ideal for this. I wonder tho why DFrobot is so insensitive compared to e.g. old webcam with IR filter removed and a piece of floppy disk in front to block most visible light. With the latter a single SFH485P gave really good results.
Has anyone tested one of those 3-10W COB chips with or without a lens?

@JayBee would it be huge task to add some sort of simple visualization for debuggin to the GUI? There are those camera test etc. tabs but at least for me they're not showing anything. While doing the initial setup it's quite hard to spot the problem without getting any readings shown (as calibration doesn't really tell anything about e.g. not spotting one of the 4 LEDs), so I just instead plotted DFrobot library readings using another test script. Helps a lot aligning the LEDs (but aligning is still painful with current ones).

Btw. a cheap wide angle lens in front of DF cam was first idea I had when I found Samco project and noticed the annoyingly narrow angle of DF cam. Good to hear it looks promising.
« Last Edit: September 12, 2020, 07:58:31 am by sniiki »

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 328
  • Last login:Today at 01:21:06 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #601 on: September 12, 2020, 08:16:41 am »
Hey sniiki!
So to answer to all your questions, the process to flash the sparkfun model (or clones) is written in the main post.
Basically you don't need all that process, you only need to flash an empty sketch in arduino IDE as "leonardo" board.

If the avrdude isn't working that's another issue, most of the time causes because the version I give is 64bit, so indeed if you have a 32bits system you need to replace it with the arduino original.
It should be enough to make it work correctly in the GUI.

For the LEDs spec, they don't seem so bad, they are powerful enough, but have quite a narrow angle. Best setup with normal leds is using 3 per IR point, to maximize the vertical angle.
There are few other solutions written in the discord server if you want to check  ;)

The dfrobot IR cam is a wiimote aftermarket cam, and so have the same specs, which is usually good. But you might have to change the sensitivity of the cam in the GUI to match your setup.

The cam visualization and gun test functions in my GUI are made exactly for that.
What issues are you having with it? Is it greyed out or just not working?

The wide lenses work very well to increase the angle, but also has limitations. Namely the lens deformations that tend to have cause small inaccuracies on the side. Nothing huge, but still noticable if you're picky  :lol

sniiki

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 9
  • Last login:October 17, 2020, 12:33:41 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #602 on: September 12, 2020, 09:48:36 am »
Hi,
I did of course read the first post but what I mean is that the GUI flasher doesn't recognize the board (empty sketch was in so no, it wasn't in the fresh bootloader state) and thus doesn't allow flashing it. I have 64 bit OS and like said, avrdude otherwise works ok. This particular board also functions perfectly in Arduino IDE and obeys the reset command IDE sends during flashing etc. so no problem there either. Win 10 so no additional drivers required either. Just thought to mention this another / normal flashing route as I didn't see it mentioned anywhere.

I have some 1W leds on their way and I actually just spotted your one post about similar powered ones. I thought they'd still be too weak with the wide angle, based on current tests so that's why I asked if anyone has tested 3-10W ones but you seemed to have good results with those so maybe they're powerful enough. And yeah, they need some cooling to prevent melting / igniting things around :)

Test screen & cal screens work ok, but they don't give any info about seen LEDs.
Camera test tab does absolutely nothing. I guess there should be some dots shown and button status should be indicated on right side panel but nothing is happening on my screen and yes, I did press 'start testing' :).

Did you use fish eye sort of lens or a more subtle, less distorting wide lens? I have some china quality 0.67x lenses on their way (well some 3-in-1 packs where there is fish eye lens too).

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 328
  • Last login:Today at 01:21:06 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #603 on: September 12, 2020, 10:19:07 am »
Hi,
I did of course read the first post but what I mean is that the GUI flasher doesn't recognize the board (empty sketch was in so no, it wasn't in the fresh bootloader state) and thus doesn't allow flashing it. I have 64 bit OS and like said, avrdude otherwise works ok. This particular board also functions perfectly in Arduino IDE and obeys the reset command IDE sends during flashing etc. so no problem there either. Win 10 so no additional drivers required either. Just thought to mention this another / normal flashing route as I didn't see it mentioned anywhere.

I have some 1W leds on their way and I actually just spotted your one post about similar powered ones. I thought they'd still be too weak with the wide angle, based on current tests so that's why I asked if anyone has tested 3-10W ones but you seemed to have good results with those so maybe they're powerful enough. And yeah, they need some cooling to prevent melting / igniting things around :)

Test screen & cal screens work ok, but they don't give any info about seen LEDs.
Camera test tab does absolutely nothing. I guess there should be some dots shown and button status should be indicated on right side panel but nothing is happening on my screen and yes, I did press 'start testing' :).

Did you use fish eye sort of lens or a more subtle, less distorting wide lens? I have some china quality 0.67x lenses on their way (well some 3-in-1 packs where there is fish eye lens too).
What's the board name you're choosing when flashing in the arduino IDE? The arduino model detected is completely dependent of the model you choose in the list ;)
Fresh bootloader or not doesn't matter, despite what I first thought the issue isn't related to the bootloader, but to the model you choose in arduino IDE.
The difference between my app and the arduino IDE is that arduino IDE doesn't do automatic detection, so that you can select any serial arduino. My app does autodetection and therefore is limited to only the correct PID/VID, to avoid any flash on incompatible boards. The sparkfun board doesn't have the correct IDs by default. I might fix that in future app updates.
If the board is recognized but you still have issues flashing, try changing the avrdude and app properties to run them as admin, or putting them in a more short path folder.
There is no reason that shouldn't work, since the all my app does is running an avrdude command exactly as you do manually  :lol

The 1W leds I have work wonders, they allow to use it from any angle and any distance.
The only issue is that they are hard to work with as you probably saw.
But for that I'm using a psu that has both voltage and current regulation.

That's the first time I hear that the cam test does nothing. Even the buttons testing isn't showing anything when pushed?
If not, it means there is a serial communication issue between the gun and pc. If the buttons react, it means either the cam has an issue or the connection between the cam and the board is bad.
The calibration screen should also start the gun calibration, is that what's happening?
Have you tried unplug/replug the gun, restart the app, and then go directly to the cam tab without touching anything else?

Fish eyes lens has too much deformation, it messes up too much with the calibration. Wide lenses are the way to go.

sniiki

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 9
  • Last login:October 17, 2020, 12:33:41 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #604 on: September 12, 2020, 10:37:51 am »
What's the board name you're choosing when flashing in the arduino IDE? The arduino model detected is completely dependent of the model you choose in the list ;)
Fresh bootloader or not doesn't matter, despite what I first thought the issue isn't related to the bootloader, but to the model you choose in arduino IDE.
The difference between my app and the arduino IDE is that arduino IDE doesn't do automatic detection, so that you can select any serial arduino. My app does autodetection and therefore is limited to only the correct PID/VID, to avoid any flash on incompatible boards. The sparkfun board doesn't have the correct IDs by default. I might fix that in future app updates.
If the board is recognized but you still have issues flashing, try changing the avrdude and app properties to run them as admin, or putting them in a more short path folder.
There is no reason that shouldn't work, since the all my app does is running an avrdude command exactly as you do manually  :lol

Used Sparkfun Pro Micro / ATMega32U4 (5V, 16Mhz) during uploading  the empty sketch. Board info shows:
Code: [Select]
BN: Unknown board
VID: 1B4F
PID: 9206
SN: Upload any sketch to obtain it
As the GUI isn't detecting the board I can't yet confirm if there'd be any issue with the avrdude itself, but at this point it's most likely just the VID/PID thing.


Quote
That's the first time I hear that the cam test does nothing. Even the buttons testing isn't showing anything when pushed?
If not, it means there is a serial communication issue between the gun and pc. If the buttons react, it means either the cam has an issue or the connection between the cam and the board is bad.
The calibration screen should also start the gun calibration, is that what's happening?
Have you tried unplug/replug the gun, restart the app, and then go directly to the cam tab without touching anything else?

Everything else works like should. I can calibrate it normally and it functions normally, just the cam test tab is dead. Even button press indications react in no way and they too work in reality (or well, at least trigger does as I'm still running this on a breadboard so only 1 or 2 micro switches connected during testing). I tested the GUI on two different PCs and have replugged the chip several times and also flashed it few times.

Quote
Fish eyes lens has too much deformation, it messes up too much with the calibration. Wide lenses are the way to go.
I thought so. I just noticed the 'fish eye' term in some post and wondered if it really didn't affect too much the accuracy. What zoom factor did your lens have?
« Last Edit: September 12, 2020, 10:42:16 am by sniiki »

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 328
  • Last login:Today at 01:21:06 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #605 on: September 12, 2020, 10:54:27 am »
Used Sparkfun Pro Micro / ATMega32U4 (5V, 16Mhz) during uploading  the empty sketch. Board info shows:
Code: [Select]
BN: Unknown board
[b]VID: 1B4F
PID: 9206[/b]
SN: Upload any sketch to obtain it
As the GUI isn't detecting the board I can't yet confirm if there'd be any issue with the avrdude itself, but at this point it's most likely just the VID/PID thing.
Yeah that's exactly what I said in my previous message, you need to flash it as arduino Leonardo model, or else it won't work :lol

Everything else works like should. I can calibrate it normally and it functions normally, just the cam test tab is dead. Even button press indications react in no way and they too work in reality (or well, at least trigger does as I'm still running this on a breadboard so only 1 or 2 micro switches connected during testing). I tested the GUI on two different PCs and have replugged the chip several times and also flashed it few times.
Seems like a serial communication issue or something similar.
I will look into it to check if anything could be causing that.
I was also planning to add a debug mode in my app to help with this kind of cases, I might add it soon.
If you need I can send you an independent test app that should allow you to test the cam.

I thought so. I just noticed the 'fish eye' term in some post and wondered if it really didn't affect too much the accuracy. What zoom factor did your lens have?
Mine has is 0.6x, but other users successfully tested lenses from 0.36x (cheap Chinese ones).

nicr4wks

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:Today at 07:07:49 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #606 on: September 13, 2020, 11:09:29 pm »
Final piece of the puzzle landed on my desk today, the IR sensor! Can't wait to get home and put everything together.
I've got a couple of old CCTV cameras that have ~30 IR LED's on each of them, going to recycle a few and see how they behave. I assume they should give a good result as the cameras had reasonable range and angle at night. I'll test them in the GUI app to get a better idea.

JayBee I've just sent donation via PayPal for the GUI, Thanks!  :cheers:

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 328
  • Last login:Today at 01:21:06 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #607 on: September 14, 2020, 03:12:25 am »
Final piece of the puzzle landed on my desk today, the IR sensor! Can't wait to get home and put everything together.
I've got a couple of old CCTV cameras that have ~30 IR LED's on each of them, going to recycle a few and see how they behave. I assume they should give a good result as the cameras had reasonable range and angle at night. I'll test them in the GUI app to get a better idea.

JayBee I've just sent donation via PayPal for the GUI, Thanks!  :cheers:
Thanks a lot!  :cheers:
I sent the license to you email address  ;D
Yeah in my experience CCTV leds can give good result. Are they smd or normal leds?
You're using the DFRobot cam for your guns, right?

nicr4wks

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:Today at 07:07:49 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #608 on: September 14, 2020, 03:22:09 am »
Thanks a lot!  :cheers:
I sent the license to you email address  ;D
Yeah in my experience CCTV leds can give good result. Are they smd or normal leds?
You're using the DFRobot cam for your guns, right?

Received license  :D
Normal LED's, some camera's have clear LED and others have a grey/smoked LED so I'll see which perform best, luckily plenty of LED per camera if they need to be clustered.

Yes DFRobot, had to order from America was worried about postage due to covid but they arrived in 7 days exactly   :)

I'll have a couple of hours spare after work tonight so can hopefully get enough built for a quick tester.

nicr4wks

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:Today at 07:07:49 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #609 on: September 15, 2020, 07:11:06 pm »
After a couple of nights work I've got a very rough example chucked together. I was too excited to get everything connected and see it in action, now I need to go back to tidy things up and re-solder a few points  :lol

Using old CCTV LED's was a bit of a time waster, the donor cameras were so old half of the LED's were burnt out, a bunch more were dim and the remaining good ones probably aren't as bright as new, also not knowing the specs didn't help. Set them up for 1.5v 50ma with 4 LED's in each array, they get a bit warmer than I'd expect.

I found a very basic\cheap PS1 gun to experiment with, there doesn't seem to be any branding on it. Definitely will source a nicer shell going forward.

Things were going well until I cleaned up my desk and fired up MAME, after cleaning everything up the camera started picking up IR reflections from something so I gave up and went to bed  :lol




JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 328
  • Last login:Today at 01:21:06 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #610 on: September 15, 2020, 08:25:02 pm »
Nice work!  :cheers:
Messy is ok as long as it works  :lol
Yeah those reflection happen sometime, on desks or other shiny surfaces, can be quite annoying to point them down.
It could also be the sunlight. I usually get different results with different LEDs too.
But you can try changing the camera sensitivity in the settings to try to remove or at least reduce the issue  ;D

nicr4wks

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:Today at 07:07:49 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #611 on: September 17, 2020, 06:31:13 am »
I've ordered some of these LED's, they're cheap and look reasonable in the photos, but who really knows from china  :lol In the customer reviews it looks like you can remove the lens to reveal the SMD LED, but who knows the lens might actually help.
https://www.aliexpress.com/item/32962722947.html?spm=a2g0s.9042311.0.0.3a064c4digQvLZ

In MAME the crosshair jumps around a lot and loses accuracy very easily, hoping some better LED's resolve this.

Jardielsilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:Today at 08:34:55 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #612 on: September 26, 2020, 03:44:21 pm »
hello friend, sorry for my ignorance but i was wondering if you can help me finish the project, i set up the leds, and the arduino inside the pistol, but i don't know how to make it work, i want to use the retroarch and i'm watching a samco tutorial, just that when I'm going to configure the buttons on the retroach the pistol does not work, I opened the serial monitor and it is working ok, I saw that you speak of avrdude, you speak of flashing the empty sketch in the arduino's ide to work, can you help me? Thank you very much in advance.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 328
  • Last login:Today at 01:21:06 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #613 on: September 27, 2020, 12:05:33 am »
hello friend, sorry for my ignorance but i was wondering if you can help me finish the project, i set up the leds, and the arduino inside the pistol, but i don't know how to make it work, i want to use the retroarch and i'm watching a samco tutorial, just that when I'm going to configure the buttons on the retroach the pistol does not work, I opened the serial monitor and it is working ok, I saw that you speak of avrdude, you speak of flashing the empty sketch in the arduino's ide to work, can you help me? Thank you very much in advance.
In order to help you, I will need more information;
- what arduino model are you using?
- have you flashed my firmware already? The arduino by itself can't do anything.

Jardielsilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:Today at 08:34:55 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #614 on: September 27, 2020, 06:54:40 am »
estou usando arduino pro micro Atmega32u4 5v/16hz.

windows 10 64bits

pinos usados.

SDA = pino 2
SCL = pino 3
trigger = pino A2
botão A = pino A3
botao B = pino 4
pedal = pino 6
calibraçao = pino A1

« Last Edit: September 27, 2020, 07:59:08 am by Jardielsilva »

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 328
  • Last login:Today at 01:21:06 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #615 on: September 27, 2020, 09:03:53 am »
estou usando arduino pro micro Atmega32u4 5v/16hz.

windows 10 64bits

pinos usados.

SDA = pino 2
SCL = pino 3
trigger = pino A2
botão A = pino A3
botao B = pino 4
pedal = pino 6
calibraçao = pino A1
Games won't work with a test firmware, it's just for testing. You have to flash the full firmware to play.

Jardielsilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:Today at 08:34:55 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #616 on: September 27, 2020, 09:27:02 am »
como faço, onde posso encontrar o firmware atualizado?
« Last Edit: September 27, 2020, 09:34:23 am by Jardielsilva »

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 328
  • Last login:Today at 01:21:06 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #617 on: September 27, 2020, 09:46:46 am »
como faço, onde posso encontrar o firmware atualizado?
Can you please speak english? I don't understand Italian.
Everything you need to make the gun work is written in the first post.

Jardielsilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:Today at 08:34:55 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #618 on: September 27, 2020, 10:09:01 am »
where do I download the updated sketch? the only file I found was (IR_Light_Gun-2.16). it's that? can you explain how do i upload the updated sketch?
« Last Edit: September 27, 2020, 10:10:58 am by Jardielsilva »

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 328
  • Last login:Today at 01:21:06 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #619 on: September 27, 2020, 10:32:48 am »
where do I download the updated sketch? the only file I found was (IR_Light_Gun-2.16). it's that? can you explain how do i upload the updated sketch?
Like I said, everything is in the first post, including the firmware and gui download.
The 2.16 is a very old version.
You simply download the gui/firmware package of the first post and flash the firmware with it.
But for that you need a donator license.

Jardielsilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:Today at 08:34:55 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #620 on: September 27, 2020, 10:46:51 am »
the donor license I already have.
« Last Edit: September 27, 2020, 10:52:29 am by Jardielsilva »

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 328
  • Last login:Today at 01:21:06 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #621 on: September 27, 2020, 11:14:31 am »
the donor license I already have.
then I don't understand what you are asking, flashing the firmware is as simple as select your board and pushing a button in my GUI.
You don't use the IDE for it.

Jardielsilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:Today at 08:34:55 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #622 on: September 27, 2020, 11:44:14 am »
my doubt is how to load the .hex files on the arduino.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 328
  • Last login:Today at 01:21:06 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #623 on: September 27, 2020, 11:55:37 am »
my doubt is how to load the .hex files on the arduino.
Tools => Flash Firmware...

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 328
  • Last login:Today at 01:21:06 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #624 on: September 27, 2020, 12:14:22 pm »
*2020/09/28 - GUI v0.96beta
- While working on the next big update, I wanted to release a small update mainly to add direct support for the Sparkfun pro micro boards. So now no more empty sketch flashing needed!
- added the official Sparkfun drivers to the package, for those who are using Windows 7.
- added an icon to the GUI exe.

Jardielsilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:Today at 08:34:55 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #625 on: September 28, 2020, 06:54:28 am »

I managed to load the firmware with xloader. I have some doubts, I loaded the first .hex file (JayBee_IRLightGun_4Points_2.26.ino.jbgunmi1) the other .hex files, 2, 3 ... load automatically? the arduino was recognized by the GUI, what do I need to do for the buttons and camera to work, because I can only move through the pc keyboard.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 328
  • Last login:Today at 01:21:06 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #626 on: September 28, 2020, 08:14:57 am »

I managed to load the firmware with xloader. I have some doubts, I loaded the first .hex file (JayBee_IRLightGun_4Points_2.26.ino.jbgunmi1) the other .hex files, 2, 3 ... load automatically? the arduino was recognized by the GUI, what do I need to do for the buttons and camera to work, because I can only move through the pc keyboard.
The firmware 1, 2, 3 & 4 are for the player 1, 2, 3 & 4, the ones you select on the bottom part.
The only difference between those are the usb IDs that are different, to be able to keep them binded to a specific player in mame.
Can you do a camera test (in the camera test tab), and show me what you are getting?

Jardielsilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:Today at 08:34:55 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #627 on: September 28, 2020, 09:03:32 am »
nothing happens, the buttons don't work either.

Jardielsilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:Today at 08:34:55 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #628 on: September 28, 2020, 09:17:47 am »
nothing happens, the buttons don't work either.
« Last Edit: September 28, 2020, 09:26:08 am by Jardielsilva »

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 328
  • Last login:Today at 01:21:06 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #629 on: September 28, 2020, 10:27:14 am »
nothing happens, the buttons don't work either.
That grey dot in the middle shows that the communication with the board is working. But the camera can't see anything or isn't connected correctly.
Are you using a common ground for all buttons?
Also are you using the dfrobot ir cam?

Jardielsilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:Today at 08:34:55 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #630 on: September 28, 2020, 10:55:49 am »
I'm using the same gnd for the buttons and camera.

Jardielsilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:Today at 08:34:55 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #631 on: September 28, 2020, 12:05:24 pm »
I removed all the welds and soldered again

Jardielsilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:Today at 08:34:55 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #632 on: September 28, 2020, 12:16:32 pm »
now i will try to use it in the retroarch I appreciate all the patience and help. thank you very much!

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 328
  • Last login:Today at 01:21:06 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #633 on: September 28, 2020, 12:31:57 pm »
now i will try to use it in the retroarch I appreciate all the patience and help. thank you very much!
No problem, glad you got it worked  ;)

Jardielsilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:Today at 08:34:55 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #634 on: September 29, 2020, 11:14:01 am »
anyone here already managed to use in retroarch? I made the configuration like samco, but the gun only moves the mouse, the buttons do not work and a message appears saying that the pistol is not configured, only that everything is configured.
« Last Edit: September 29, 2020, 12:08:22 pm by Jardielsilva »

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 328
  • Last login:Today at 01:21:06 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #635 on: October 01, 2020, 08:38:50 am »
anyone here already managed to use in retroarch? I made the configuration like samco, but the gun only moves the mouse, the buttons do not work and a message appears saying that the pistol is not configured, only that everything is configured.
In retroarch it's per core related config. Some support the gun, some don't (it's even version/game dependent).
If the gun controls the mouse, it should also work in supported cores if setup correctly, since all the gun does is sending mouse coordinates to the PC.
However I'm not a retroarch expert so you might want to ask to the retroarch community directly for more help on that  ;)

Jardielsilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:Today at 08:34:55 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #636 on: October 01, 2020, 08:39:27 pm »
do you use mame, what lightgun games can you run on mame and what are they?

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 328
  • Last login:Today at 01:21:06 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #637 on: October 01, 2020, 09:59:38 pm »
do you use mame, what lightgun games can you run on mame and what are they?
Ok it looks like a moderator removed the link I sent, even if it doesn't contain any rom of any sort.
So I will just say that you can find the long list of mame light gun games in a few seconds on google.

Jardielsilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:Today at 08:34:55 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #638 on: October 02, 2020, 05:31:21 am »
thank you very much.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 328
  • Last login:Today at 01:21:06 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #639 on: October 04, 2020, 11:01:46 am »
Note: this time the firmware update is quite huge, with lot of changes under the hood, so you will need to click to the "reset" button of the new GUI version before or after the flash to make it work properly.

*2020/10/05 - GUI v0.97beta - Firmware 2.30 Anniversary edition
Firmware - for the 1 year anniversary of this firmware, I wanted to do a big update on it, so here are the updates so far (more incoming);
- Rewrote all libraries and code to take less space and have less global latency (down to ~4ms total processing time)
- Fixed various bugs that was causing issues to the calibration and the accuracy
- Improved a lot the global precision, especially on the sides of the screen or when moving around
- Added a "sync mode" that waits for the position to be calculated before activating the pressed buttons, instead of pressing them right away. It allows to get perfect accuracy on fast motion with a very small latency tradeoff. I recommend to leave it on.
- Changed the calibration to 5 steps (instead of the usual 3). Since the calibration has to be done only once, I decided to change it to make it way more accurate and failproof. Note that each step will only be validated if the camera sees the necessary IR points (4 for center, 3 for each side).
- Prepared the firmware for the next updates.
GUI:
- small fixes and modifications to support the new firmware.
« Last Edit: October 04, 2020, 01:37:34 pm by JayBee »