Is there a way to program a robot with python (ex, an electric motor, control it's speed, etc)

socialanxiety at socialanxiety at
Mon Jul 9 04:18:00 CEST 2007

On Jul 8, 5:37 pm, Carsten Haese <cars... at> wrote:
> On Sun, 2007-07-08 at 17:06 -0700, socialanxi... at wrote:
> > i hope someone here can help me.
> > basically, me and my friend have a summer project.
> > in this project, we need something that would basically function as a
> > blender. we know we'll need to buy a motor that spins, but what we're
> > having trouble with is figuring out how to program it. we want to be
> > able to control the speed of the motor. how would we accomplish this?
> > i'm new to all of this, so i'm having a hard time wrapping my mind
> > around how it'd be possible to program one of those things :\
> > ex: what if i want the motor to turn for 10 seconds. stop for 5. then
> > turn the other direction.
> > would you program it the same way you would on a personal computer
> > (via c, python, etc)?
> The answers to your questions depend very much on what you're working
> with and how the motor is controlled. Is this supposed to be a
> self-contained machine, or is it supposed to be connected to a personal
> computer as a peripheral device?
> The easier way is the peripheral device. In that case, you need some way
> of sending signals e.g. from your computer's parallel or serial port to
> a relay switch or voltage controller that controls your motor. In that
> case, apart from the nitty gritty hardware to make the physical
> connections, it's a matter of controlling the parallel or serial port
> that the "robot" is attached to, which can definitely be done in Python.
> I won't go into details because you're not saying enough about your
> project constraints, and as fascinating as your question is, it is
> somewhat off-topic on this list (as if that's a deterrent to discussing
> something on this list ;-). As John said, you're more likely to receive
> useful advice on comp.robotics.misc.
> Good luck,
> --
> Carsten Haese

I would like the robot to be self contained. basically, I'd like to be
able to program functions in python, ex:

while True:

and have it repeat the same piece of code every time it's turned on.

More information about the Python-list mailing list