fabianmoronzirfas
9/17/2015 - 1:49 PM

maybe use it with https://github.com/netlabtoolkit/VarSpeedServo

#include <Servo.h>


Servo myservo;
long randomnumber = 0;
int position_index = 0;
int positions [] = {0,90,180};
void setup(){
  Serial.begin(9600);
  myservo.attach(9);
}

void loop(){
  delay(100);
  randomnumber = random(3);
  int angle = positions[int(randomnumber)];
  myservo.write(angle); 
  Serial.println(angle);
  delay(100);

}