Member Since: May 13, 2014
Country: United States
Product SEN-11084 about 4 years ago
I have connected this device to an Arduino Uno Rev3. It works perfectly. But when I disconnect from the USB port of my mac and connect again it displays a wrong value, something like -170.xx
I have connected to I2C also a RTC DS1307, and they work perfectly after loading the sketch. The sketch is based on the linked Arduino example, with minor modifications: I have kept the functions for bcd conversion, setDate, getDate, toggelOneSHot, readPressure, I2Cread/write, setModeBarometer, setOverSampleRate (set to 128).
set setup is: // setup MPL3115A2 setModeBarometer(); // Measure pressure in Pascals from 20 to 110 kPa setOversampleRate(128); // Set Oversample to the recommended 128 if(IIC_Read(WHO_AM_I) == 196) display.println(“MPL3115A2 online!”); else display.println(“No response - check connections”); display.display(); //update display delay(3000); display.clearDisplay(); // delete old values }
Any idea why when reconnecting it does not work, but no message “No response - check connections” ? (BTW this message is correctly displayed if I disconnect either SLA or SDA pin).
Daniele
No public wish lists :(
Forgot your password?
No account? Register one!