27316 Parallax Inc, 27316 Datasheet - Page 21

Microcontroller Modules & Accessories Penguin Robot BLACK

27316

Manufacturer Part Number
27316
Description
Microcontroller Modules & Accessories Penguin Robot BLACK
Manufacturer
Parallax Inc
Datasheet

Specifications of 27316

Product
Microcontroller Accessories
Core Processor
2PX24 Stamp
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
' Parallax Penguin Robot
' Penguin-PhotoresistorTest.bpx
' {$STAMP BS2px}
' {$PBASIC 2.5}
REmitter
LEmitter
IrInput
LeftLDR
RightLDR
OUTPUT lEmitter
OUTPUT rEmitter
INPUT
HIGH LEmitter
HIGH REmitter
DEBUG CLS
DEBUG "InfraRed sensor status:", CR,
DO
LOOP
ReadLDR:
RETURN
' Parallax Penguin Robot
' Penguin-7SegmentLEDTest.bpx
' {$STAMP BS2px}
' {$PBASIC 2.5}
LEDDisplay
DIRC = %1111
DO
LOOP
Copyright © Parallax, Inc. • Penguin (#27313-27316) • v1.0 7/12/2007
GOSUB READLDR
DEBUG CRSRXY, 6, 1, DEC LeftLDR, "
DEBUG CRSRXY, 22, 1, DEC RightLDR, "
PAUSE 150
RCTIME 0, 1, LeftLDR
HIGH 0
RCTIME 1, 1, RightLDR
HIGH 1
FOR LEDDisplay = 0 TO 9
NEXT
PAUSE 750
"Left:", CRSRXY, 15, 1,"Right:"
IrInput
PIN
PIN
PIN
VAR
VAR
VAR
2
3
4
Word
Word
OUTC
"
"
' Set IR LEDs as outputs
' and the IR receiver as
' an input
' Charge capacitors for
' photoresistor R/C circuit
' Prepare debug screen
' Update debug screen with
' status of photoresistors
' Read R/C time for each
' photoresitor then recharge
' their capacitors
' The LED display mirrors OUTC
' Set LED
' Write directly to LEDDisplay
' to change the number displayed
Page 21 of 24

Related parts for 27316