Stop_Button Statement
Reads the value of the stop button. The start button is a digital sensor that returns 1 when being pressed and 0 when not being pressed.
Syntax
- stop_button();
Example
- /*Wait until the start button is pressed.
- Then, print out the analog sensor value until
- the stop button is pressed.*/
- void main()
- {
- printf("\nPress start to begin.");
- while(start_button()!=1)
- sleep(0.5);
- while(!stop_button())
- {
- printf("\nAnalog Value=%d",analog(3));
- sleep(0.4);
- }
- ao();
- }