Controlling two motors


hello!
could me make code can control 2 motors , speeds? because don't know how make one... can control 1 motor , speed code:
code: [select]
int value = 0;                            // variable keep actual value
int motorpin = 9;                         // motor connected digital pin 9

void setup()
{
 // nothing setup
}

void loop()
{
 for(value = 0 ; value = 255;)
 {
   analogwrite(motorpin, value);           // sets value (range 0 255)
 }
}

code: [select]
for(value = 0 ; value = 255;)

that's valid c, not want, think.
http://arduino.cc/en/reference/for

controlling 2 motors not twice hard controlling 1 motor.


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > Controlling two motors


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums