Arduino does not activate the digital port

Hi , I'm trying to make a stand with arduino . But the digital door does not distribute energy or sometimes program is wrong. This is sometimes program :

void setup() { //definindo os pinos digitais 7 e 9 //como pinos de saída. pinMode(8,OUTPUT); pinMode(9,OUTPUT); digitalWrite(8,LOW); digitalWrite(9,LOW ); }

//OBS:o método loop é executado repetidamente enquanto o //arduino estiver ligado. void loop() { digitalWrite(8,HIGH); //liga a roda esquerda delay(4000); //espera 4 segundos

digitalWrite(9,HIGH); //liga a roda direita delay(4000); //espera 4 segundos

digitalWrite(8, HIGH); //liga a roda esquerda digitalWrite(9,HIGH); //liga a roda direita, fazendo o carrinho ir para frente delay(4000); //espera 4 segundos

digitalWrite(8,LOW); //desliga a roda esquerda digitalWrite(9,LOW); //desliga a roda direita, fazendo o carrinho ir para frente delay(4000); //espera 4 segundos

}

what is a digital door here? Are you trying to on/off led here? Please give us more details.

The digital door is 8 and 9. I tryign to active a mini motor using this door.

Double check your wiring, next check it again. Please provide a schematic (scan / photo of hand-drawn one is fine) so we can see how you have (or intent to have) everything connected.

Do you have a link for the mini motor? Motors are usually not connected directly to an Arduino. Normal DC motors always need a flyback diode.

Your code will do the following (in an endless loop) set pin 8 high wait 4 seconds set pin 9 high wait 4 seconds keep both pins high wait 4 seconds set both pins low wait 4 seconds

Rubensg4: The digital door is 8 and 9. I tryign to active a mini motor using this door.

How is the motor connected to pins 8 and 9 ?

The + is conected with a jumper on 8 and 9. And the - is conected with a jumper on GND.

I really not getting the connectivity, +ve is going to 8 and 9. Please share a schematic.

When the + 5V is connected to the engine catches . But do not catch the entrances 8 and 9.

Connecting two output pins to each other is a bad idea, ESPECIALLY when one will be high and one will be low as in this sketch.

Project Images: http://imgur.com/a/oDEck

You're connecting motors directly to the Arduino. I doubt that that is a good idea. What is the specification of those motors?

The motor specification https://www.google.com.br/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwiIzIC9kMTNAhUMEZAKHdAzAUcQFggeMAA&url=http%3A%2F%2Fcdn.sparkfun.com%2Fdatasheets%2FRobotics%2FDG01D.pdf&usg=AFQjCNGcGOJEYoLUqDqtgu454Jvxi9IOzg&sig2=NToiVmWhCY0zp9JsezWdig

You can not safely drive this motor directly from the Arduino.

You would be better off looking at something like these instructions for getting started. https://learn.adafruit.com/adafruit-arduino-lesson-13-dc-motors/overview As has been clearly pointed out to you, your motor https://www.sparkfun.com/products/13302 cannot be driven directly from an Arduino pin which has a maximum current rating of about 25mA