122-28176 Parallax Inc, 122-28176 Datasheet - Page 38

GUIDE STUDENT PROCESS CONTROL

122-28176

Manufacturer Part Number
122-28176
Description
GUIDE STUDENT PROCESS CONTROL
Manufacturer
Parallax Inc
Datasheets

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
' -----[ 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 122-28176