Skip to content

Commit

Permalink
5v working
Browse files Browse the repository at this point in the history
  • Loading branch information
emersonae committed Mar 29, 2024
1 parent 95e996e commit aae011d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/datalogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,8 @@ void Datalogger::powerUpSwitchableComponents()

// turn on 5v booster for exADC reference voltage, needs the delay
// might be possible to turn off after exADC discovered, not certain.
gpioPinOn(GPIO_PIN_3);
gpioPinOn(BOOST_5V_ENABLE);
// gpioPinOn(GPIO_PIN_3);

delay(250);
enableI2C1();
Expand Down Expand Up @@ -1093,7 +1094,7 @@ void Datalogger::powerDownSwitchableComponents() // called in stopAndAwaitTrigge
//TODO: hook for sensors that need to be powered down? separate functions?
//TODO: hook for actuators that need to be powered down?
gpioPinOff(BOOST_5V_ENABLE); //turn off 5v booster // TODO: change to PB12, and update other use of GPIO_PIN_3
gpioPinOff(GPIO_PIN_6); //not in use currently
// gpioPinOff(GPIO_PIN_6); //not in use currently
i2c_disable(I2C2);
digitalWrite(EXADC_RESET,LOW);
debug(F("Switchable components powered down"));
Expand Down
2 changes: 1 addition & 1 deletion src/sensors/drivers/adafruit_dht22.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ short GPIO_PINS[7] = {
GPIO_PIN_1,
GPIO_PIN_2,
GPIO_PIN_3,
GPIO_PIN_4,
// GPIO_PIN_4,
GPIO_PIN_5,
GPIO_PIN_6,
GPIO_PIN_7
Expand Down
2 changes: 1 addition & 1 deletion src/system/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#define GPIO_PIN_1 PA1
#define GPIO_PIN_2 PB2
#define GPIO_PIN_3 PB8 // 5v booster
#define GPIO_PIN_4 PB12
// #define GPIO_PIN_4 PB12
#define GPIO_PIN_5 PC11 // DHT22
#define GPIO_PIN_6 PC12 // actuator tests
#define GPIO_PIN_7 PC13
Expand Down

0 comments on commit aae011d

Please sign in to comment.