Servo Sequencer works in conjunction with ServoDispatcher. The sequence is held on a matrix, each line representing a step. The first entry is the length of the step in centiseconds (1/100th of a second). The bitmap representing on/off for each servo in order in the target servo group.
#define SMALL_PANEL 0x0001
#define MEDIUM_PANEL 0x0002
#define BIG_PANEL 0x0004
#define PIE_PANEL 0x0008
#define TOP_PIE_PANEL 0x0010
#define MINI_PANEL 0x0020
#define HOLO_HSERVO 0x1000
#define HOLO_VSERVO 0x2000
#define DOME_PANELS_MASK (SMALL_PANEL|MEDIUM_PANEL|BIG_PANEL)
#define PIE_PANELS_MASK (PIE_PANEL)
#define ALL_DOME_PANELS_MASK (MINI_PANEL|DOME_PANELS_MASK|PIE_PANELS_MASK|TOP_PIE_PANEL)
#define HOLO_SERVOS_MASK (HOLO_HSERVO|HOLO_VSERVO)
{ 1, 1000, 1650, SMALL_PANEL },
{ 2, 1500, 2300, SMALL_PANEL },
{ 4, 900, 1650, SMALL_PANEL },
{ 6, 1200, 1900, SMALL_PANEL },
{ 17, 1200, 2000, MEDIUM_PANEL },
{ 9, 1200, 2000, BIG_PANEL },
{ 8, 1275, 1975, MINI_PANEL },
{ 7, 1550, 1900, MINI_PANEL },
{ 3, 1250, 1900, PIE_PANEL },
{ 10, 1075, 1700, PIE_PANEL },
{ 11, 1200, 2000, PIE_PANEL },
{ 12, 750, 1450, PIE_PANEL },
{ 5, 1250, 1850, TOP_PIE_PANEL },
{ 13, 800, 1600, HOLO_HSERVO },
{ 14, 800, 1800, HOLO_VSERVO },
{ 15, 800, 1600, HOLO_HSERVO },
{ 16, 800, 1325, HOLO_VSERVO },
{ 25, 900, 1000, HOLO_VSERVO },
{ 26, 1300, 1600, HOLO_HSERVO },
};
{
{ 20, B00000000, B00000000, B00000000, B00000000 },
{ 300, B11111111, B11000000, B00000000, B00000000 },
{ 150, B00000000, B00000000, B00000000, B00000000 },
};
void setup()
{
servoSequencer.play(sMySeqPanelAllOpen,
SizeOfArray(sMySeqPanelAllOpen), (DOME_PANELS_MASK | PIE_PANELS_MASK));
}
void loop()
{
}