On Wed, Apr 17, 2013 at 08:04:59AM -0700, PtubbyTaylor wrote:
> I was wondering if anyone has some MotCont code they could share with
> me. I'm trying to run two motors simultaneously in opposite
> directions, for an arbitrary number of degrees. If anyone has some
> code that could get me started, that would be great.
This is off the top of my head and untested, but it should do the trick:
import nxt
b = nxt.find_one_brick()
m = nxt.motcont.MotCont(b)
m.cmd(nxt.PORT_A, 70, 360)
m.cmd(nxt.PORT_B, -70, 360)
See motcont.py or the help() docstrings for more info.
> I'm not exactly sure how to get the MotorControl.rxe file on, should I
> follow the instructions on their website
>
http://www.mindstorms.rwth-aachen.de/trac/wiki/MotorControl ?
Yeah, that will do fine. You can also use nxt-python's nxt_push script.
--
Marcus Wanner