From a4be313e96586a7497948e69f99fd03f762a5b28 Mon Sep 17 00:00:00 2001 From: EmaMaker Date: Mon, 1 Feb 2021 20:57:23 +0100 Subject: [PATCH] do not initialize LEDs LEDs are hookep up to the AtMega32U4on the new board Some LED pins are hooked up to line sensors on the new board and caused them not to work properly --- include/vars.h | 4 ---- src/sensors/sensors.cpp | 6 +----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/include/vars.h b/include/vars.h index 55cf324..0bb05e7 100755 --- a/include/vars.h +++ b/include/vars.h @@ -13,10 +13,6 @@ 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_1 39 #define SWITCH_2 38 diff --git a/src/sensors/sensors.cpp b/src/sensors/sensors.cpp index 2deba21..e7bfa1c 100644 --- a/src/sensors/sensors.cpp +++ b/src/sensors/sensors.cpp @@ -4,11 +4,7 @@ void initSensors(){ 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)); //drive = new DriveController(new Motor(12, 11, 2, 45),new Motor(25, 24, 5, 135), new Motor(27, 26, 6, 225), new Motor(21, 22, 23, 315)); compass = new DataSourceBNO055();