A Few Musical Notes
Plays a few notes on a Piezo element tied between two pins on the EZSBC1. Demonstrates the TONE keyword.
PINMODE 12,OUT 'Piezo + 330 Ohm resistor
PINMODE 13,OUT 'Piezo other terminal
OUTD 13,0 'Make pin 13 low
'Tone Pin#, Duration, Frequency
TONE 12,400,392 'do
TONE 12,400,415 're
TONE 12,400,466 'mi
TONE 12,400,523 'fa
TONE 12,400,587 'so
TONE 12,400,622 'la
TONE 12,400,698 'ti
TONE 12,400,784 'do
END
Download
PINMODE 12,OUT 'Piezo + 330 Ohm resistor
PINMODE 13,OUT 'Piezo other terminal
OUTD 13,0 'Make pin 13 low
'Tone Pin#, Duration, Frequency
TONE 12,400,392 'do
TONE 12,400,415 're
TONE 12,400,466 'mi
TONE 12,400,523 'fa
TONE 12,400,587 'so
TONE 12,400,622 'la
TONE 12,400,698 'ti
TONE 12,400,784 'do
END
Download