Hi i got the project about making electronic Cricket.
I have to program electronic cricket so that when LED light changes the buzzer(berping) oscillation will change.
We are using StickOS
This is what I have do So far.
View attachment Program.txt
I have to program electronic cricket so that when LED light changes the buzzer(berping) oscillation will change.
We are using StickOS
This is what I have do So far.
View attachment Program.txt
Rich (BB code):
new
dim buzzer as pin ptf5 for frequency output
dim switch as pin 1 for digital input
dim anode as pin ptg1 for digital output
dim anode as pin ptg1 for digital output
dim green as pin 3 for digital output
let buzzer = 0
let anode=1
while switch=1 do
let green = !green
sleep 500ms
buzzer = 440
sleep 500ms
buzzer 200
sleep 500ms
endwhile
save
run
Last edited by a moderator: