From eb7c2d9bed40ff4f1c66b316096bec53ed955511 Mon Sep 17 00:00:00 2001 From: napowderly Date: Tue, 3 Dec 2024 11:15:46 -0800 Subject: [PATCH] Update i2c pinouts --- firmware/src/main.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/firmware/src/main.cpp b/firmware/src/main.cpp index 98686c4..f1cdf90 100644 --- a/firmware/src/main.cpp +++ b/firmware/src/main.cpp @@ -7,11 +7,12 @@ #include // ADC #include // Addressable LEDs - // Micro pinout #define ledPin 0 -#define sdaPin 7 -#define sclPin 6 +#define wire_1_sdaPin 7 +#define wire_1_sclPin 6 +#define wire_2_sdaPin 17 +#define wire_2_sclPin 18 // Addressable LEDs #define NUM_LEDS 6 @@ -60,8 +61,10 @@ void updateStatusLEDs(float v1, float v2, float v3, float i1, float i2, float i3 void setup() { USBSerial.begin(115200); - Wire.setPins(sdaPin, sclPin); + Wire.setPins(wire_2_sdaPin, wire_2_sclPin); Wire.begin(); + Wire1.setPins(wire_1_sdaPin, wire_1_sclPin); + Wire1.begin(); cell1.init(); cell2.init();