pxt-ev3/docs/tutorials/tank-zigzag.md
Galen Nickel 7e9cc791ec Some edits for the new sensor/motor examples (#901)
* Some edits for the new sensor/motor examples

* article typo

* dark and bright

* fix block styling

* I like 'on'

* more block styling
2019-09-02 04:20:42 -07:00

677 B

Tank ZigZag

This example shows how to use the tank block to keep the speed of 2 large motors synchronized. The EV3 Driving Base ) will move in 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)
})