Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int motor[] = {3, 4, 5, 6, 7, 8};
- int maI = 4;
- int maII = 5;
- int vela = 3;
- void setup() {
- // put your setup code here, to run once:
- for(int i = 0; i<6; i++){
- pinMode(motor[i], OUTPUT);
- }
- }
- void loop() {
- // put your main code here, to run repeatedly:
- void frente();
- void trás();
- }
- void frente(){
- digitalWrite(maI, 1);
- digitalWrite(maII, 0);
- analogWrite(vela,200);
- delay(500);
- }
- void tras(){
- digitalWrite(maI, 0);
- digitalWrite(maII, 1);
- analogWrite(vela,200);
- delay(500);
- }
Add Comment
Please, Sign In to add comment