Raspberry Pi RoboPi User Manual page 25

Hide thumbs Also See for RoboPi:
Table of Contents

Advertisement

RoboPi v1.00
for(i=255;i>0;i-=16) {
analogWrite(MOTORA_IA, i);
analogWrite(MOTORB_IA, i);
sleep(1);
}
// set both motors REVERSE
pinMode(MOTORA_IA,OUTPUT);
digitalWrite(MOTORA_IA,0);
pinMode(MOTORA_IB,PWM);
pinMode(MOTORB_IA,OUTPUT);
digitalWrite(MOTORB_IA,0);
pinMode(MOTORB_IB,PWM);
for(i=0;i<256;i+=16) {
analogWrite(MOTORA_IB, i);
analogWrite(MOTORB_IB, i);
sleep(1);
}
for(i=255;i>0;i-=16) {
analogWrite(MOTORA_IB, i);
analogWrite(MOTORB_IB, i);
sleep(1);
}
}
}
http://Mikronauts.com
User Manual v0.85
25
Copyright 2014 William Henning
2014-01-27

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the RoboPi and is the answer not in the manual?

Questions and answers

Table of Contents