32.1.2: First ensure you are connected to the Robo wifi. The password is provided by your teacher. Check the number written on your Pi's SSD card under the body of the robot. Login to the robot in terminal using the following command:
32.2.2: You have to be in the same folder/directory as RoboPiLib.py. This controls the movement of the robot. Also ensure that you have created a setup.py file (see the Programming Setup tab). Then type "python" into your current directory. This will open up a command window in which you can input the following code.
import RoboPiLib as RPL
import setup
This code allows the modules RoboPiLib and setup to be used
To send commands to make the robot move, try typing the following:
RPL.servoWrite(0, 1400)
What happens when you replace 0 with 1? Try changing the second value around. What happens when it's 1500? 1600? 0?
See "RoboPi Reference" for more information
32.2.3: You will be using the digital sensors. Try looking for these on your robot, and see what happens when an object is placed nearby in front of it. Begin by opening a python window and importing both modules mentioned above, ensuring you are in the same file as them.
If a sensor is plugged into sensor pin 0, we will refer to it in the code as 16 (I honestly don't know why). Try the following code:
print RPL.digitalRead(16)
What happens when an object is and isn't in front of the robot?