I am new to the arduino realm and have been working through various tutorials on leds and servos. We are developing a animatonric that will be using 6 servos, chase LEDs effects and standard on LEDs throughout the creature. Currently I am seeking advice on the coding to enable a standard coded LED chase and servos functions to be able to operate on the same board (if possible). I have set up exercises on a 10 led chase effect and operation of a single servo at the same time but noticed the time interval of the servo controlled led chase. I was able to get the chase to work by writing in breaks on the servo code, but in that I loss the smooth motion of the servo sweep.
Of these six servos we are looking to program a waist twist (slow sweep), head pan and tilt (small interval), two arm pull (wire controlled to servo) and a small sweep for a laser mount.
As for lighting effects we are looking to run two chases (or one spliced to two) static on leds, blinking leds. Laser on/off And we are open to buying another card to control this function.
I would really appreciate your guys input and advice on this project, the end goal is for our creature to mainly be a plug and watch show.
At some point I expanded the standard Servo library so that there's also a method to move servos at reduced speed. If your speed requirements don't need to be too precise, this could be helpful. To synchronise the lights, you can just query the actual servo position, which is updated while sweeping inside an interrupt function.
If you're interested, let me know and I'll upload the library.
If your project has several things going on, then it might be simpler to get a servo controller for the servos and let the arduino send it commands (I'm famaliar with the ssc-32 ($40) that has group commands, speed control and such) to it. As to an LED chaser you can get simple kits like below or make your own. Bottom is a project that might be of interest.
Korman:
At some point I expanded the standard Servo library so that there's also a method to move servos at reduced speed.
...
Korman
Korman, I'd like to see the Servo with Speed Control library for another application. Is it online?? Thanks.
@aukio, if you need variable slow speed, perhaps with acceleration/deceleration, you may want to consider stepper motors. Uses more pins, though: 2 or 4 per motor. I have some small, cheap ones with driver boards. A tutorial is here: http://arduino-info.wikispaces.com/SmallSteppers and more general information about Stepper Motors here: http://arduino-info.wikispaces.com/StepperMotors
I was interested in your suggestion of sending commands from the arduino board to the ssc-32 controller. If we went this route do we need to be attached to a computer at all times or will it run off preporgramed on the arduino board? Do you have any sample coding to how that will be coded, also the movement sequence we will be using is a slow sweep at the hip with a pan and tilt of the head (survey mode). the movement of arm with pan and tilt of the head looking down. These movements are the ones that are part of the scene right now and from my position the ones that pose the mose work to make happen. As for the LEDs chase I solved that delima.