From 33466b9a34c9520a5443098ffb18e27ec5b1cbde Mon Sep 17 00:00:00 2001 From: emamaker Date: Mon, 16 May 2022 20:12:44 +0200 Subject: [PATCH] Starting revamp of Furio&Cornelia Revert "do not initialize LEDs" This reverts commit a4be313e96586a7497948e69f99fd03f762a5b28. --- include/vars.h | 4 ++++ src/sensors/sensors.cpp | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/include/vars.h b/include/vars.h index 3a01874..097a8e1 100755 --- a/include/vars.h +++ b/include/vars.h @@ -13,6 +13,10 @@ the new setup is the one commented, leds have to be written in the 32U4 code*/ +#define LED_R 20 +#define LED_Y 17 +#define LED_G 13 + #define BUZZER 6 #define SWITCH_SX 39 #define SWITCH_DX 38 diff --git a/src/sensors/sensors.cpp b/src/sensors/sensors.cpp index 3f437d9..2e40c37 100644 --- a/src/sensors/sensors.cpp +++ b/src/sensors/sensors.cpp @@ -2,10 +2,13 @@ #include "sensors/sensors.h" void initSensors(){ - pinMode(SWITCH_DX, INPUT); - pinMode(SWITCH_SX, INPUT); - pinMode(SWITCH_ID, INPUT); - + pinMode(SWITCH_1, INPUT); + pinMode(SWITCH_2, INPUT); + + pinMode(LED_R, OUTPUT); + pinMode(LED_Y, OUTPUT); + pinMode(LED_G, OUTPUT); + drive = new DriveController(new Motor(12, 11, 4, 55), new Motor(25, 24, 5, 135), new Motor(27, 26, 2, 225), new Motor(29, 28, 3, 305)); // tone(BUZZER, 270, 250); // delay(350);