EasyManua.ls Logo

Arduino uno - Page 10

Arduino uno
11 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
digitalWrite(INB, LOW);
}
analogWrite(ENB, newspeed);
break;
case 'C': // Controlling Both Motors
if (dir == 'F') {
digitalWrite(INA, HIGH);
digitalWrite(INB, HIGH);
}
else if (dir == 'R') {
digitalWrite(INA, LOW);
digitalWrite(INB, LOW);
}
analogWrite(ENA, newspeed);
analogWrite(ENB, newspeed);
break;
}
// Send what we are doing with the motors out to the Serial Monitor.
Serial.print ("Motor: ");
if (mot=='C')
Serial.print ("Both");
else
Serial.print (mot);
Serial.print ("t Direction: ");
Serial.print (dir);
Serial.print ("t Speed: ");
Serial.print (speed);
Serial.print ("t Mapped Speed: ");
Serial.println (newspeed);
}
*CODE END

Other manuals for Arduino uno

Related product manuals