28176 Parallax Inc, 28176 Datasheet - Page 38

KIT PARTS PROCESS CONTROL W/TEXT

28176

Manufacturer Part Number
28176
Description
KIT PARTS PROCESS CONTROL W/TEXT
Manufacturer
Parallax Inc
Datasheet

Specifications of 28176

Accessory Type
Process Control
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
BASIC Stamp® 2 and Board of Education
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
' -----[ Main Routine ]----------------------------------------------------
DO
LOOP
' -----[ Subroutines ]-----------------------------------------------------
WaitForButton:
RETURN
GetFreq:
RETURN
GetCount:
RETURN
GetDuration:
RETURN
SoundTone:
RETURN
GOSUB WaitForButton
GOSUB GetFreq
GOSUB GetCount
GOSUB GetDuration
GOSUB SoundTone
DEBUG CLS, "Press the pushbutton to begin",CR
DO
LOOP WHILE (PBVal=1)
DO
LOOP UNTIL (FreqVal <= 4000)
DO
LOOP WHILE (CountVal > 10)
DO
LOOP WHILE (DurVal > 1000)
FOR X = 1 TO CountVal
NEXT
DEBUG CR,"Enter the frequency to play (1 to 4000)",CR
DEBUGIN DEC FreqVal
DEBUG CR,"Enter the number of times to play (1 to 10)",CR
DEBUGIN DEC CountVal
DEBUG CR,"Enter the duration to play tone in milliseconds (0 to 1000)",CR
DEBUGIN DEC DurVal
FREQOUT Buzzer,DurVal,FreqVal
DEBUG "Buzzing ", DEC X,CR
' loop until within range
' loop while out of range
' loop while out of range
' Start X at 1 for counting up to CountVal
' Add 1 to X and loop if X <= CountVal

Related parts for 28176