guys is servo motor compatible with arduino micro ?
i couldn't find an answer anywhere for specifically arduino micro
guys is servo motor compatible with arduino micro ?
i couldn't find an answer anywhere for specifically arduino micro
Most servo motors that are the kind found in model planes and cars are easy to interface with an Arduino and there are libraries to make life easy to to code it. If you are looking at a servo motor other than this, you may have to include a motor control board, also been done hundreds of times before
provide more details f=of the parts you intending to use and we can help in more detail
Regards
Peter
thanks for replying peter
so this is an ipad case that im making and the ipad would be placed in side,
what im going to do is that i want the case to slide open automatically with a keyboard command through a button connected to arduino.
im thinking of using servo motor and crank slide mechanism to slide it open..but i was not sure that arduino micro would support this..i dont think the weight would be so much so i guess a regular servo motor would be able to handle this.
so any suggestion would be really appreciated.
The arduino micro can control up to 7 RC servos.
Tim
The arduino micro can control up to 7 RC servos.
Tim
Dear: Tim
Yes it can handle servos but I would recommend using a servo shield for what you are doing. It is way more practical than arduino micro and if have problems with it I recommend you build your own. Also here is some code for you.
From: Noah
// Sweep
// by BARRAGAN <http://barraganstudio.com>
// This example code is in the public domain.
#include <Servo.h>
Servo myservo; // create servo object to control a servo
// a maximum of eight servo objects can be created
int pos = 0; // variable to store the servo position
void setup()
{
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}
void loop()
{
for(pos = 0; pos < 180; pos += 1) // goes from 0 degrees to 180 degrees
{ // in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
for(pos = 180; pos>=1; pos-=1) // goes from 180 degrees to 0 degrees
{
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
}
well the reason i wanna use micro is i want to have a serial communication with the keyboard..so basically control the movement by keyboard and eventually a remote control..
so do you think it will be ok using one servo motor with micro!!
The only real advantages of the Shield is increased number of PWM outputs and an increase in resolution from 8Bits to 12Bits which is the same as 0-255Count vs 0-4096 count. If you don't need better than a 1.4 - 2 degree resolution then the direct Arduino will work just fine, if you need real precision then go for the shield, but based on your description, I don't think you will need it. The other thing to bear in mind, you may be able to power one servo from the Arduino supply but not more, the preference is to provide a separate 5V for the servos.
Regards
Peter