Beep Statement
Causes the Handyboard to emit a beeping sound. Useful as an auditory queue of an event.
Syntax
- stop_button();
Example
- /*Wait until the start button is pressed.
- Then, beeps when the digital sensor is pressed until
- the stop button is pressed.*/
- void main()
- {
- printf("\nPress start to begin.");
- while(start_button()!=1)
- sleep(0.5);
- while(!stop_button())
- {
- if(digital(8) beep();
- sleep(0.4);
- }
- ao();
- }