File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,14 +10,23 @@ buttons to tell the code when to run.
1010The XRP has a button which you can read from code. To make it easy, **XRPLib **
1111has a built in function which will wait for the button to be pressed for you.
1212
13- .. code-block :: python
14-
15- from XRPLib.defaults import *
16- from time import sleep
13+ .. tab-set ::
14+
15+ .. tab-item :: Python
16+
17+ .. code-block :: python
18+
19+ from XRPLib.defaults import *
20+ from time import sleep
21+
22+ board.wait_for_button()
23+ sleep(1 )
24+ drivetrain.straight(20 )
25+
26+ .. tab-item :: Blockly
1727
18- board.wait_for_button()
19- sleep(1 )
20- drivetrain.straight(20 )
28+ .. image :: media/waitForButton.png
29+ :width: 300
2130
2231This function is part of :code: `board ` since the button is on the XRP's main
2332controller board.
You can’t perform that action at this time.
0 commit comments