powering Grove LED and vibration motor with Arduino UNO

Hi there,
I have an arduino UNO and a Grove base shield. Now, I want to control

one LED (seeedstudio.com/wiki/Grove_- … _Color_LED)
and
one vibration motor (seeedstudio.com/wiki/Grove_-_Vibration_Motor)

with it. Will I need an additional power supply for doing so? I couldnt find any information of the current draw of the vibration motor and am worried that it is above the 20mA that the Arduino can safely provide. Also if I need one, where do I attach it and what current/ voltage should I use?

Many thanks in advance
Isa

Don’t worry about it, almost all Grove modules can work well with Arduino board directly without external power, so do those two modules.

And the 5v pin of Arduino Uno can provide about 500mA current to devices, so any other confusions?

Jacket

Hi Jacket,
I now have the vibrator motor, the base shield v2 and my arduino all hooked up, however if I post a code like the following the motor goes first and then the LED lights up. I need both to start and stop simultaneously however (i.e. the LED needs to light up AND the motor needs to run at the same time). If I run the same code with two LEDs they light up simultaneously, what do I have to change to make this work with vibrator motor and LED too? Many Thanks, Isa

/*

int MoPin = 6; 
int LED=3;
void setup(){

pinMode(LED, OUTPUT); 
pinMode(MoPin, OUTPUT);
}
void loop(){

digitalWrite(MoPin,1);
digitalWrite(LED,1); 
delay(500);
digitalWrite(MoPin,0); 
digitalWrite(LED,0); 
delay(500);
}

Hi,

If you would like to change two or more pins of the same Port,(Simultaneously) use bare metal AVR code.

The AVR code for your application

void setup(){
  
  DDRD=0b01001000;//This configures the 6th pin and 3rd pin as OUTPUT
}
 void loop(){
   
   PORTD=0b01001000;//This makes 6th and 3rd pins of PORT D as 1
   delay(500);
   
   PORTD=0b00000000;//This makes 6th and 3rd pins of PORT D as 0
   delay(500);
 }

Thanks