1 / 9

Filling the Pause

Filling the Pause. Sound and Motion with the Boe-bot. Silent running. for x = 1 to limit pulsout left_servo, 850 pulsout right_servo,650 pause 20 next. Melodic running. for x = 1 to limit pulsout left_servo, 850 pulsout right_servo,650 freqout speaker, 20, myfreq next.

elaine
Télécharger la présentation

Filling the Pause

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Filling the Pause Sound and Motion with the Boe-bot

  2. Silent running for x = 1 to limit pulsout left_servo, 850 pulsout right_servo,650 pause 20 next

  3. Melodic running for x = 1 to limit pulsout left_servo, 850 pulsout right_servo,650 freqout speaker, 20, myfreq next

  4. Getting a beep -- I • Design a cycle • LED 1 on for 600 msec (27 loops) • LED 2 is off • LED 2 on for 600 msec (27 loops) • LED 1 is off

  5. Getting a beep -- II • Add a counter myc = 0 for x = 1 to limit other stuff myc = myc + 1 if myc < 54 then eloop myc = 0 eloop: next

  6. Getting a beep -- III • Make the transitions if myc < 27 then myc_ge27 low LED1 high LED2 goto myc_end myc_ge27: high LED1 low LED2 myc_end:

  7. A more elaborate example • While backing up • Beep • Blink • Some code

  8. Too many variables • Define “place holders” for local variables ‘ Local variables for subroutines t1 var word t2 var word • Rename these in subroutines ‘ Local variables for goforward tgx var t1.highbyte tgfreq var t2

  9. A little bit about tone • Tempered vs. Natural tone • A code fragment

More Related