Main > Lightguns |
GUN4IR - The Ultimate 4 Points Lightgun System |
<< < (13/227) > >> |
JayBee:
--- Quote from: Mysli0210 on November 03, 2019, 04:23:41 pm --- :banghead: hit reset after writing a long reply... But I did make a schematic which I will provide when I get back from my gf in a couple of days. As for the camera it talks the same language as the robot camera. I know cause I used your 2 point sketch, with minor changes as I couldn't get axis reverse to work properly, so I changed the for loop to have #ifdef instead of if statements, which should run faster and compile smaller. I also changed a couple of the constant integers into #define. But that doesn't interfere with the dfrobot library protocol. As for the camera being the same didn't really surprise me during research. The camera is apparently either developed and maybe made by a company called pixart, but it seems to be a pretty secretive company. About the ps2 usb protocol I haven't got any clue.. But the documentation of the Linux ps2 devkit might be of use.? --- End quote --- Awesome, can't wait to see your schematic ;) It's cool we can use old wiimote sensor instead. Oh and don't throw away the wiimote rumble motors of the wiimote you salvaged parts from, you can actually use it to get rumble feedback with my sketch, for instance when reloading or firing offscreen :D But I still need to figure out what voltage they are using to not fry them (I guessed 3V, but not sure). For the sensor inversion, the problem is that DFRobot cam has both axises swapped and one inversed, because of some mistake they did, so I pretty much have to turn them 90° clockwise to make them work. So it might be a bit different if using real wiimote sensor. Yeah my 2 point code wasn't so great, it was my very first Arduino sketch :lol. In the new 4 points one I'm using mostly define and cons, it's winning a lot of memory. But I'm curious to know how you are using the #ifdef, it would be useful in my new sketch too if it can make it faster. By the way, if you want to do some modifications to my 2 points sketch, feel free to submit them to my GitHub, I will sure update it and credit you. --- Quote from: Zebra on November 03, 2019, 03:17:26 pm ---If the DF robot can really is the exact same part as found in a Wii remote then I wonder why Nintendo chose to only use one sensor bar with just one point of reference. The DF Robot cam states it can track 4. I guess the obvious answer is that they didn't intend to design it to be a light gun. --- End quote --- I guess they wanted to keep it simple for everyone to use, even everyone's grandma, while keeping it low cost for them? :lol --- Quote from: Zebra on November 03, 2019, 04:53:22 pm ---Is the PS2 USB protocol the sort of thing you can get from the EMS Topgun 3 drivers with it being another IR gun that works on the PS2 as a Guncon 2? Also, the guy that wrote the Wingun drivers is a member here. Perhaps he has some insight into how the Guncon 2 hardware works. One other place to look is the file labeled USB gun on PS2 guncon 2 game discs. I don't understand the code but my assumption is that this is the guncon 2 drivers that the PS2 uses. --- End quote --- Oh yes I will try contacting the guy who did the wingun driver, he will probably have a good idea on how things work ;D |
Mysli0210:
Not really an answer to all of the above.. (quoting is hard on the phone) BUT JUST GOT AN AWESOME IDEA! What if we were to use the nunchuck for extra buttons for those controller which dont have a d-pad and such. Got the idea from watching metal Jesus play with the gcon 2. I think it would be possible to use the plug from the wiimote by desoldering it and making a custom pcb with ordinary pimheaders to attach to the pro-Micro... Or stm32 if i can get i2c working on it :-D |
JayBee:
--- Quote from: Mysli0210 on November 04, 2019, 05:13:10 am ---Not really an answer to all of the above.. (quoting is hard on the phone) BUT JUST GOT AN AWESOME IDEA! What if we were to use the nunchuck for extra buttons for those controller which dont have a d-pad and such. Got the idea from watching metal Jesus play with the gcon 2. I think it would be possible to use the plug from the wiimote by desoldering it and making a custom pcb with ordinary pimheaders to attach to the pro-Micro... Or stm32 if i can get i2c working on it :-D --- End quote --- Yeah was thinking about that too, but decoding this communication protocol seems to be such a pain :lol And to be honest there aren't many games that support guns with dpad and all. The most convenient thing about it is being to scroll games menu with it. I guess we could also bypass the nunchuck board entirely and connect the buttons directly to the cable, but we would then need a way to read the joystick 2 axises too. |
Mysli0210:
Well was gonna say that I would take a nunchuck apart. But then i found this https://create.arduino.cc/projecthub/infusion/using-a-wii-nunchuk-with-arduino-597254 So it speaks i2c at 3.3v just as the camera, which means that it can actually share the i/o pins as they have different adresses. Which is probably how the wiimote talks to it. So it'd be super easy to implement :-D Edit: btw reading 2 joystick axes (axis in plural ;-)) is super easy, just do 2 analog reads, as they are almost always constructed as potentiometers :-) |
Zebra:
--- Quote from: JayBee on November 04, 2019, 06:31:50 am --- --- Quote from: Mysli0210 on November 04, 2019, 05:13:10 am ---Not really an answer to all of the above.. (quoting is hard on the phone) BUT JUST GOT AN AWESOME IDEA! What if we were to use the nunchuck for extra buttons for those controller which dont have a d-pad and such. Got the idea from watching metal Jesus play with the gcon 2. I think it would be possible to use the plug from the wiimote by desoldering it and making a custom pcb with ordinary pimheaders to attach to the pro-Micro... Or stm32 if i can get i2c working on it :-D --- End quote --- Yeah was thinking about that too, but decoding this communication protocol seems to be such a pain :lol And to be honest there aren't many games that support guns with dpad and all. The most convenient thing about it is being to scroll games menu with it. I guess we could also bypass the nunchuck board entirely and connect the buttons directly to the cable, but we would then need a way to read the joystick 2 axises too. --- End quote --- That's what I thought when I made my Time Crisis arcade guns into Guncon 2's but it was a big mistake. It's true that only a few guncon 2 games use the D-pad but a good number use it to navigate through the options menu. It was really annoying to have to keep unplugging the gcon to switch between Virtua Cop 1 and 2 on the Elite edition disc and I couldn't even access the menu system on Guncom 2. I put all my recoil hardware and the guncon 2 PCB in a wooden box. I ended up adding all the guncon buttons (beside the trigger) to the box and I put a joystick on the other side. My pedal also attached to the box. I suggest you do the same. You need every guncon 2 button and the d-pad unless you only want to play the Time Crisis games. Also, while you're looking at how to make the gun work on the PS2, there is a good number of rail shooters on the PS2 that currently have no gun support at all. They only allow you to use the analog stick. I am working on hooking up my positional arcade guns but you might be able to add an analog stick mode to your gun to make it work on games like Silent Scope, Combat Queen, Ghost Vibration and Operation Wolf (on the Taito legends disc). |
Navigation |
Message Index |
Next page |
Previous page |