   {
     BlinkRGB* rgb = (BlinkRGB*) fsm;
     rgb->redLedPin.toggle();
-    fsm->set_timer(TIMEOUT);
+    fsm->set_timer(rgb->timeout);
     fsm->set_state(redState);
     return (1);
   }
 };
 
-// The state machine; possible to create any number of copies
-BlinkRGB fsm(5, 6, 7);
+// The state machines
+BlinkRGB led1(512, 5, 6, 7);
+BlinkRGB led2(256, 8, 9, 10);
 
 void setup()
 {
   // Start the watchdog (16 ms timeout, push timeout events)
   Watchdog::begin(16, SLEEP_MODE_IDLE, Watchdog::push_timeout_events);
 
-  // Start the state machine
-  fsm.begin();
+  // Start the state machines
+  led1.begin();
+  led2.begin();
 }
 
 void loop()

  {
    BlinkRGB* rgb = (BlinkRGB*) fsm;
    rgb->greenLedPin.toggle();
    fsm->set_timer(TIMEOUT);
    fsm->set_state(greenState);
    return (1);
  }

  {
    BlinkRGB* rgb = (BlinkRGB*) fsm;
    rgb->redLedPin.toggle();
    fsm->set_timer(rgb->timeout);
    fsm->set_state(cyanState);
    return (1);
  }
