Moteur DC
De FunLab Documentation
Modèle:Outil robot en k'nex avec pilote de moteur de dc et detection d'obstacle en ultrason…
prerequis:
Motor Control Interface ^Pin ^Description |
|B-IA |Motor B Input A (IA) | |B-IB |Motor B Input B (IB) | |GND |Ground | |VCC |Operating Voltage 2.5-12V | |A-IA |Motor A Input A (IA) | |A-IB |Motor A Input B (IB) |
Motor Truth Table ^IA ^IB ^Motor State |
|L |L |Off | |H |L |Forward | |L |H |Reverse | |H |H |Off |
lire une couleur avec un "line tracker" (voir ateliers:materiels:materiels)
nom.inoTexte en gras
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.println(digitalRead(2)); ''''// print the data from the sensor''
delay(500);
}
Source:
http://www.dfrobot.com/wiki/index.php/Line_Tracking_Sensor_for_Arduino_V4_SKU:SEN0017