-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Wire broken #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Should be fixed in 2e3e98b |
Compilation success but TWI not worked. The test code in BMP085.begin() fails (read8 returns 0xFF instead of 0x55)
The read8() code from adafruit_BMP085: uint8_t Adafruit_BMP085::read8(uint8_t a) {
uint8_t ret;
Wire.beginTransmission(BMP085_I2CADDR); // start transmission to device
#if (ARDUINO >= 100)
Wire.write(a); // sends register address to read from
#else
Wire.send(a); // sends register address to read from
#endif
Wire.endTransmission(); // end transmission
Wire.beginTransmission(BMP085_I2CADDR); // start transmission to device
Wire.requestFrom(BMP085_I2CADDR, 1);// send data n-bytes read
#if (ARDUINO >= 100)
ret = Wire.read(); // receive DATA
#else
ret = Wire.receive(); // receive DATA
#endif
Wire.endTransmission(); // end transmission
return ret;
} The Serial handler implementation (called from loop()): void onSerial() {
while(Serial.available()) {
char c = (char) Serial.read();
Serial.write(c);
cli.putch(c);
if (cli.isDone()) {
Serial.println();
break;
}
}
if (cli.isDone()) {
if (!cli.handle(Serial)) {
Serial.println("\nERR");
}
}
} |
Wire.pins should be fixed now (but it's better to use |
pins() fix confirmed. |
const uint8_t
in pins_arduino.h so can not be redefined (or I don't know how). These changes at least broke the adafruit_bmp085 moduleThe text was updated successfully, but these errors were encountered: