Week 6: October 1 9 - ngetachew/Portfolio GitHub Wiki
My theory from the previous entry was correct; after we replaced all of the hardware, the Robotic Arm was working perfectly. This allowed us to begin to optimize the auto()
function. No matter how much we tweaked the speeds, the arm fail to drop the ball at exactly the right position. We fixed this by calling the sendPWM()
function twice in the code, and making it so that the arm would not raise itself unless the corresponding sensor detected that the ball was there. We also made it so that if the sensor doesn't detect the ball, the arm will try to drop it in again.
After the Robotic Arm was done, we began setting up the Surface Pro's. The goal was to make it so that each person had their own to use. The setup process was initially really easy, all it took was renaming a few things in the settings. After this, however, we had to set up a vnc server to communicate with the Raspberry Pi using PyCharm.
Setting up the vnc server was no easy task. We had to mess around with the ip address of the pi so that it could connect via an Ethernet cable. To access this, I had to use the sudo ifconfig
command in termit:
Then I had to put the key, a file with a random string that acts as a code, in the correct location on the Surface Pro. Then, I placed the same thing on the pi using the following command:
cat id_rsa.pub | ssh [email protected] 'mkdir-p ~/.ssh && cat>>~/.ssh/authorized_keys
After this it was just a matter of configuring a few settings, and we were good use PyCharm to code on the pi. PyCharm is an extremely useful IDE that makes it really easy to debug code. We were able to get a special license that allowed us to use a few other useful extensions.