122-28176 Parallax Inc, 122-28176 Datasheet - Page 28
122-28176
Manufacturer Part Number
122-28176
Description
GUIDE STUDENT PROCESS CONTROL
Manufacturer
Parallax Inc
Specifications of 122-28176
Accessory Type
Manual
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Propeller Education (PE) Kit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
- Current page: 28 of 330
- Download datasheet (11Mb)
Example Program: LightAlarmsWithSubroutines.bs2
' -----[ Title ]-----------------------------------------------------------
' Process Control - LightAlarmWithSubroutines.bs2
' Sounds alarm based on photoresistor readings
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ Declarations ]----------------------------------------------------
Photo
LED
Buzzer
PhotoVal
PhotoMin
PhotoMax
' ---[ Initialization ] ------------------------------------------------------
PhotoMin
PhotoMax
PAUSE 1000
' -----[ Main Routine ]----------------------------------------------------
DO
LOOP
' -----[ Subroutines ]-----------------------------------------------------
ReadPhoto:
RETURN
CheckLightHigh:
RETURN
CheckLightLow:
GOSUB ReadPhoto
GOSUB CheckLightHigh
GOSUB CheckLightLow
PAUSE 500
HIGH Photo
PAUSE 10
RCTIME Photo,1,PhotoVal
DEBUG DEC PhotoVal, ",", DEC PhotoMin, "," ,DEC PhotoMax,CR
IF (PhotoVal < PhotoMin) THEN
ENDIF
IF (PhotoVal > PhotoMax) THEN
√
DEBUG "LIGHT LEVEL HIGH!",CR
FREQOUT Buzzer,100,3000
PAUSE 100
DEBUG "LIGHT LEVEL LOW!",CR
Enter and run LightAlarmWithSubroutines.bs2.
PIN
PIN
PIN
VAR
VAR
VAR
=
= 5000
500
0
5
10
Word
Word
Word
' Read light level and plot values
' Alias for photo resistor circuit on P0
' Alias for LED on P5
' Alias for buzzer on P10
' Variable to hold RC Time value
' Holds minimum light level value
' Hold maximum light level value
' Set minimum light value
' Set maximum light value
' Allow connection to stabilize -- for Chapter 2
' Test if high light level
' Test if low light level
Related parts for 122-28176
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
MANUAL FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
GUIDE STUDENT SMART SENSORS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
MANUAL PROPELLER
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
LEAD WIRES FLYING CABLE III/IV
Manufacturer:
Xilinx Inc
Datasheet:
Part Number:
Description:
BOARD ADAPTER AND FLY LEADS
Manufacturer:
Xilinx Inc
Datasheet:
Part Number:
Description:
PLATFORM CABLE USB II
Manufacturer:
Xilinx Inc
Datasheet:
Part Number:
Description:
KIT STARTER COOLRUNNER-II BUNDLE
Manufacturer:
Xilinx Inc
Datasheet:
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
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:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: