29122 Parallax Inc, 29122 Datasheet - Page 7

KIT PARTS IR REMOTE FOR BOE-BOT

29122

Manufacturer Part Number
29122
Description
KIT PARTS IR REMOTE FOR BOE-BOT
Manufacturer
Parallax Inc
Datasheet

Specifications of 29122

Accessory Type
IR Remote
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Boe-Bot®
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
LOOP
' -----[ Subroutine - Get_Ir_Remote_Code ]---------------------------------
' SONY TV IR remote subroutine loads the remote code into the
' remoteCode variable.
Get_Ir_Remote_Code:
© 2004 Parallax Inc. • IR Remote AppKit (#29122) • 10/2004
ENDSELECT
remoteCode = 0
#SELECT $stamp
CASE VolUp
CASE VolDn
CASE Mute
CASE Power
CASE TvLast
CASE ELSE
#CASE BS2, BS2E, BS2PE
#CASE BS2SX, BS2P
DEBUG "CH-"
DEBUG "VOL+"
DEBUG "VOL-"
DEBUG "MUTE"
DEBUG "POWER"
DEBUG "LAST"
DEBUG DEC remoteCode, " (unrecognized)"
DO
LOOP UNTIL irPulse > ThresholdStart
PULSIN IrDet, 0, irPulse
IF irPulse > ThresholdPulse THEN remoteCode.BIT0 = 1
RCTIME IrDet, 0, irPulse
IF irPulse > ThresholdEdge
RCTIME IrDet, 0, irPulse
IF irPulse > ThresholdEdge
RCTIME IrDet, 0, irPulse
IF irPulse > ThresholdEdge
RCTIME IrDet, 0, irPulse
IF irPulse > ThresholdEdge
RCTIME IrDet, 0, irPulse
IF irPulse > ThresholdEdge
RCTIME IrDet, 0, irPulse
IF irPulse > ThresholdEdge
DO
LOOP UNTIL irPulse > ThresholdStart
RCTIME IrDet, 1, irPulse
PULSIN IrDet, 0, irPulse
THEN remoteCode.BIT1 = 1
THEN remoteCode.BIT2 = 1
THEN remoteCode.BIT3 = 1
THEN remoteCode.BIT4 = 1
THEN remoteCode.BIT5 = 1
THEN remoteCode.BIT6 = 1
' Repeat main DO...LOOP
' Wait for end of resting state.
' Get data pulses.
' Wait for start pulse.
Page 7 of 10

Related parts for 29122