Week 2: September 4 September 10 - ngetachew/Portfolio GitHub Wiki

For the first two days of this period, we kept working with Joysticks using Pygame. I already had Pong working with joysticks on my Pi, so I was modifying the program to utilize certain buttons on the joystick and create “cheat codes”. For example, if a player pushes the joystick forward and presses the top button(Button 0), it would reverse the direction of the ball. Although these modifications were pointless, it helped me learn how to handle joystick events.

The following two days consisted of building and fixing existing hardware. First we took on the Robotic Arm. There wasn’t much documentation for setting up the board, so me and some other people had to improvise and use the code to figure out where the connections go. Once the hardware was completely connected, it was discovered that the software we had some problems, so other members of the team were delagated to solving this. Meanwhile, I began to work on the Perpetual Motion machine. I first read through the code and created a document describing which components were supposed to go to each port. Other members of the team then completed the proccess of putting the board together.

Today(Monday), I worked with a mentor to hookup a Motorola battery to the Raspberry Pi using PiJuice. It is relatively easy to have the board execute commands after certain predefined events, such as low battery. The goal, however, is to get it to turn off after a certain amount of time being disconnected from the charger. Since this is not one of the predefined events, it will be challenging to get it to detect when the charger is disconnected and run a script. My current strategy is to edit the source code to allow for such an event.