Stop that Flash Jitter

Now I have written a full, interrupt driven sketches for an arduino running some traffic signals. An extract is shown below:-

  if ((_state == PHASE_GREEN) && (_phase_change == PHASE_CHANGE_TO_RED)) {
    // On Green want Red
    if (ran_min_green()) {
      _state = PHASE_POST_GREEN;
      _phase_change = PHASE_CHANGE_NONE;
      _time_since_green_milliseconds = 0;
      _time_on_current_state_milliseconds = 0;
      if (debug_to_serial) {
        Serial.println("Leaving Green");
      }
    }
  }

However for this project ...

more ...