...
 
Commits (2)
......@@ -128,6 +128,22 @@ void setup()
digitalWrite(PIN_OUT_HORN, LOW);
if (digitalRead(PIN_IN_LEFT_GRIP_BUTTON) == LOW) {
digitalWrite(PIN_OUT_BLINKER_L, HIGH);
digitalWrite(PIN_OUT_BLINKER_R, HIGH);
delay(150);
digitalWrite(PIN_OUT_BLINKER_L, LOW);
digitalWrite(PIN_OUT_BLINKER_R, LOW);
delay(150);
digitalWrite(PIN_OUT_BLINKER_L, HIGH);
digitalWrite(PIN_OUT_BLINKER_R, HIGH);
delay(150);
digitalWrite(PIN_OUT_BLINKER_L, LOW);
digitalWrite(PIN_OUT_BLINKER_R, LOW);
delay(150);
firmware_mode = true;
}
}
......@@ -145,8 +161,8 @@ void blink_frame(bool left, bool right, int tone_divisor = 2)
blinker_light_state = !blinker_light_state;
}
/* if (cycle_time == 1 && !blinker_light_state) */
/* blink_speaker_frame(tone_divisor); */
if (cycle_time == 1 && !blinker_light_state)
blink_speaker_frame(tone_divisor);
// Actual light
if (left)
......@@ -193,6 +209,11 @@ void blink_speaker_frame(int divisor)
/* digitalWrite(PIN_OUT_SPEAKER, !(cycle_time % divisor) ? HIGH : LOW); */
/* } */
/* tone(PIN_OUT_SPEAKER, 2000, 20); */
// Horn method
/* digitalWrite(PIN_OUT_HORN, HIGH); */
/* delay(1); */
/* digitalWrite(PIN_OUT_HORN, LOW); */
}
// Each frame, this increments L/R/B hold time variables while the user is holding a button (or both) down.
......