27403 Parallax Inc, 27403 Datasheet - Page 65

GUIDE APP ROBOTCS W/SUMOBOT V1.0

27403

Manufacturer Part Number
27403
Description
GUIDE APP ROBOTCS W/SUMOBOT V1.0
Manufacturer
Parallax Inc
Datasheet

Specifications of 27403

Accessory Type
Manual
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
SumoBot®
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
FOR counter = 1 TO 30
NEXT
DEBUG CR, "Speaker playing tone"
FREQOUT LedSpeaker, 2000, 3000
DEBUG CR, "All done."
END
Your Turn - Playing Musical Notes
The
Building and Testing the Pushbutton Circuit
Figure 2-5 shows the pushbutton circuit connected to P6. When the pushbutton is not
pressed, P6 senses ground through the 470 Ω and 10 kΩ resistors, and stores a 0 in its
IN6
and stores a 1 in
TOGGLE LedSpeaker
PAUSE 250
LOOKUP
input register. If the pushbutton is pressed, P6 senses the direct connection to Vdd,
Save a copy of the program as TestLedSpeakerYourTurn.bs2.
Add the variable declaration
Replace the single
FOR...NEXT
FOR counter = 0 TO 7
NEXT
Run the program and listen to the results.
Save the modified program.
Build the circuit shown in Figure 2-5.
LOOKUP counter, [1046, 1175, 1319,
FREQOUT 5, 500, note
PAUSE 25
command can be handy for storing brief sequences of musical notes.
IN6
.
loop.
1397, 1580, 1760,
1976, 2093], note
FREQOUT
note VAR Word
command in TestLedSpeaker.bs2 with this
' Flash LED on/off 15 times
' Prompt to listen for tone
' Play 3 kHz tone for 2 seconds
' Prompt user - program finished
.

Related parts for 27403