back to Index
Example student code. This needs to be run on the robot in order to work.
In [1]:
# Cross-notebook include shim
with open("nbinclude.ipynb") as nbinclude_f: # don't rename nbinclude_f
import IPython.nbformat.current
get_ipython().run_cell(IPython.nbformat.current.read(nbinclude_f, 'json').worksheets[0].cells[0].input)
In [2]:
nbinclude("robot")
In [3]:
r=Robot()
In [4]:
r.cmd(0,1)
In [5]:
r.cmd(1,0)
In [6]:
r.cmd(0,0)
In [ ]: