Skip to content

Commit

Permalink
Revert "Fix i2c master by properly setup SDA pin as INPUT_PULLUP" (#1073
Browse files Browse the repository at this point in the history
)
  • Loading branch information
slaff committed Apr 11, 2017
1 parent 042bbee commit d6f29cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sming/Wiring/I2cMaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ uint8_t SoftI2cMaster::read(uint8_t last) {
uint8_t b = 0;
// make sure pull-up enabled
digitalWrite(sdaPin_, HIGH);
pinMode(sdaPin_, INPUT_PULLUP);
pinMode(sdaPin_, INPUT);
// read byte
for (uint8_t i = 0; i < 8; i++) {
// don't change this loop unless you verify the change with a scope
Expand Down Expand Up @@ -130,7 +130,7 @@ bool SoftI2cMaster::write(uint8_t data) {
digitalWrite(sclPin_, LOW);
}
// get Ack or Nak
pinMode(sdaPin_, INPUT_PULLUP);
pinMode(sdaPin_, INPUT);
// enable pullup
digitalWrite(sdaPin_, HIGH);
digitalWrite(sclPin_, HIGH);
Expand Down

0 comments on commit d6f29cc

Please sign in to comment.