CSSE120 – Introduction to Software Development (Robotics sections)
A protocol for robot conversatoin
Implement this basic approach. If you want to implement an additional
button that uses a more advanced approach, that is OK as an advanced option.
- For the TALKING robot,
the human enters a number between 0 and 7, inclusive, in an Entry Box.
- The program translates this number into a setting of the 3 LEDs,
with each one being ON or OFF. You can use any encoding you want,
but it must be consistent (so that any particular number always yields the same
light pattern).
- The program also prints (on the screen, near the Entry Box) one of the
8 things the Remote Control can do: P, Spot, Clean, Max, Forward, Left, Right, Red Button.
- The TALKING robot now starts LISTENING (as described below).
- The TALKING robot human presses and holds the corresponding button on the Remote Control.
- Meanwhile, Robot 2 was LISTENING and in a loop, waiting for a number OTHER than 255.
- When the listening robot 2 hears a number OTHER than 255, it makes a noise (one that is clearly audible).
- The human of the TALKING robot 1 sees that and stops pressing the remote control.
- The listening robot 2 decodes what it hears and responds.
- etc.