Yesterday, I just placed the order from Sparkfun for the prototype of the controller. The prototype will be implemented on a breadboard first before progressing any further. As you guys can tell from the shopping cart, I brought 12 tact switches with a nice round top on each one, left and right bumpers, and two analog sticks. One analog stick will be for the analog stick on the N64 and the other analog stick will be for the C buttons. The reason why I’m mapping the C buttons to an analog stick is because I figured I could create a controller similar to a PS3 or 360 controller, which feels natural to me. I have no idea how long it will take the order to get here in Philadelphia, but my guess is next week before Christmas.
Anyway, I started to mess around with the serial library for Python. Using the library was much more simpler than I thought as there are plenty of documentation on how to use the library. To understand how the library works, I wrote a simple little code in python that not only sends the letter c to the PIC microcontroller, but waits up to 1 seconds for the PIC microcontroller to send “hello” to it. Originally, I wanted to paste the code to this paste, however, the code editor for wordpress is really poor and will mess up the coding syntax of Python. The way the code works is that whenever I’m prompted to enter a character, it will either exit the program, or transmit the letter ‘c’ to the PIC18F4553 microcontroller. When the microcontroller pick up the c, it will transmit “hello” to the computer.
It seems like there are some timing issues since I get a weird character after the first transmission. I’m going to look into how to resolve this issue until the parts come in. I will also learn how the keyboard event generator will work in Python.