Skip to content

Commit

Permalink
shelly plus use gpio0 for out and gpio1 for in
Browse files Browse the repository at this point in the history
  • Loading branch information
markirb committed Feb 11, 2024
1 parent b6fab82 commit 8e4e8d6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/ShellyPlus1/shelly_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ void CreatePeripherals(std::vector<std::unique_ptr<Input>> *inputs,
inputs->emplace_back(in);
sys_temp->reset(new TempSensorSDNT1608X103F3950(32, 3.3f, 10000.0f));

int pin_in = 19;
int pin_out = 0;
int pin_in = 1;

if (DetectAddon(pin_in, pin_out)) {
s_onewire.reset(new Onewire(pin_in, pin_out));
Expand Down
5 changes: 3 additions & 2 deletions src/ShellyPlus1PM/shelly_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ void CreatePeripherals(std::vector<std::unique_ptr<Input>> *inputs,
}
sys_temp->reset(new TempSensorSDNT1608X103F3950(32, 3.3f, 10000.0f));

int pin_in = 19;
int pin_out = LED_GPIO;
int pin_out = 0;
int pin_in = 1;

if (DetectAddon(pin_in, pin_out)) {
s_onewire.reset(new Onewire(pin_in, pin_out));
sensors = s_onewire->DiscoverAll();
Expand Down
5 changes: 3 additions & 2 deletions src/ShellyPlusI4/shelly_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ void CreatePeripherals(std::vector<std::unique_ptr<Input>> *inputs,

sys_temp->reset(new TempSensorSDNT1608X103F3950(32, 3.3f, 10000.0f));

int pin_in = 19;
int pin_out = LED_GPIO;
int pin_out = 0;
int pin_in = 1;

if (DetectAddon(pin_in, pin_out)) {
s_onewire.reset(new Onewire(pin_in, pin_out));
sensors = s_onewire->DiscoverAll();
Expand Down

0 comments on commit 8e4e8d6

Please sign in to comment.