//Import the Myro Library
from myro import *

//initialize RS232 connection OR
initialize("comX")

//initialize Bluetooth connection
init("/dev/tty.scribbler")

//give a name to your device
setName("X")
getName()

//Control the motors -- motors(LEFT, RIGHT)
motors(1.0, 1.0)
motors(0.0, 1.0)

//Movement Commands
//forward(SPEED, SECONDS)
//backward(SPEED, SECONDS)
//turnLeft(SPEED, SECONDS)
//turnRight(SPEED, SECONDS)
//stop()
forward(1, 1)
turnLeft(1, .3)
forward(1, 1)
turnLeft(1, .3)
forward(1, 1)
turnLeft(1, .3)
forward(1, 1)
turnLeft(1, .3)

//Take picture and display it 
s = takePicture("gray")
show(s)

//Make Scribbler wander around while taking pictures
joyStick(1)
while not getStall():
	s = takePicture("gray")
         show(s)