Beep Statement

Causes the Handyboard to emit a beeping sound. Useful as an auditory queue of an event.

Syntax

  1. stop_button();

Example

  1. /*Wait until the start button is pressed.
  2. Then, beeps when the digital sensor is pressed until
  3. the stop button is pressed.*/
  4. void main()
  5. {
    1. printf("\nPress start to begin.");
    2. while(start_button()!=1)
      1. sleep(0.5);
    3. while(!stop_button())
    4. {
      1. if(digital(8) beep();
      1. sleep(0.4);
    5. }
    6. ao();
  6. }