ev3dev / ev3dev-lang

(deprecated) language bindings for ev3dev sensors, motors, LEDs, etc.
GNU General Public License v2.0
56 stars 39 forks source link

Dual motors #176

Closed absentdream closed 6 years ago

absentdream commented 7 years ago

anyone got any examples of how to drive 2 motors at same time (aka tank control).

dwalton76 commented 7 years ago

In python...see the Tank classes here: https://github.com/rhempel/ev3dev-lang-python/blob/develop/ev3dev/helper.py

and here is TRACK3R using those classes https://github.com/rhempel/ev3dev-lang-python/blob/develop/demo/TRACK3R/TRACK3R.py

dwalton76 commented 6 years ago

Updating the links....MoveTank class https://github.com/rhempel/ev3dev-lang-python/blob/develop/ev3dev/motor.py#L1515

RemoteControlledTank is a child of MoveTank https://github.com/rhempel/ev3dev-lang-python/blob/develop/ev3dev/control/rc_tank.py#L11

TRACK3R using RemoteControlledTank https://github.com/ev3dev/ev3dev-lang-python-demo/tree/master/robots/TRACK3R