Skip to content

Commit

Permalink
Update i2c pinouts
Browse files Browse the repository at this point in the history
  • Loading branch information
napowderly committed Dec 3, 2024
1 parent cc0cb0a commit eb7c2d9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions firmware/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
#include <Adafruit_ADS1X15.h> // ADC
#include <FastLED.h> // 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
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit eb7c2d9

Please sign in to comment.