Transcript ECE243
ECE243
Polling Lab
1
Polling Lab
• You implement a “catch the numbers” game
• random numbers scroll to the left
– 1 per second
• player clears each number by pressing its key
• game over if a number scrolls too far
– too far = 51 numbers to the left
2
Implementation
• Devices you will use:
– UART/serial device and connection to host PC
– timer (for 1 second delay)
– random number generator function (provided)
– keyboard input (polling)
– terminal output (polling)
• terminal control escape sequences
3
Terminal Control Escape Sequences
• Eg: NOTE: ASCII for <ESC> is 0x1B (one character)
4