Description
Functions were provided to turn the mutiny lamp on and off, turn the “Not Paired” LED on and off, read and report the position of the team select switch, and turn on the music player. Each of these consisted of nothing more than setting or clearing the appropriate output line (or reading the appropriate input line) and printing a debug message to the terminal.
Pseudo-Code
MutinyAlertLED:
Set the output pin P3
Print to the terminal that the mutiny lamp was turned on
MutinyAlertLEDOff:
Clear the output pin P3
Print to the terminal that the mutiny lamp was turned off
NotPairedAlert:
Set the output pin P4
Print to the terminal that the “Not Paired” LED was turned on
NotPairedAlertOff:
Clear the output pin P4
Print to the terminal that the “Not Paired” LED was turned off
GetTeamColor:
Read the value of the input pin P0
Report the team color to the terminal
Return the value of the input pin P0
PlayMississippiQueen:
Set the output pin P1
Print to the terminal that the music player was turned on