Skip to content

Commit

Permalink
Fix to set pin as digital input at pull-mode change
Browse files Browse the repository at this point in the history
  • Loading branch information
yokobond committed Feb 21, 2021
1 parent 7cdeca1 commit 56d2cd4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions MbitMoreDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ void MbitMoreDevice::onCommandReceived(uint8_t *data, size_t length) {
const int pinCommand = data[0] & 0b11111;
if (pinCommand == MbitMorePinCommand::SET_PULL) {
setPullMode(data[1], (MbitMorePullMode)data[2]);
uBit.io.pin[data[1]].getDigitalValue(); // set the pin to input mode
} else if (pinCommand == MbitMorePinCommand::SET_OUTPUT) {
setDigitalValue(data[1], data[2]);
} else if (pinCommand == MbitMorePinCommand::SET_PWM) {
Expand Down

0 comments on commit 56d2cd4

Please sign in to comment.