Code Structure

This code uses a Finite State Machine (FSM) scheme for its structure. It is implemented using the cotask and task_share modules provided from https://spluttflob.github.io/ME405-Support/index.html#ss_modules

Task Diagram

To give an overview of this structure, here is a Task Diagram:

Task Diagram

Task Diagram

State Transition Diagrams

To give a little more detail into each task, here are State Transition Diagrams for each task labelled in the Task Diagram.

Line Follower Task

Line Follower Task

Motor Control Task

Motor Control Task

Update QTR Sensor Task

Update QTR Sensor Task

Update IMU Task

Update IMU Task

Update ToF Task

Update ToF Task

Garbage Collector Task

Garbage Collector Task