A mode thats easily implemented is a sweep mode, that shifts one axis, after sweeping through the other axis.

Min/max are set to 50/120 degree, but can be set to everything in between 0 /180degree, depending on the servo and/or used feedback poti.

I use the poti to set the waiting time between the steps, from 20ms to 3(000m)s.

Another function i added is a way to sequence through pot-routings for entering the limits of the timelapse travel.

the code for the sweep is an adapted version of the servosweep code below :

#include Servo.h
//include the servo library

Servo myservo;
// create a servo object
// i created two because of the two axis

int pos = 0;
// thats the servo variable, it stores the servo position in degrees

void setup()
// attaches the servo on pin 9 on the controller

void loop()
for(pos = 0; pos =1; pos-=1)
// goes from 180 degrees to 0 degrees
// tell servo to go to position in variable ‘pos’
// waits 15ms for the servo to reach the position
// thats where you add the time between steps, for example 3000(ms)
// for a sweep in 1degree steps and 3sec between each step


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s