28122 Parallax Inc, 28122 Datasheet - Page 105

KIT WHAT'S A MICRO:PARTS ONLY

28122

Manufacturer Part Number
28122
Description
KIT WHAT'S A MICRO:PARTS ONLY
Manufacturer
Parallax Inc
Datasheet

Specifications of 28122

Accessory Type
Parts Kit
Product
Microcontroller Accessories
Core Processor
PIC16C57c
Flash
128 Bytes
Operating Supply Voltage
9 V
Board Size
31 mm x 16 mm
For Use With/related Products
Board of Education Full Kit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Item-3
A player that lets go of the button before the light turns green gets an unreasonably
good score (1 ms). Your microcontroller needs to figure out if a player is cheating.
Pseudo code was introduced near the end of Activity #3 in this chapter. Here is some
pseudo code to help you apply an
If the value of timeCounter equals 1
Else, (if the value of timeCounter is greater than 1)
Modify the
one second) in the
Modify your program by implementing this pseudo code in PBASIC to fix the
cheating player problem.
What’s an algorithm? An algorithm is a sequence of mathematical operations.
What’s pseudo random? Pseudo random means that it seems random, but it isn’t really.
Each time you start the program over again, you will get the same sequence of values.
What’s a seed? A seed is a value that is used to start the pseudo random sequence. If you
use a different value (change value from 23 to some other number), you will get a different
pseudo random sequence.
o
o
PAUSE 1000 + value
Display a message telling the player he or she has to wait until after the
light turns green to let go of the button.
Display the value of timeCounter (just like in ReactionTimer.bs2) time
in ms.
PAUSE
PAUSE
command so that the random value is added to 1000 (for
IF…THEN…ELSE
command’s
Duration
statement to solve the problem.
argument.
' <- Modify this.

Related parts for 28122