Week 05 - lglik/Portfolio GitHub Wiki
9/19/18 - 9/25/18
Day One:
Pretty much all of the robotic arm was working. I could run the automatic movement part of the code, but it would not do much of anything. I looked through the code and realized that the auto code would move the arm to pick up the ball depending on where it detects that the ball is. The issue was that it was not detecting the ball as being anywhere. I took apart the robotic arm towers and directly held the ball against the sensors. One of them did not work at all, and I replaced it with a different sensor that I determined to be working. The second one worked in the sense that the light on the sensor would turn on when the ball was present. However, when I ran the code to look for a GPIO signal, none was detected. All of the other groups working on a robotic arm or a perpetual motion machine had the same issue as well.

The ports and the sensors for the robotic arm
Day Two:
Because everyone had this problem, it seemed quite apparent that the issue must be that with the current set up, the SlushEngine could not accept input on any on the ports. From using the CheckGPIO program and the logic analyzer I, with the help of others, determined that the voltage on the pins was not at any of the expected levels that the SlushEngine could understand. It needed a pull-up resistor. A device like the SlushEngione would typically have such a resistor, but we concluded that if there is one, it must not be enabled. From looking through the docuimentation, it was clear that there indeed were pull-up resistors on the board, but it was not clear to us how to enable them with code. As a temporary workaround, Karina and I connected resistors from each of the pins to PWR, manually adding in our own resistors. Much to everyone's suprise, this didn't work. need to be enabled for it to accept sensor input
Day Three:
On this day, I took a break from working on the robotic arm to help with the One Calorie Counter project. Most of the project was completed, but they needed some help with making it look nicer and neater for display. There were lots of cables all over the place inside the project going to various motors, servos, sensors, and boards. First, I would insert the wires into a braided cable sleeve so that they would all look the same and people would not be able to see the connectors or spliced together wires. I then started taping down all the cables and running them along the backs of the beam, not as a final solution to how to manage the cables but just too see which ones were too long or too short. Once I finished this up, I joined Blake and Ken who had been working on the way to program the Pis from Surface Pro Tablets remotely. I worked with them to figure out how to generate RSA keys and copy them to the Pi. Then we used PuTTY and SSH to connect and control the Pi via git Bash on the Surface Tablet.
How the Pi and the Surface Pro Tablet are hooked up
Day Four:
While Pis are great for many things, they are a pain to write code on. They struggle with more than three tabs of Chromium open and don't have the capacity or the ability to run any useful IDE. To solve this, we worked on trying to control remotely, program, and debug the Pis from the comfort of a Surface Pro Tablet. Having gotten the tablet to connect, we then installed wing. Wing is a somewhat high-end Python IDE that has a bunch of very nice and handy features. With it, we view remote files in a file manager, open them, modify and run them. A key aspect of this is that when we press run on the tablet, the code doesn't execute there, but on the Pi. It took quite a lot messing around with various settings and configuring things in Wing, but we were eventually able to get it to work. I also experimented a lot with the debugging tool by adding breakpoints, and stepping in and over parts of the code. The next step was to make a new image of the tablet with all of the correct settings and programs and flash that image onto all the other tablets. I followed some online instructions on a forum and was successfully able to save an image of the tablet to an external hard-drive.
A tablet having a new image flashed onto it
Day Five:
I was able to successfully clone all of the programs and many of the settings onto the new tablet. However, many of the settings, such as the IP address to try to connect to with SSH needs to be set every time. To facilitate all of the other students working on this, I created a guide. I made sure to include many marked up images and screenshots with detailed steps to ensure that it is all very straightforward. This took quite some time and is what I spent pretty much my whole day doing.