Button Mapping
This commit is contained in:
1 parent
08e4f6c5cc
commit
8bb65dafc2
1 file changed
+3
-3
@@ -18,7 +18,7 @@ CRGB leds[NUM_LEDS];
|
|||||||
// Q2: pins D5, D6, D7 → button indices 3, 4, 5
|
// Q2: pins D5, D6, D7 → button indices 3, 4, 5
|
||||||
// Q3: pins D8, D9, D10 → button indices 6, 7, 8
|
// Q3: pins D8, D9, D10 → button indices 6, 7, 8
|
||||||
// Q4: pins D11,D12,D13 → button indices 9,10,11
|
// Q4: pins D11,D12,D13 → button indices 9,10,11
|
||||||
const int BUTTON_PINS[12] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
|
const int BUTTON_PINS[12] = {7, 4, 5, 6, 11, 13, 12, 9, 10, 3, 2, 8};
|
||||||
|
|
||||||
// Reset button on A1 (pin 15). Wiring: connect to GND, use INPUT_PULLUP.
|
// Reset button on A1 (pin 15). Wiring: connect to GND, use INPUT_PULLUP.
|
||||||
const int RESET_PIN = 15;
|
const int RESET_PIN = 15;
|
||||||
@@ -30,8 +30,8 @@ const int BUTTONS_PER_QUESTION = 3;
|
|||||||
// For each question, which button index (0, 1, or 2) is correct / half-correct.
|
// For each question, which button index (0, 1, or 2) is correct / half-correct.
|
||||||
// The remaining button is automatically wrong.
|
// The remaining button is automatically wrong.
|
||||||
// TODO: update with the actual correct and half-correct buttons for your questions.
|
// TODO: update with the actual correct and half-correct buttons for your questions.
|
||||||
const int CORRECT_BUTTON[NUM_QUESTIONS] = {0, 1, 2, 0};
|
const int CORRECT_BUTTON[NUM_QUESTIONS] = {0, 0, 0, 0};
|
||||||
const int HALF_BUTTON[NUM_QUESTIONS] = {1, 2, 0, 1};
|
const int HALF_BUTTON[NUM_QUESTIONS] = {1, 3, 1, 1};
|
||||||
|
|
||||||
enum AnswerType { ANSWER_CORRECT, ANSWER_HALF, ANSWER_WRONG };
|
enum AnswerType { ANSWER_CORRECT, ANSWER_HALF, ANSWER_WRONG };
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user