Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"url": "https://github.com/M5Stack/M5StamPLC.git"
},
"dependencies": {
"M5Unified": "*",
"M5Unified": ">=0.2.21",
"M5GFX": "*"
},
"version": "1.2.0",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ category=Device Control
url=https://github.com/m5stack/M5StamPLC.git
architectures=esp32
includes=src,src/utils
depends=M5Unified
depends=M5Unified (>=0.2.21)
6 changes: 3 additions & 3 deletions src/M5StamPLC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ void M5_STAMPLC::io_expander_a_init()

// Status light init
ioe.setDirection(4, true);
ioe.setPullMode(4, false);
ioe.setPullMode(4, m5::IOExpander_Base::pull_down);
ioe.setHighImpedance(4, true);

ioe.setDirection(5, true);
ioe.setPullMode(5, false);
ioe.setPullMode(5, m5::IOExpander_Base::pull_down);
ioe.setHighImpedance(5, true);

ioe.setDirection(6, true);
ioe.setPullMode(6, false);
ioe.setPullMode(6, m5::IOExpander_Base::pull_down);
ioe.setHighImpedance(6, true);

ioe.resetIrq();
Expand Down
4 changes: 2 additions & 2 deletions src/modules/M5StamPLC_AC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ bool M5StamPLC_AC::begin()

// AC relay
_ioe->setDirection(_pin_relay, true);
_ioe->setPullMode(_pin_relay, false);
_ioe->setPullMode(_pin_relay, m5::IOExpander_Base::pull_down);
_ioe->setHighImpedance(_pin_relay, false);

// Status light
auto setup_status_light_pin = [](m5::PI4IOE5V6408_Class* ioe, uint8_t pin) {
ioe->setDirection(pin, true);
ioe->setPullMode(pin, true);
ioe->setPullMode(pin, m5::IOExpander_Base::pull_up);
ioe->setHighImpedance(pin, false);
ioe->digitalWrite(pin, true);
};
Expand Down
Loading