Commit 0bf1c6ba authored by Michael Nelson's avatar Michael Nelson

Remove speaker & more updates

parent 19f3437d
#define MODE_OFF 0
#define DEBUG_WITH_BUILTIN_LED false
#define DEBUG_WITH_BUILTIN_LED true
#define PIN_OUT_BUILTIN_LED 7
// Foreground Modes
......@@ -56,9 +56,9 @@
#define PIN_IN_LEFT_GRIP_BUTTON 0
#define PIN_IN_RIGHT_GRIP_BUTTON 1
#define PIN_IN_HORN_BUTTON 2
#define PIN_IN_EXTRA_BUTTON 3
// Outputs
#define PIN_OUT_SPEAKER 3
#define PIN_OUT_BLINKER_L 4
#define PIN_OUT_BLINKER_R 5
#define PIN_OUT_HORN 6
......@@ -110,8 +110,8 @@ void setup()
pinMode(PIN_IN_LEFT_GRIP_BUTTON, INPUT);
pinMode(PIN_IN_RIGHT_GRIP_BUTTON, INPUT);
pinMode(PIN_IN_HORN_BUTTON, INPUT);
pinMode(PIN_IN_EXTRA_BUTTON, INPUT);
pinMode(PIN_OUT_SPEAKER, OUTPUT);
pinMode(PIN_OUT_BLINKER_L, OUTPUT);
pinMode(PIN_OUT_BLINKER_R, OUTPUT);
......@@ -133,8 +133,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)
......@@ -180,7 +180,7 @@ void blink_speaker_frame(int divisor)
/* if (!blinker_light_state && cycle_time < 40) { */
/* digitalWrite(PIN_OUT_SPEAKER, !(cycle_time % divisor) ? HIGH : LOW); */
/* } */
tone(PIN_OUT_SPEAKER, 2000, 20);
/* tone(PIN_OUT_SPEAKER, 2000, 20); */
}
// Each frame, this increments L/R/B hold time variables while the user is holding a button (or both) down.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment