hi
I buy a me 130 dc motor
http://store.makeblock.com/me-130-motor-pack-5v-10000rpm
I write this sketch to control it
#include “MeAuriga.h”
MePort fanout(PORT_3);
MePort fanin(PORT_3);
void setup()
{
Serial.begin(115200);
Serial.setTimeout( 100 );
}
void loop()
{
//Read serial commands.
while ( Serial.peek() != -1 )
{
//Read 3 character command.
char cmd[4] = “—”;
Serial.readBytes( cmd, 3 );
Serial.print(cmd);
//Execute chosen command.
if ( strcmp( cmd, “fan” ) == 0 ) fanout.dWrite1(LOW);
if ( strcmp( cmd, “stp” ) == 0 ) fanout.dWrite1(HIGH);
}
}
can you tell me how can I had a speed control, please?