28122 Parallax Inc, 28122 Datasheet - Page 109
28122
Manufacturer Part Number
28122
Description
KIT WHAT'S A MICRO:PARTS ONLY
Manufacturer
Parallax Inc
Datasheet
1.28123.pdf
(340 pages)
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
- Current page: 109 of 340
- Download datasheet (6Mb)
DEBUG "Player A is the winner!", CR
ELSEIF (timeCounterB < timeCounterA) THEN
DEBUG "Player B is the winner!", CR
ELSE
DEBUG "It's a tie!", CR
ENDIF
The complete solution is shown below.
' What's a Microcontroller - Ch03Prj03_TwoPlayerReactionTimer.bs2
' Test reaction time with a pushbutton and a bi-color LED.
' Add a second player with a second pushbutton. Both players
' play at once using the same LED.
' Pin P3: Player A Pushbutton, Active High
' Pin P4: Player B Pushbutton, Active High
' {$STAMP BS2}
' {$PBASIC 2.5}
timeCounterA VAR
timeCounterB VAR
DEBUG "Press and hold pushbuttons", CR,
DO
DO
' Nothing
LOOP UNTIL (IN3 = 1) AND (IN4 = 1)
LOW 14
HIGH 15
PAUSE 1000
HIGH 14
LOW 15
timeCounterA = 0
timeCounterB = 0
DO
PAUSE 1
IF (IN3 = 1) THEN
"to make light turn red.", CR, CR,
"When light turns green, let", CR,
"go as fast as you can.", CR, CR
Word
Word
Quickest to release wins.
' Time score of player A
' Time score of player B
' Display reaction
' instructions.
' Begin main loop.
' Loop until both press
' Bi-color LED red.
' Delay 1 second.
' Bi-color LED green.
' Set timeCounters to zero
' If button is still down,
Related parts for 28122
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
COMPETITION RING FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
CONTROLLER 16SERVO MOTOR CONTROL
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BASIC STAMP LOGIC ANALYZER
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: