Home Page | Language Reference (extended) | SD Reference | Libraries | Comparison | Changes
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.
Robot.waitContinue()
Robot.waitContinue(key)
key: the momentary switch to listen for. The default value is BUTTON_MIDDLE. Valid choices are
none
#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
)
;
}
This will not stop sound playing or the millis() function.
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.