A small project completed in one day with resources available at hand.
This hardware and code allows to connect two 8-bit era joysticks to a modern PC as USB game controllers. Optionally the joystick events can be translated into keypresses: WSAD and arrow keys.
It was built in three hours using a small food container, two DB9 male sockets, one Arduino Micro Pro and some wires as all the components.
I have just rewritten joystick code in fully object-oriented fashion.
Earlier DigitalJoystick constructor needed 13 arguments (USB Joystick handle, 5 pins, 5 keys, potx and poty). Now it is constructed from objects xAxis, yAxis and trigger.
there is no code repetition anymore - both axes are handled by the same class
the code is easier to read
the cost? there was no cost, I saved 24 bytes of flash
I put "again" in the title because of earlier experiences from my other project (check out "Programming" section). It is actually more efficient to write fully object-oriented code for 8-bit microcontroller.
I'm searching a Sketch for 2 Joystick with 2 or more fire buttons (Amiga\Msx Joystick) How is the max number of buttons we can define with 2 joystick and 1 Arduino Micro? When project is ready and I connect it to my windows pc, Do I see 2 gamepad at the same time? The connection is standard or I always have to config them? (For example with a commercial gamepad Fire buttons and directonal buttons are plug and play configured always ) Thanks
I'm searching a Sketch for 2 Joystick with 2 or more fire buttons (Amiga\Msx Joystick)
How is the max number of buttons we can define with 2 joystick and 1 Arduino Micro?
When project is ready and I connect it to my windows pc, Do I see 2 gamepad at the same time?
The connection is standard or I always have to config them? (For example with a commercial gamepad Fire buttons and directonal buttons are plug and play configured always )
Thanks