pxt-ev3/docs/tutorials/tank-zigzag.md
Peli de Halleux 0251b914f2
color sensor examples (#894)
* tank zigzag

* reflected light measure

* adding links

* added reflected light calibration

* updated summary
2019-08-30 15:03:09 -07:00

692 B

Tank ZigZag

This example shows how to use the tank block to keep the speed of 2 large motors synchronized. In this example, a EV3 Driving Base ) will move on a zig zag pattern.

/**
 * Use the tank block to keep large motors synched. 
 Use this code with a EV3 driving base.
 */
forever(function () {
    brick.showImage(images.eyesMiddleRight)
    motors.largeBC.tank(50, 10, 2, MoveUnit.Rotations)
    brick.showImage(images.eyesMiddleLeft)
    motors.largeBC.tank(10, 50, 2, MoveUnit.Rotations)
})