Program MicroController Cricket that Berp in Night

Discussion in 'The Projects Forum' started by k31453, Oct 2, 2013.

  1. k31453

    Thread Starter Member

    May 7, 2013
    54
    0
    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

    Code ( (Unknown Language)):
    1.  
    2. new
    3. dim buzzer as pin ptf5 for frequency output
    4. dim switch as pin 1 for digital input
    5. dim anode as pin ptg1 for digital output
    6. dim anode as pin ptg1 for digital output
    7. dim green as pin 3 for digital output
    8. let buzzer = 0
    9. let anode=1
    10. while switch=1 do
    11.     let green = !green
    12.     sleep 500ms
    13.     buzzer = 440
    14.     sleep 500ms
    15.     buzzer 200
    16.     sleep 500ms
    17. endwhile
    18. save
    19. run
    20.  
     
    Last edited by a moderator: Oct 2, 2013
  2. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,771
    971
    umm.. ok. Do you actually have a question?

    And I think you meant "beep" not "berp"
     
  3. k31453

    Thread Starter Member

    May 7, 2013
    54
    0

    yeah beep i mean
     
  4. crutschow

    Expert

    Mar 14, 2008
    13,052
    3,244
    I would think you would want it to chirp, not beep (or berp). ;)
     
Loading...