Main > Raspberry Pi & Dev Board
Mounted Guns and Arduino mouse mapping
Hydreigon:
--- Quote from: syntax_x on July 30, 2019, 12:29:03 am ---I recently purchased an arcade cabinet that has those mounted type guns.
They are basically just 2x10k pots and a switch for the trigger.
I wanted to interface them with an Arduino to a mame PC to play a heap of different games.
In mame I would map it to the mouse.
My problem is all the code i have found so far accelerates the cursor depending on xy values. This causes the gun to drift and is not how it should play.
I need to find a way to map out the corners of my screen and calibrate a centre, so xy values = a specific screen position.
Any pointers??
--- End quote ---
What arcade machine did you buy? Did it ever have any main board or monitor?
baritonomarchetto:
The default Arduino mouse library threat the mouse position as "relative". This means you can move the mouse pointer a definite amount of pixels in each direction od the axis of choice, relative to the previous position. You are in the need for an alternate library with absolute positioning. There are at least two of those libs, if I remember well.
Zebra:
Why don't you just use an Apac and avoid all those issues?
I use them for my positional guns and they are super easy to set up.
Navigation
[0] Message Index
[*] Previous page
Go to full version