So yesterday, I started testing the Python script to generate the keyboard board events that the emulator could recognize. The way the script works is that whenever I pressed the tact switch connected to the PIC8F4553 microcontroller, it sends a simple c character to the python script. When the python script sees the c character, it will then generate a keyboard event which the x key (A button on the N64 emulator) is pressed.
When I tested the script, it works in Windows perfectly. Heck, I could create a virtual keyboard and mouse for windows based for a couple test scripts alone (future project?). However, whenever I run the script, then run the emulator, the emulator ignores the keyboard events generated. To be fair, it recognizes it sometimes when I click the Python IDE then switch to the emulator window. I sent an email the Project64 creator, posted on the Stackoverflow forums, but it seems like no one knows why the emulator is ignoring the keyboard events. However, I realized that I will shift the project focus from a controller designed for emulators, to a controller that can be used for Pygames.
By changing the project focus to Pygames, I know for a fact I can finish the project before January 21st as well making this a RCOS project for next semester. Not to mention I still use the parts I ordered a couple days ago. What I’m going to do is get an idea of functions that will allow Pygame developers to expand their games and extra parts I will need. One of the extra parts I will need an accelerometer to add motion controls. I’ll reveal the list of controller functions later on this week.