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 46089 times)

0 Members and 1 Guest are viewing this topic.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 275
  • Last login:Yesterday at 02:42:40 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #320 on: February 12, 2020, 09:21:52 am »
Will try this firmware.
Would also like to mention that i played HOD3 almost to the finish with the 1.65 firmware and it was extremely good.
There was only one occasion when the cursor got stuck on the upper edge of the screen for no reason, but it fixed itself once i waved the gun,
but so far, in my opinion, firmware 1.65 is probably the best for playing afar.
gonna try the test firmware now.
That's good to know! I wonder if I should disable the 2 points detection automatically when playing from afar.
I'm joking, but that would be a solution worth considering if it's really better :lol
But still, without the 2 points solution, even from afar it might not be so great aiming in corners after aiming offscreen.

That cool this firmware ...: D
I only noticed that the cursor seems to wobble more than before and in 10 minutes of the mame game (I always use Time crisis as a test) I also had the problem after 3-4 min that the cursor pointing to a point has moved in my case on the left but it happened only once and then it happens but now rarely see the duplicate cursor but for a moment and only if you point to the various sides of the screen, and it never happened to me during the action but only by moving the gun during the interludes ... We are close to perfection! :) Great JayBee!
Awesome! We are almost there! ;D
Yeah now that it's more stable I will correct the wobble a little bit.
If still too much wobble I might also add a cursor smoothing option, but disable by default since it will add some latency.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 275
  • Last login:Yesterday at 02:42:40 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #321 on: February 12, 2020, 09:37:31 am »
If you have time, could you make a 1024x480 version of the tool to test the LEDs? Thanks :)
I updated the pde file inside the test zip file, now you can edit 3 parameters at the beginning to setup your own com port and resolution ;)

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 252
  • Last login:Today at 09:20:39 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #322 on: February 12, 2020, 10:16:25 am »
Ok, i tested the new firmware from close distance, and i edited the video to highlight the issues.
https://drive.google.com/open?id=1LijcW2NvTcthuvfSOxIeua8TS7CV4YIv
In the first part, you will see the gun firing to the left while aiming right.
Second part, you will see the gun shooting offscreen when trying to shoot the cannonball.
In the third part, in the ir test, you will see the cursor getting stuck.
« Last Edit: February 12, 2020, 10:19:17 am by Foxhole »

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 275
  • Last login:Yesterday at 02:42:40 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #323 on: February 12, 2020, 11:21:19 am »
Ok, i tested the new firmware from close distance, and i edited the video to highlight the issues.
https://drive.google.com/open?id=1LijcW2NvTcthuvfSOxIeua8TS7CV4YIv
In the first part, you will see the gun firing to the left while aiming right.
Second part, you will see the gun shooting offscreen when trying to shoot the cannonball.
In the third part, in the ir test, you will see the cursor getting stuck.
Very interesting to watch the video frame by frame to see what's going on!  :cheers:
So the first two are caused by this damn 2 leds detection that don't like so much being so close to the screen either, I can clearly see how it's misdetecting them :banghead:

For the last part, I just noticed something, during just one frame you see the bottom IR point jumping on the right, which causes the detection error (the test tool has 2 frames delay more than the cursor, so you can see it happening 2 frames after the cursor stops).
It looks like the IR cam picked up something else, like a reflection of the leds on something?
I guess the tolerance on this kind of wrong detection is a bit too low, I made a test firmware, it seems a bit better with it now?
« Last Edit: May 07, 2020, 09:12:40 am by JayBee »

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 252
  • Last login:Today at 09:20:39 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #324 on: February 12, 2020, 11:50:21 am »
For the last part, I just noticed something, during just one frame you see the bottom IR point jumping on the right, which causes the detection error (the test tool has 2 frames delay more than the cursor, so you can see it happening 2 frames after the cursor stops).
It looks like the IR cam picked up something else, like a reflection of the leds on something?
Hmm, reflection... the monitor is on a glass table.
that might be it.
I'm gonna cover the area of the monitor with something to cover the glass, and i'll try the new firmware.
« Last Edit: February 12, 2020, 11:52:01 am by Foxhole »

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 275
  • Last login:Yesterday at 02:42:40 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #325 on: February 12, 2020, 12:00:39 pm »
For the last part, I just noticed something, during just one frame you see the bottom IR point jumping on the right, which causes the detection error (the test tool has 2 frames delay more than the cursor, so you can see it happening 2 frames after the cursor stops).
It looks like the IR cam picked up something else, like a reflection of the leds on something?
Hmm, reflection... the monitor is on a glass table.
that might be it.
I'm gonna cover the area of the monitor with something to cover the glass, and i'll try the new firmware.
Oh I see!
Yeah, now that we get a quite stable system is mostly tweaking and improvement.
To be honest I'm already quite happy with the result, whereas I have been told few time that doing a 4 leds system like that was impossible  :blah:
Funny thing that's the "impossible" that made me want to do it  :cheers:

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 252
  • Last login:Today at 09:20:39 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #326 on: February 12, 2020, 01:04:02 pm »
Well, bad news  :-\
covered the area up, but still issues.
Do you need a video, or at this point there's no use?
« Last Edit: February 12, 2020, 01:06:16 pm by Foxhole »

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 132
  • Last login:July 01, 2020, 04:19:23 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #327 on: February 12, 2020, 01:10:39 pm »
I updated the pde file inside the test zip file, now you can edit 3 parameters at the beginning to setup your own com port and resolution ;)
the one on the front page?

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 132
  • Last login:July 01, 2020, 04:19:23 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #328 on: February 12, 2020, 01:13:24 pm »
Yeah now that it's more stable I will correct the wobble a little bit.
If still too much wobble I might also add a cursor smoothing option, but disable by default since it will add some latency.

the oscillation is minimal so if you correct only a little it will be fine: D

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 252
  • Last login:Today at 09:20:39 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #329 on: February 12, 2020, 01:14:34 pm »
Kill_one, what is the distance between your gun and the LEDS?

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 132
  • Last login:July 01, 2020, 04:19:23 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #330 on: February 12, 2020, 01:20:40 pm »
Kill_one, what is the distance between your gun and the LEDS?


about 1mt, something more something less, having a 25 "arcade monitor it's okay I don't need to move away or get closer :)

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 132
  • Last login:July 01, 2020, 04:19:23 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #331 on: February 12, 2020, 01:26:47 pm »
https://photos.app.goo.gl/h7n7cBqrzTkwGjpRA


because the leds top and right are not as bright as the others ?


Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 252
  • Last login:Today at 09:20:39 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #332 on: February 12, 2020, 01:50:43 pm »
Firmware 1.68 works AMAZING from afar. (1~1.2M)
I was actually able to finish expert mode on point blank with the firmware.
I was able to do that only with a CRT Lightgun, never with an aimtrak or topgun, and i was actually playing closer when i was using the CRT Lightgun (Guncon).
I'm referring to the 1.68 firmware that is on the first page, not the test version.
As far as playing closer, i guess it's just not possible with this hardware, but you have accomplished an amazing work nonetheless.
though there's one thing i didn't test, and that is a larger screen.
Up until now i was using a 24" pc monitor, how far would i have to be for a 55" Oled? And will it work as reliably as the 24" monitor?
Hmm, definitely requires more testing.
« Last Edit: February 12, 2020, 02:22:10 pm by Foxhole »

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 252
  • Last login:Today at 09:20:39 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #333 on: February 12, 2020, 07:22:07 pm »
Tested the gun on a 42" inch 16:9 plasma.
In order to get a solid gaming session the gun had to be distanced at 2.3~2.4 meter, that means i was at about 3M away from the screen. To be honest, i stretched the game to 16:9, otherwise it would be very hard to play.
If i try to get closer and rely on 2 point detection, then the aame issues i had at the videos start to happen.
All in all, it's definitely better than a topgun or an aimtrak, no doubt.
If i was building a cabinet i would definitely go with this solution or maybe the sinden, though the sinden hasn't been tested yet by the community, so who knows what problems it may have.
JayBee, what are your plans, now? You said you are working on a software for the gun?
By the way, what's your paypal? I'd like to donate.
If you don't feel comfortable writing it on the forums feel free to pm me.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 275
  • Last login:Yesterday at 02:42:40 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #334 on: February 12, 2020, 08:31:10 pm »
Tested the gun on a 42" inch 16:9 plasma.
In order to get a solid gaming session the gun had to be distanced at 2.3~2.4 meter, that means i was at about 3M away from the screen. To be honest, i stretched the game to 16:9, otherwise it would be very hard to play.
If i try to get closer and rely on 2 point detection, then the aame issues i had at the videos start to happen.
All in all, it's definitely better than a topgun or an aimtrak, no doubt.
If i was building a cabinet i would definitely go with this solution or maybe the sinden, though the sinden hasn't been tested yet by the community, so who knows what problems it may have.
JayBee, what are your plans, now? You said you are working on a software for the gun?
By the way, what's your paypal? I'd like to donate.
If you don't feel comfortable writing it on the forums feel free to pm me.
I'm glad we got it working the way it is, thanks for your careful testing it really helped  :cheers:
Yeah the distance sounds about right, on my 42" screen the minimum working distance is 1.2 meter, but indeed the best working distance is more far.
I had an idea to improve that tho, I made my firmware to support mamehooker integration, allowing me to change the gun settings on a game basis.
Some games don't require to shot in angles, or don't have offscreen reload (always aiming onscreen).
So with those games I could add an option to automatically disable the 2 leds detection, which would then decrease the errors a lot. Or disable the 2 leds detection by default and enable it only for games that need it.
Or enable it only if the distance is far enough from the IR leds... So far without MameHooker that would be the easiest solution.
I will think about it  :lol

Next in my roadmap:
- add a bit more of aim precision back to reduce wobble
- add a user define screen aspect ratio. It should help with the whole detection process and simplify usage.
- design rumble and solenoid schematics for the first post
- add a cursor smoothing option for people who want a very stable cursor (it will be disabled by default, because it adds some latency)
- improve the button management function for more optimization/customization
- finally add the support for temperature sensor, to regulate the solenoid speed and keep it cool
- improve the MameHooker integration, for feedback triggered by the games themselves, and various other options
- add an option to always hold the secondary button when aiming onscreen, activated only when playing a game with cover system like Time Crisis (to play without pedal)
- create a user friendly tool with a nice UI to change all of the gun parameters (default modes, options, mapping, screen ratio...)
- add various other options and polish all the system until it's the best consumer lightgun system ever  8)
- go to the next projects (Kaimana arcade button light system custom firmware, Arduino light system...)

Still many things and fun ahead, right? :D

https://photos.app.goo.gl/h7n7cBqrzTkwGjpRA
because the leds top and right are not as bright as the others ?
Wait, I still see your cab scrolling light under the stick, the one that messes up with the gun. You didn't hide/switched it off?  :lol
Also yeah, on cam the right and upper leds and very dim, maybe still not good angle?

Edit: I added a donate link in the first post and my signature  :cheers:
« Last Edit: February 12, 2020, 10:49:48 pm by JayBee »

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 132
  • Last login:July 01, 2020, 04:19:23 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #335 on: February 12, 2020, 09:34:09 pm »
Wait, I still see your cab scrolling light under the stick, the one that messes up with the gun. You didn't hide/switched it off?  :lol
Also yeah, on cam the right and upper leds and very dim, maybe still not good angle?
Then covered or did not do the same problem and that is it moves down but rarely with the latest firmware: D

How can I go about arranging those LEDs better?

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 275
  • Last login:Yesterday at 02:42:40 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #336 on: February 12, 2020, 10:11:28 pm »
Then covered or did not do the same problem and that is it moves down but rarely with the latest firmware: D

How can I go about arranging those LEDs better?
You mean it doesn't change when covered? It has to be fully covered (no light should pass through) or switched off anyway, the IR cam is clearly still picking up this scrolling light ;)

If you can add one more led by point like Foxhole did (don't forget to change the resistor), and be sure the led are all pointing forward, it should work better.

Edit: by the way I made a fullscreen version of the led test tool, I will upload it later ;)
« Last Edit: February 12, 2020, 10:47:12 pm by JayBee »

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 132
  • Last login:July 01, 2020, 04:19:23 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #337 on: February 13, 2020, 03:46:17 am »
You mean it doesn't change when covered? It has to be fully covered (no light should pass through) or switched off anyway, the IR cam is clearly still picking up this scrolling light ;)
yes, works the same way covered the leds or not...

If you can add one more led by point like Foxhole did (don't forget to change the resistor), and be sure the led are all pointing forward, it should work better.

what resistance would it take then? and would the 5v 1a power supply suffice?

could the fact of the dim light of the upper and right LEDs be that sometimes the cursor duplicates or moves?

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 275
  • Last login:Yesterday at 02:42:40 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #338 on: February 13, 2020, 05:25:03 am »
yes, works the same way covered the leds or not...
I see. Well you have to cover them anyway since the IR cam is picking them up, it will never work correctly if the cam is seeing more than the needed 4 led points :lol
You don't have a switch to simply turn it off?

what resistance would it take then? and would the 5v 1a power supply suffice?

could the fact of the dim light of the upper and right LEDs be that sometimes the cursor duplicates or moves?
Wait, before building more hardware let's do a bit more testing with your current setup to be sure of what to do.
Can you cover the bottom scrolling lights, launch the test tool, and slowly move from one screen angle to the other with your gun?
I will post the fullscreen tool soon, it will be more convenient for you.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 275
  • Last login:Yesterday at 02:42:40 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #339 on: February 13, 2020, 05:59:04 am »
@kill_one
I added the fullscreen test tool in the main post ;)

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 132
  • Last login:July 01, 2020, 04:19:23 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #340 on: February 13, 2020, 06:08:10 am »
@kill_one
I added the fullscreen test tool in the main post ;)

Great! I'll try it as soon as I get home, you don't have to set the resolution right?

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 275
  • Last login:Yesterday at 02:42:40 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #341 on: February 13, 2020, 06:32:27 am »
Great! I'll try it as soon as I get home, you don't have to set the resolution right?
Yes, it should work no matter the resolution ;)

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 132
  • Last login:July 01, 2020, 04:19:23 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #342 on: February 13, 2020, 09:21:23 am »
Yes, it should work no matter the resolution ;)
Last firmware test not work... It's normal

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 275
  • Last login:Yesterday at 02:42:40 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #343 on: February 13, 2020, 09:31:23 am »
Yes, it should work no matter the resolution ;)
Last firmware test not work... It's normal
What do you mean by not working?
I just tested both the last firmware with the last fullscreen tool, it works perfectly.

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 132
  • Last login:July 01, 2020, 04:19:23 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #344 on: February 13, 2020, 10:11:25 am »
Yes, it should work no matter the resolution ;)
Last firmware test not work... It's normal
What do you mean by not working?
I just tested both the last firmware with the last fullscreen tool, it works perfectly.
flashing the attached test firmware does not show the LEDs but only the mouse cursor, I attach the link to the video
https://photos.app.goo.gl/L5QZzyAWVCAgy99b7

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 275
  • Last login:Yesterday at 02:42:40 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #345 on: February 13, 2020, 10:16:16 am »
Yes, it should work no matter the resolution ;)
Last firmware test not work... It's normal
What do you mean by not working?
I just tested both the last firmware with the last fullscreen tool, it works perfectly.
flashing the attached test firmware does not show the LEDs but only the mouse cursor, I attach the link to the video
https://photos.app.goo.gl/L5QZzyAWVCAgy99b7
Did you change the com port to match yours? (It changes alone sometime)
And by the way why do you have a crosshair ? Is that a Windows cursor? :lol

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 132
  • Last login:July 01, 2020, 04:19:23 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #346 on: February 13, 2020, 10:22:15 am »
Did you change the com port to match yours? (It changes alone sometime)
you're right I forgot to edit port com port in the pde file ... try again tonight! : D
And by the way why do you have a crosshair ? Is that a Windows cursor? :lol
yes... :D i use this https://www.deviantart.com/zarpex/art/Weapon-Crosshair-Cursor-Pack-299011995

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 275
  • Last login:Yesterday at 02:42:40 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #347 on: February 13, 2020, 10:25:25 am »
Did you change the com port to match yours? (It changes alone sometime)
you're right I forgot to edit port com port in the pde file ... try again tonight! : D
And by the way why do you have a crosshair ? Is that a Windows cursor? :lol
yes... :D i use this https://www.deviantart.com/zarpex/art/Weapon-Crosshair-Cursor-Pack-299011995
That's a really cool cursor pack! I'm going to try it on my arcade PC :D

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 132
  • Last login:July 01, 2020, 04:19:23 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #348 on: February 13, 2020, 10:27:03 am »
I have to put this string "myPort = new Serial (this, "COM1", 9600);" otherwise it doesn't work
In my opinion you should put a note on this on the first page ...: D

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 275
  • Last login:Yesterday at 02:42:40 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #349 on: February 13, 2020, 10:35:36 am »
I have to put this string "myPort = new Serial (this, "COM1", 9600);" otherwise it doesn't work
In my opinion you should put a note on this on the first page ...: D
No no, you just have a value to modify at the beginning of the pde file now, there is even an explanation written in it ;)
The "comPort" value. Replace the 0 by whatever your port number is.

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 132
  • Last login:July 01, 2020, 04:19:23 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #350 on: February 13, 2020, 10:38:13 am »
I have to put this string "myPort = new Serial (this, "COM1", 9600);" otherwise it doesn't work
In my opinion you should put a note on this on the first page ...: D
No no, you just have a value to modify at the beginning of the pde file now, there is even an explanation written in it ;)
The "comPort" value. Replace the 0 by whatever your port number is.
ah ok! thanks

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 132
  • Last login:July 01, 2020, 04:19:23 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #351 on: February 13, 2020, 10:48:52 am »
Did you change the com port to match yours? (It changes alone sometime)
you're right I forgot to edit port com port in the pde file ... try again tonight! : D
And by the way why do you have a crosshair ? Is that a Windows cursor?
yes... :D i use this https://www.deviantart.com/zarpex/art/Weapon-Crosshair-Cursor-Pack-299011995
That's a really cool cursor pack! I'm going to try it on my arcade PC :D
Yep, is very cool! I love it ;)

Inviato dal mio Redmi Note 5 utilizzando Tapatalk


kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 132
  • Last login:July 01, 2020, 04:19:23 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #352 on: February 14, 2020, 04:26:56 am »
https://photos.app.goo.gl/24YUJ6pBf3WQqWne6

here you find various tests that I did yesterday, I have not yet figured out whether the points should be there or not, however in the game it works very well apart from time to time a duplicate cursor comes out for a second but it does it mainly in the interludes almost never during the game action, and I noticed that it does even if the gun points to the center of the screen, I think it may depend on the side and top LEDs that are less bright than the lower ones, it can center that the direct current reaches them and the others are connected to these in cascade?
Or could it be that the resistance is not working properly?

even if in the test the points see them all 4 so I have no idea why they are so dim

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 275
  • Last login:Yesterday at 02:42:40 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #353 on: February 14, 2020, 05:29:07 am »
https://photos.app.goo.gl/24YUJ6pBf3WQqWne6

here you find various tests that I did yesterday, I have not yet figured out whether the points should be there or not, however in the game it works very well apart from time to time a duplicate cursor comes out for a second but it does it mainly in the interludes almost never during the game action, and I noticed that it does even if the gun points to the center of the screen, I think it may depend on the side and top LEDs that are less bright than the lower ones, it can center that the direct current reaches them and the others are connected to these in cascade?
Or could it be that the resistance is not working properly?

even if in the test the points see them all 4 so I have no idea why they are so dim
I think the dim leds are more because of the angle, on your tests it seems to be picking them up ok.
But I can see a bit more what's happening now; the camera is picking up points that aren't there, on the left and right side.
I suspect that the LEDs are being reflected on the inner sides of your cabinet.
Can you try orient the left and right LEDs a bit more towards the center? Or maybe for testing purposes you can put some tape on them on the outer side (or put some clothes to avoid reflection). and see if it's any better.

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 132
  • Last login:July 01, 2020, 04:19:23 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #354 on: February 14, 2020, 11:56:31 am »
I think the dim leds are more because of the angle, on your tests it seems to be picking them up ok.
But I can see a bit more what's happening now; the camera is picking up points that aren't there, on the left and right side.
I suspect that the LEDs are being reflected on the inner sides of your cabinet.
Can you try orient the left and right LEDs a bit more towards the center? Or maybe for testing purposes you can put some tape on them on the outer side (or put some clothes to avoid reflection). and see if it's any better.
tonight i try.. ;)

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 132
  • Last login:July 01, 2020, 04:19:23 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #355 on: February 14, 2020, 01:11:39 pm »
OK! IRL540 mosfets have arrived, I have changed the connections, can you tell me if everything is ok? thank you very much :) rather arigato gozaimasu!!! :D

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 275
  • Last login:Yesterday at 02:42:40 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #356 on: February 15, 2020, 09:07:46 am »
* 2020/02/15 - 1.70
- restored the cursor accuracy without increasing the load, it should eliminate most wobbles
- put everything in only one zip and renamed the batches file for more clarity.


OK! IRL540 mosfets have arrived, I have changed the connections, can you tell me if everything is ok? thank you very much :) rather arigato gozaimasu!!! :D
Yes, it looks ok!  :applaud:
In the version 1.7 I restored the cursor accuracy, now it should be as smooth as before ;)

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 252
  • Last login:Today at 09:20:39 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #357 on: February 15, 2020, 09:49:20 am »
I don't know if this is happening only to me or if it's an issue with the code or the arduino itself but i have noticed some issues.
The first one isn't a big deal but i think i should mention, sometimes after flashing a firmware the gun barely works, basically messing up with the detection and just works very strangely.
A simple unplug and replug of the usb cable fixes it. Is that happening only to me? This isn't consistent though, sometimes it works just fine.
The second issue, which is a bigger deal, is that sometimes when trying to change modes with the gun, basically pressing the calibration button or disabling off screen button 2, it will sometimes cause the gun to get completely stuck, forcing either to unplug and replug the gun or sometimes it's just enough to get the gun to its former state, for example if the gun was set to 16:9 mode and then i try and change to 4:3 in 16:9 the gun will get stuck, pressing the calibration button once again doesn't help since it's now changing to 4:3 mode, but if i press twice, bringing me back to 16:9 mode, it then starts working again, but of course i still have to replug the gun if i want to get to 4:3 in 16:9 mode.
The same issue happens when disabling offscreen reload (Mouse Button 2).
I haven't tested changing the settings with mamehooker, i'm only using the buttons for now.
Have you had this issue, JayBee? Any ideas what's causing this? The arduino perhaps? i'm using sparkfun brand arduino.
« Last Edit: February 15, 2020, 09:51:05 am by Foxhole »

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 275
  • Last login:Yesterday at 02:42:40 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #358 on: February 15, 2020, 11:45:19 am »
I don't know if this is happening only to me or if it's an issue with the code or the arduino itself but i have noticed some issues.
The first one isn't a big deal but i think i should mention, sometimes after flashing a firmware the gun barely works, basically messing up with the detection and just works very strangely.
A simple unplug and replug of the usb cable fixes it. Is that happening only to me? This isn't consistent though, sometimes it works just fine.
The second issue, which is a bigger deal, is that sometimes when trying to change modes with the gun, basically pressing the calibration button or disabling off screen button 2, it will sometimes cause the gun to get completely stuck, forcing either to unplug and replug the gun or sometimes it's just enough to get the gun to its former state, for example if the gun was set to 16:9 mode and then i try and change to 4:3 in 16:9 the gun will get stuck, pressing the calibration button once again doesn't help since it's now changing to 4:3 mode, but if i press twice, bringing me back to 16:9 mode, it then starts working again, but of course i still have to replug the gun if i want to get to 4:3 in 16:9 mode.
The same issue happens when disabling offscreen reload (Mouse Button 2).
I haven't tested changing the settings with mamehooker, i'm only using the buttons for now.
Have you had this issue, JayBee? Any ideas what's causing this? The arduino perhaps? i'm using sparkfun brand arduino.

The first issue is a bit weird, but I think I did have the same thing sometimes.
I will try to search where it's coming from, if anybody has the same thing with other arduino sketches.

For the second one, I just realized what's happening, I added the offscreen mode switch a bit fast earlier, and it might be conflicting with the other calibration button functions.
Short version: when switch the offscreen mode without pointing the screen, it might change the input mode as well ::)

Long version if you are interested:
The calibration button has 5 different functions:
Single push => change screen mode
Hold for few seconds => do calibration
Hold Trigger button then single push => change the offscreen shot mode
Hold A button then single push => change the input mode
But if you press the trigger offscreen, it sees it as the A button, so the firmware sees it has A + calibration button, and changes the input mode instead ::)
I definitely have to fix that :P

But it's strange if it's also happening when you do a single push, I never had that.
Reworking the button management is actually what I am doing right now, to make it more robust/bug free, and prepare it for future customization.
So it should solve this kind of bugs.

There 2 upcoming feature that might help with this kind of issues too;
- being able to input your own screen aspect ratio in the arduino eeprom, then you would have only 2 modes, fullscreen content, and 4:3 content. Easier to switch.
- adding support for a RGB led, that will be used for both seeing the status of the gun (blinking led with different colors for each mode and settings) and also feedback (fire, reload blink and more with mamehooker).

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 275
  • Last login:Yesterday at 02:42:40 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #359 on: February 16, 2020, 03:03:25 am »
* 2020/02/16 - 1.75
- fixed the combo buttons functions (joystick mode, offscreen shot...)
- reworked the buttons management to decrease risks of bugs and future-proof it
- did a lot of small optimization to increase the execution speed.
- changed the zip file, firmware name and flash bat again, now you can know which firmware you have, and choose between normal and test firmware. Please don't mix with the previous files.

@FoxHole
This update should fix the second issue you've been having ;)