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

0 Members and 1 Guest are viewing this topic.

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
  • Last login:Today at 04:46:01 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #440 on: February 21, 2020, 01:23:23 pm »
I set it up like this my mamehooker default.ini

[General]
MameHookerStart=
MameHookerStop=
MameStart=cmo 1 baud=9600_parity=N_data=8_stop=1, cmo 2 baud=9600_parity=N_data=8_stop=1, cmw 1 S, cmw 2 S, cmw 1 A2, cmw 2 A2, cmw 1 J0, cmw 2 J0
MameStop= cmw 1 s0, cmw 1 r0, cmw 1 E, cmw 2 E, cmc 1, cmc 2
StateChange=
OnPause=
OnRotate=
[KeyStates]
RefreshTime=33

[Output]

but in the debug window I don't receive any messages from the games, I can't understand what else I need to set ... :(

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:Today at 04:21:59 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #441 on: February 21, 2020, 08:04:55 pm »
I set it up like this my mamehooker default.ini

[General]
MameHookerStart=
MameHookerStop=
MameStart=cmo 1 baud=9600_parity=N_data=8_stop=1, cmo 2 baud=9600_parity=N_data=8_stop=1, cmw 1 S, cmw 2 S, cmw 1 A2, cmw 2 A2, cmw 1 J0, cmw 2 J0
MameStop= cmw 1 s0, cmw 1 r0, cmw 1 E, cmw 2 E, cmc 1, cmc 2
StateChange=
OnPause=
OnRotate=
[KeyStates]
RefreshTime=33

[Output]

but in the debug window I don't receive any messages from the games, I can't understand what else I need to set ... :(
you shouldn't change the default file, or else it will overwrite the game settings  ;)
I think I know the problem; in your mame.ini (in your mame directory) you need to change the output setting from whatever it is now to windows.
Like this:
Code: [Select]

#
# OSD OUTPUT OPTIONS
#
output                    windows


kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
  • Last login:Today at 04:46:01 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #442 on: February 24, 2020, 03:37:46 am »
I think I know the problem; in your mame.ini (in your mame directory) you need to change the output setting from whatever it is now to windows.
Like this:
Code: [Select]

#
# OSD OUTPUT OPTIONS
#
output                    windows

Yes!
it was this! Now works...

however, there are games where nothing comes out, such as Point Blank 1 while the JAP Gunbarl version does and Point Blank 2 as well

this is output of Gunbarl.ini and Ptblank2.ini
Code: [Select]
[Output]
Player1_Gun_Recoil=
Player2_Gun_Recoil=
P2_Start_lamp=
the ini file it must be so ?
Code: [Select]
[General]
MameStart=cmo 1 baud=9600_parity=N_data=8_stop=1, cmo 2 baud=9600_parity=N_data=8_stop=1, cmw 1 S, cmw 2 S, cmw 1 A0, cmw 2 A0
MameStop=cmw 1 E, cmw 2 E, cmc 1, cmc 2
StateChange=
OnRotate=
OnPause=
[KeyStates]
RefreshTime=
[Output]
Player1_Gun_Recoil=cmw 1 s0|cmw 1 s1
Player2_Gun_Recoil=cmw 2 s0|cmw 2 s1
P2_Start_lamp=

r0 e r1
if I want to use the rumble?

A0 in my case because I have the 4: 3 monitor

these settings are correct?

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:Today at 04:21:59 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #443 on: February 24, 2020, 04:10:56 am »
however, there are games where nothing comes out, such as Point Blank 1 while the JAP Gunbarl version does and Point Blank 2 as well
Point Blank 1 don't have feedback on Mame, no matter the version, you can't make it work even by doing a manual ini file.
If MameHooker doesn't create a new ini file when you starting new games, it's not supported.
You can of course manually create a ini file if you want to change some settings, but you won't get any feedback.

r0 e r1
if I want to use the rumble?

A0 in my case because I have the 4: 3 monitor

these settings are correct?
Yes those are correct  ;)
But for games that support gun feedback of course :lol

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
  • Last login:Today at 04:46:01 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #444 on: February 24, 2020, 04:30:22 am »
Point Blank 1 don't have feedback on Mame, no matter the version, you can't make it work even by doing a manual ini file.
If MameHooker doesn't create a new ini file when you starting new games, it's not supported.
You can of course manually create a ini file if you want to change some settings, but you won't get any feedback.

Ah ok! now I understand...
is there a list of supported games?

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:Today at 04:21:59 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #445 on: February 25, 2020, 02:39:44 am »
Ah ok! now I understand...
is there a list of supported games?
I haven't found any  :(
However it's pretty simple if you activate the Mamehooker notifications, you will hear it telling you the first time you use a game that has support ;)

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
  • Last login:Today at 04:46:01 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #446 on: February 26, 2020, 03:52:17 am »
After changing the com port of one of the guns to com1 (it was written in use) the gun when I connect it to the usb port and it is detected on com1 the ir pointing no longer works, I tried to restart shut down but nothing, changing the port while the USB is detected and installed, the pointing works and then again it no longer works, even changing the com port does not work, I also tried to reinstall the firmware and recalibrate the gun nothing to do, the other gun instead always works regardless of the change of port com ... Is there a way to reset all the settings or remove and reinstall the drivers to restart from scratch?

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:Today at 04:21:59 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #447 on: February 26, 2020, 04:55:05 am »
After changing the com port of one of the guns to com1 (it was written in use) the gun when I connect it to the usb port and it is detected on com1 the ir pointing no longer works, I tried to restart shut down but nothing, changing the port while the USB is detected and installed, the pointing works and then again it no longer works, even changing the com port does not work, I also tried to reinstall the firmware and recalibrate the gun nothing to do, the other gun instead always works regardless of the change of port com ... Is there a way to reset all the settings or remove and reinstall the drivers to restart from scratch?
You assigned the COM port to one already in use, so the arduino stopped working.
Before changing any port, remove/change the ones that are using them.
To display all devices go in View menu => Show Hidden Devices
Reinstalling the drivers or the firmware won't do anything in that case, you need to unplug everything, delete every devices using a COM port, and replug your arduino.
To be sure your calibration is not the cause, don't redo a calibration, just enter calibration mode and then press the calibration button briefly, it should reset it to default.
You shouldn't reinstall the firmware every time there is an issue by the way, the firmware stays in the arduino memory no matter what ;)

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
  • Last login:Today at 04:46:01 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #448 on: February 26, 2020, 10:12:56 am »
I removed all the devices that use the com ports, checked the hidden ones, uninstalled arduino ide and usb drivers and reinstalled, when the gun is connected, arduino lenoardo com 8 is detected and while it does it works perfectly then stops after a while and no longer works, I don't think at this point that it's a COM port problem the LEDs in the ir camera and the Arduino are on so I don't think the USB cable broke ... I don't understand, the other two guns I made work regularly.


if I keep the calibration button pressed the cursor moves to the center correctly but the calibration reset procedure does not seem to work because when the usb cable is reconnected it is the same as before
« Last Edit: February 26, 2020, 10:14:47 am by kill_one »

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:Today at 04:21:59 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #449 on: February 26, 2020, 10:41:11 am »


I removed all the devices that use the com ports, checked the hidden ones, uninstalled arduino ide and usb drivers and reinstalled, when the gun is connected, arduino lenoardo com 8 is detected and while it does it works perfectly then stops after a while and no longer works, I don't think at this point that it's a COM port problem the LEDs in the ir camera and the Arduino are on so I don't think the USB cable broke ... I don't understand, the other two guns I made work regularly.


if I keep the calibration button pressed the cursor moves to the center correctly but the calibration reset procedure does not seem to work because when the usb cable is reconnected it is the same as before

Reinstalling the drivers or IDE won't change anything if your other guns are working.
If it works for a while when you plug it, then stop working suddenly it's not a firmware nor calibration issue (calibration is only for aiming correction anyway, it doesn't change the way the gun works).
When the gun stops working, are the buttons and feedbacks still working?
If yes, you probably have a weak connection with the cam.
If no, it's another hardware issue, you should check everything, like short circuits or anything that might cause the Arduino to freeze.
You can also leave your gun open to test if the Arduino led is blinking when you trigger buttons.

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
  • Last login:Today at 04:46:01 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #450 on: February 26, 2020, 11:01:58 am »
When the gun stops working, are the buttons and feedbacks still working?
If yes, you probably have a weak connection with the cam.
If no, it's another hardware issue, you should check everything, like short circuits or anything that might cause the Arduino to freeze.
You can also leave your gun open to test if the Arduino led is blinking when you trigger buttons.


tonight I'll check ... but what do you mean by  a weak connection with the cam?

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:Today at 04:21:59 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #451 on: February 26, 2020, 11:08:44 am »
When the gun stops working, are the buttons and feedbacks still working?
If yes, you probably have a weak connection with the cam.
If no, it's another hardware issue, you should check everything, like short circuits or anything that might cause the Arduino to freeze.
You can also leave your gun open to test if the Arduino led is blinking when you trigger buttons.


tonight I'll check ... but what do you mean by  a weak connection with the cam?
I meant a lose connection of the camera wires.

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
  • Last login:Today at 04:46:01 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #452 on: February 26, 2020, 01:34:32 pm »
I meant a lose connection of the camera wires.
you mean SDA and SCL? Because the red led of the cam is always on

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:Today at 04:21:59 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #453 on: February 26, 2020, 09:04:34 pm »
I meant a lose connection of the camera wires.
you mean SDA and SCL? Because the red led of the cam is always on
I mean any of the wires.
If it loses connection even for one micro second at a bad timing it can cause it to stop working.
But first, check if your buttons are still working when the tracking stops, if they aren't it's probably not coming from the cam!
Always check by steps, it's important.

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
  • Last login:Today at 04:46:01 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #454 on: February 26, 2020, 09:38:31 pm »
The flashing red LED of the keys when it stops pointing remains fixed and no key works anymore, I tried to reflect the firmware but it gives me an error, I changed the USB cable and it still blocks that the Arduino has skipped?

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:Today at 04:21:59 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #455 on: February 26, 2020, 10:08:41 pm »


The flashing red LED of the keys when it stops pointing remains fixed and no key works anymore, I tried to reflect the firmware but it gives me an error, I changed the USB cable and it still blocks that the Arduino has skipped?

Don't try to reflash my firmware, I told you it's going to do more harm than anything else if the Arduino isn't working correctly.
Unless there is a firmware update, flash it only once. If anything wrong happens during the flash it can easily brick your Arduino!

There is obviously something wrong in your wiring that makes the Arduino freeze, the input LEDs should always blink when pressing keys no matter what, even if my firmware crashes.

Please check all the electronic/wiring again.

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
  • Last login:Today at 04:46:01 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #456 on: February 27, 2020, 03:56:51 am »
Don't try to reflash my firmware, I told you it's going to do more harm than anything else if the Arduino isn't working correctly.
Unless there is a firmware update, flash it only once. If anything wrong happens during the flash it can easily brick your Arduino!

There is obviously something wrong in your wiring that makes the Arduino freeze, the input LEDs should always blink when pressing keys no matter what, even if my firmware crashes.

Please check all the electronic/wiring again.

I had tried to flash the test firmware but without results, the problem does it even with arduino and the 4 pins of the camera dfrobot only, i bricked arduino or ir camera defect? Although I don't understand why as soon as it connects to the USB port it works  :dunno  :banghead:   :laugh2:

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:Today at 04:21:59 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #457 on: February 27, 2020, 04:45:09 am »
Don't try to reflash my firmware, I told you it's going to do more harm than anything else if the Arduino isn't working correctly.
Unless there is a firmware update, flash it only once. If anything wrong happens during the flash it can easily brick your Arduino!

There is obviously something wrong in your wiring that makes the Arduino freeze, the input LEDs should always blink when pressing keys no matter what, even if my firmware crashes.

Please check all the electronic/wiring again.

I had tried to flash the test firmware but without results, the problem does it even with arduino and the 4 pins of the camera dfrobot only, i bricked arduino or ir camera defect? Although I don't understand why as soon as it connects to the USB port it works  :dunno  :banghead:   :laugh2:
Are you sure the Arduino isn't on the same com port as another device anymore?
If and only if it's on a unique com port, remove everything connected to the Arduino and try flashing an empty sketch with the Arduino IDE, after selecting the right com port.
If it doesn't work, check what error it gives you.
If it's a problem resetting the arduino, use a wire on the reset pin to flash an empty sketch (you will find the process online).
Try on another computer too just in case.
If after all those tests it still doesn't work, it means your arduino is fried.

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Online Online
  • Posts: 239
  • Last login:Today at 10:56:39 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #458 on: February 27, 2020, 07:58:57 am »
Sorry for reporting this only now but i had a lot going on.
i installed firmware 1.76 when you released it but i didn't get to use the gun since i was busy working on upgrading my cabinet.
I plugged the gun today to play some mame games and i immediatly noticed that the gun has developed some offset to the left, meaning i have to point beyond the right border of the screen for the cursor to reach the border.
The cursor is not centered when i'm aiming at the center, it's a bit to the left.
At first i thought it was the ir camera messing up so i tried recalibrating but that didn't help so i opened the gun and reseated the camera, still didn't help.
Checked resolution, aspect ratio and etc, and nothing helped and then i remembered that i installed the 1.76 and didn't test it, so i returned to firmware 1.75 and it's now working well.
Any idea what's going on with the 1.76 firmware?

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:Today at 04:21:59 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #459 on: February 27, 2020, 08:21:47 am »
Sorry for reporting this only now but i had a lot going on.
i installed firmware 1.76 when you released it but i didn't get to use the gun since i was busy working on upgrading my cabinet.
I plugged the gun today to play some mame games and i immediatly noticed that the gun has developed some offset to the left, meaning i have to point beyond the right border of the screen for the cursor to reach the border.
The cursor is not centered when i'm aiming at the center, it's a bit to the left.
At first i thought it was the ir camera messing up so i tried recalibrating but that didn't help so i opened the gun and reseated the camera, still didn't help.
Checked resolution, aspect ratio and etc, and nothing helped and then i remembered that i installed the 1.76 and didn't test it, so i returned to firmware 1.75 and it's now working well.
Any idea what's going on with the 1.76 firmware?
Thanks for reporting the bug  :cheers:
You're right there is an issue with the 1.76 calibration, it will be corrected in the next firmware (coming very soon).

a small teaser for one of the new firmware big functionalities:

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:Today at 04:21:59 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #460 on: February 27, 2020, 10:41:09 am »
Here is the new update, the biggest update so far since the very first release!
I added a ton of functionalities and made it ready for the future companion app I want to make.
As usual, feel free to tell me how it works for you  :cheers:



* 2020/02/28 - 1.85 major update, please read the changelog carefully before updating!

- rewrote the whole flashing and config tool, now a lot more user friendly!
- made a double timing test to be able to flash any arduino. No need to modify the bat file anymore.
- various optimizations
- IR points detection bug corrected, it should be a bit more stable now
- reworked the buttons management
- merged normal and test firmware, now the test tool should trigger the test mode (replug the arduino once to reboot in normal mode)

- added RGB LED support for the 7 button + LED firmware! If your gun uses more than 7 buttons or if you don't want LED support please use the 11 buttons firmware
- added temperature sensor support! connect a tmp36 sensor to pin A0
- added rumble and LED feedbacks when changing modes
- added various LED feedbacks
- added EEPROM save and load gun data

- updated the game screen ratio modes for better usage and compatibility, now there are only 2; fullscreen and 4:3. Obviously changing this option will have no effect if you have a 4:3 screen.
- updated the test tool, now the one pde tool supports both normal and full screen, and has more options (don't use the old tools)
« Last Edit: February 27, 2020, 10:43:11 am by JayBee »

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Online Online
  • Posts: 239
  • Last login:Today at 10:56:39 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #461 on: February 27, 2020, 08:54:06 pm »
Updated to the latest firmware, cleared the eeprom, and now the gun doesn't respond to anything.
It's effectively dead.
Should i go back to firmware 1.75? Something i can try?

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Online Online
  • Posts: 239
  • Last login:Today at 10:56:39 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #462 on: February 27, 2020, 09:01:24 pm »
Correction: The ir test does work, it's like the gun is somehow stuck in test mode, it doesn't move the cursor or respond to buttons at all.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:Today at 04:21:59 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #463 on: February 27, 2020, 09:14:27 pm »
Correction: The ir test does work, it's like the gun is somehow stuck in test mode, it doesn't move the cursor or respond to buttons at all.
Ah it just means the EEPROM clear didn't work for some reasons.
I think I know why, the timings of my batch tool still need some adjustments.
Can you go back to the batch file and redo an EEPROM clear (for the clear EEPROM menu, not the firmware flash).

Edit:
Uploaded a new version of the batch with a timing change to trigger the EEPROM memory clear correctly.
« Last Edit: February 27, 2020, 09:32:10 pm by JayBee »

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Online Online
  • Posts: 239
  • Last login:Today at 10:56:39 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #464 on: February 28, 2020, 12:51:08 am »
Still the same.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:Today at 04:21:59 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #465 on: February 28, 2020, 01:24:13 am »
Still the same.
That's weird, I tested my 4 guns and they all worked fine :dunno
Which version of the firmware did you flash?
Can you go in the Arduino IDE with the gun plugged, go into the serial command, type the capital letter D and press send?
It should give you some of the EEPROM data.
If it gives you numbers other than -1, it means the memory clear isn't working on your arduino from my batch for some reasons.
If that's the case, entering "ZC" (without the quote marks) in the serial command prompt should solve it.
Try that even if you don't get any numbers when typing D, just in case.

Edit: by the way, I made a discord server for support and news, it should be more convenient:
https://discord.gg/HJyfYja
« Last Edit: February 28, 2020, 01:28:20 am by JayBee »

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Online Online
  • Posts: 239
  • Last login:Today at 10:56:39 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #466 on: February 28, 2020, 01:33:56 am »
Still the same.
That's weird, I tested my 4 guns and they all worked fine :dunno
Which version of the firmware did you flash?
Can you go in the Arduino IDE with the gun plugged, go into the serial command, type the capital letter D and press send?
It should give you some of the EEPROM data.
If it gives you numbers other than -1, it means the memory clear isn't working on your arduino from my batch for some reasons.
If that's the case, entering "ZC" (without the quote marks) in the serial command prompt should solve it.
Try that even if you don't get any numbers when typing D, just in case.

Edit: by the way, I made a discord server for support and news, it should be more convenient:
https://discord.gg/HJyfYja
I'm using the dpad firmware.
Typing D or ZC on the serial monitor brings no results whatsoever.

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Online Online
  • Posts: 239
  • Last login:Today at 10:56:39 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #467 on: February 28, 2020, 01:38:40 am »
OK, it seems it's working again, i've tried the eeprom clear and the ZC Again, after reconnecting the gun it started working again.
But, Aiming is off again, this time to the right of the screen and not the left, and the calibration button doesn't work.
Also, on the serial monitor i didn't get any reply whatsoever no matter what i typed.
I made sure that it's the correct com port.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:Today at 04:21:59 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #468 on: February 28, 2020, 01:39:38 am »
I'm using the dpad firmware.
Typing D or ZC on the serial monitor brings no results whatsoever.
It's even more strange, since the test app is working those serial commands should work as well (the test app is sending some serial commands too).
Did you do a power cycle after doing the ZC command?

Edit:
OK, it seems it's working again, i've tried the eeprom clear and the ZC Again, after reconnecting the gun it started working again.
But, Aiming is off again, this time to the right of the screen and not the left, and the calibration button doesn't work.
Also, on the serial monitor i didn't get any reply whatsoever no matter what i typed.
I made sure that it's the correct com port.
Yeah the serial should answer something only to the D command, but it's ok as long as the clear did work.
So since the EEPROM is cleared it's resetting the calibration to 0, it's normal that you get an offset again.
But the calibration not working is another issue indeed, I will check that later today and give you a fixed version.
« Last Edit: February 28, 2020, 01:47:14 am by JayBee »

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Online Online
  • Posts: 239
  • Last login:Today at 10:56:39 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #469 on: February 28, 2020, 01:55:52 am »
I have a feeling it's because i'm new to arduino, i'm probably missing a library or something like that.
Maybe it's because i use a sparkfun pro micro.
Anyway, i'm on the discord.

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
  • Last login:Today at 04:46:01 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #470 on: February 28, 2020, 03:21:52 am »
Here is the new update, the biggest update so far since the very first release!
I added a ton of functionalities and made it ready for the future companion app I want to make.
As usual, feel free to tell me how it works for you  :cheers:



* 2020/02/28 - 1.85 major update, please read the changelog carefully before updating!

- rewrote the whole flashing and config tool, now a lot more user friendly!
- made a double timing test to be able to flash any arduino. No need to modify the bat file anymore.
- various optimizations
- IR points detection bug corrected, it should be a bit more stable now
- reworked the buttons management
- merged normal and test firmware, now the test tool should trigger the test mode (replug the arduino once to reboot in normal mode)

- added RGB LED support for the 7 button + LED firmware! If your gun uses more than 7 buttons or if you don't want LED support please use the 11 buttons firmware
- added temperature sensor support! connect a tmp36 sensor to pin A0
- added rumble and LED feedbacks when changing modes
- added various LED feedbacks
- added EEPROM save and load gun data

- updated the game screen ratio modes for better usage and compatibility, now there are only 2; fullscreen and 4:3. Obviously changing this option will have no effect if you have a 4:3 screen.
- updated the test tool, now the one pde tool supports both normal and full screen, and has more options (don't use the old tools)

Great JayBee, I will try it this weekend, in the meantime I have already ordered the sensors and the RGB LEDs ...: D is there any need for other additional components such as capacitors or resistors? I read that rgb pins should be put resistors, if so which ones? and for the TMP36 is a 0.1uf capacitor correct?
is the connection of the TMP is simply this: Pin1 + 5v Pin2 (central) pin arduino Pin3 gnd (and capacitor possibly)?

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:Today at 04:21:59 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #471 on: February 28, 2020, 03:25:48 am »


Here is the new update, the biggest update so far since the very first release!
I added a ton of functionalities and made it ready for the future companion app I want to make.
As usual, feel free to tell me how it works for you  :cheers:



* 2020/02/28 - 1.85 major update, please read the changelog carefully before updating!

- rewrote the whole flashing and config tool, now a lot more user friendly!
- made a double timing test to be able to flash any arduino. No need to modify the bat file anymore.
- various optimizations
- IR points detection bug corrected, it should be a bit more stable now
- reworked the buttons management
- merged normal and test firmware, now the test tool should trigger the test mode (replug the arduino once to reboot in normal mode)

- added RGB LED support for the 7 button + LED firmware! If your gun uses more than 7 buttons or if you don't want LED support please use the 11 buttons firmware
- added temperature sensor support! connect a tmp36 sensor to pin A0
- added rumble and LED feedbacks when changing modes
- added various LED feedbacks
- added EEPROM save and load gun data

- updated the game screen ratio modes for better usage and compatibility, now there are only 2; fullscreen and 4:3. Obviously changing this option will have no effect if you have a 4:3 screen.
- updated the test tool, now the one pde tool supports both normal and full screen, and has more options (don't use the old tools)

Great JayBee, I will try it this weekend, in the meantime I have already ordered the sensors and the RGB LEDs ...: D is there any need for other additional components such as capacitors or resistors? I read that rgb pins should be put resistors, if so which ones? and for the TMP36 is a 0.1uf capacitor correct?
is the connection of the TMP is simply this: Pin1 + 5v Pin2 (central) pin arduino Pin3 gnd (and capacitor possibly)?

Yeah you need one resistor per pin for the led, but the value depends of the specs of your led (check its datasheet).
The tmp don't need any other components, it should work as is, and yes your connection is right ;)

Be careful tho, you can't connect both dpad and rgb LEDs at the same time

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
  • Last login:Today at 04:46:01 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #472 on: February 28, 2020, 03:33:13 am »
Are you sure the Arduino isn't on the same com port as another device anymore?
Yes
If and only if it's on a unique com port, remove everything connected to the Arduino and try flashing an empty sketch with the Arduino IDE, after selecting the right com port.
If it doesn't work, check what error it gives you.
gives me an error in the compilation, collect.exe -1 while reading the card no problem
If it's a problem resetting the arduino, use a wire on the reset pin to flash an empty sketch (you will find the process online).
Try on another computer too just in case.
the same on another pc, i managed to install the new D-PAD 1.85 firmware by deleting the eprom data, in fact the cursor is now off-center again, but the pointing always stops after a few seconds, on the other hand I too can no longer do the calibration, if I keep the calibration button pressed, the cursor does not move to the center of the screen
If after all those tests it still doesn't work, it means your arduino is fried.
I really hope the arduino is fried and not the cam ...: D today another pro micro should arrive, hopefully well, I better flash the firmware 1.75 or 1.85 to be sure of the operation?

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:Today at 04:21:59 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #473 on: February 28, 2020, 03:36:56 am »
Are you sure the Arduino isn't on the same com port as another device anymore?
Yes
If and only if it's on a unique com port, remove everything connected to the Arduino and try flashing an empty sketch with the Arduino IDE, after selecting the right com port.
If it doesn't work, check what error it gives you.
gives me an error in the compilation, collect.exe -1 while reading the card no problem
If it's a problem resetting the arduino, use a wire on the reset pin to flash an empty sketch (you will find the process online).
Try on another computer too just in case.
the same on another pc, i managed to install the new D-PAD 1.85 firmware by deleting the eprom data, in fact the cursor is now off-center again, but the pointing always stops after a few seconds, on the other hand I too can no longer do the calibration, if I keep the calibration button pressed, the cursor does not move to the center of the screen
If after all those tests it still doesn't work, it means your arduino is fried.
I really hope the arduino is fried and not the cam ...: D today another pro micro should arrive, hopefully well, I better flash the firmware 1.75 or 1.85 to be sure of the operation?
Yeah it's most likely the Arduino.
Flash the 1.75, the 1.85 needs some fixes

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
  • Last login:Today at 04:46:01 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #474 on: February 28, 2020, 03:54:17 am »
You could also review the 7-button version, because there are guns like mine that only have the trigger, 2 buttons and D-PAD, it would be more convenient to use the following buttons: TRIGGER, START, A BUTTON, D-PAD or at least in the my case :)


Could the button associated with the Pedal still be used by connecting it to the A button or am I wrong?
Thanks so much :)

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:Today at 04:21:59 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #475 on: February 28, 2020, 09:40:18 am »
* 2020/02/28 - 1.86
- fixed calibration issues
- fixed aiming issues
- fixed the flash/clear tool

You could also review the 7-button version, because there are guns like mine that only have the trigger, 2 buttons and D-PAD, it would be more convenient to use the following buttons: TRIGGER, START, A BUTTON, D-PAD or at least in the my case :)
Could the button associated with the Pedal still be used by connecting it to the A button or am I wrong?
Thanks so much :)
With the dpad 4 direction this gun has 7 buttons (8 with the pedal). It will also need a 9th button for calibration.
So it's possible to support it with the led if you sacrifice one button for calibration, and the pedal (of if you connect the pedal and B on the same pin).
But it would require changing the pinout again, reason why I asked about it in the last poll  :lol

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:Today at 04:21:59 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #476 on: February 28, 2020, 11:50:56 am »
* 2020/02/28 - 1.87
- 2 points detection is now inactive if too close from the screen, to avoid misdetection

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:Today at 04:21:59 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #477 on: February 29, 2020, 09:24:22 am »
* 2020/02/29 - 1.91
- rewrote the 3 points aiming calculation, it's way more precise now
- changed the test tool to better see the led recognition.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:Today at 04:21:59 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #478 on: February 29, 2020, 09:29:14 am »
@kill_one just to be sure, the issue you had of the gun which stops working after a while, did it stop working when you use the test app?
If yes it's totally normal since the test app switches the firmware in test mode, and you have to replug the gun to switch back to normal.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 234
  • Last login:Today at 04:21:59 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #479 on: March 01, 2020, 01:46:02 am »
I've been doing experiments with some 1W 120 degrees leds from china.

The good news;
They work extremely well, from any angle, even from more than 45degrees on the side.
The good news;
They use a lot of energy, and produce a LOT of heat. Like way too much to use without a heat dissipating system or something.

I will try changing the resistors to see if I can reduce the heat, and add small metal frames to dissipate it.
If it works I think we can safely say that I found the perfect leds for this system :D