It is recommended you read through all Labsheets before you start, and then decide on which areas you need to focus on. If you have prior experience programming, there may be areas you can skip.
Code template available on this github, called Labsheet_X, and create copies replacing the X with the number of the labsheet you are currently working on. This is the simplest way to keep versions of your code.
Very basic exercises to familiarise with coding and the 3Pi+ robot.
Labsheet 2: Motors
Exercises to get your robot moving, steps to be confident that your code will behave predictably, and writing a Class.
Labsheet 3: Line Sensors
Incremental exercises to get the line sensors working. The first difficult programming exercise in terms of logic and iteration.
Labsheet 4: Line Following
Exercises to read the line sensors (input) and to produce useful motion (output). The first case of autonomous behaviour. Debugging robot behaviours may be a challenge (e.g., "this isn't doing what I expected" might not be just a software problem).
Labsheet 5: Finite State Machine
Exercises to help you to begin to organise your code and to switch between different robot behaviours.
Labsheet 6: Odometry
Exercises to use the rotary encoders, and to transform this information into an estimation of the robot location.
Labsheet 7: PID
Exercises to tune a PID speed controller for the left and right motors. This will help to improve the quality of motion of your robot.
Supplementary Labsheets (Assessment 2)
Labsheet Title
Description
SL0: Battery Voltage
How to read the battery voltage of your 3Pi+.
SL1: Interrupts and Timers
How to configure a precise timer to run code automatically.
SL2: Bump Sensors
How to read the bump sensors.
SL3: Inertial Sensors
How to read the Gyro, Accelerometer and Magnetometer sensors.
SL4: Non-Volatile Memory
How to read and write data into memory which persists when the robot is powered off.
SL5: Retrieving Data
How to plug in a USB cable and retrieve data without resetting your robot.
SL6: Graphing Results
Example Python/Colab code to plot various graphs for Assessment 2.
SL7: Serial Input
How to use the Serial interface to provide input to your robot.