Arduino

Reference Language | Libraries | Comparison | Changes

Robot

## waitContinue()

#### Description

Pauses the current program and waits for a key press from one of the 5 momentary buttons. Once you press the key, the program continues.

#### Syntax

Robot.waitContinue()
Robot.waitContinue(key)

#### Parameters

key: the momentary switch to listen for. The default value is BUTTON_MIDDLE. Valid choices are

- BUTTON_LEFT
- BUTTON_RIGHT
- BUTTON_MIDDLE
- BUTTON_UP
- BUTTON_DOWN

#### Returns

none

#### Examples

#include <ArduinoRobot.h>
void setup(){
Robot.begin();
Robot.waitContinue();//stop the robot, and wait for the middle button to be pressed
}
void loop(){
Robot.motorsWrite(255,255);
delay(2000);
Robot.motorsWrite(0,0);
delay(2000);
}
[Get Code]

#### Note

This will not stop sound playing or the millis() function.

#### See also

- keyboardRead()

Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.

### Share

### This link has expired.
Please re-subscribe to our Newsletters.

### Subscribe to our Newsletters

Email

Please enter a valid email to subscribe

Arduino Newsletter
Arduino Store Newsletter

### Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy

###### Newsletter

- ©2015 Arduino
- Copyright Notice
- Contact us
- Careers