Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

MPL3115A2 not working
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: MPL3115A2 not working

by hobi on Fri Aug 12, 2016 11:48 am

Hello ,

I actually followed all the threads regarding the new implementation of Wire.requestFrom for the DUE, and I can compile a sketch, and get the pressure as well as temperature reading looking normal ( I have a deviation of 5 hPa, but that is not a software issue).

Now, there needs to be some bits written in the control register to get the altitude readings. And as far as I have seen, writing the configuration in the control register results in an incorrect behavior.

We would have to actually also fix the method :
void Adafruit_MPL3115A2::write8(uint8_t a, uint8_t d)

As it uses the same problematic code : Wire.endTransmission(false)

Am I correct?

Thank you for your help!

Here is the code I talk about :
Code: Select all | TOGGLE FULL SIZE
void Adafruit_MPL3115A2::write8(uint8_t a, uint8_t d) {
  Wire.beginTransmission(MPL3115A2_ADDRESS); // start transmission to device
  Wire.write(a); // sends register address to write to
  Wire.write(d); // sends register data
#ifdef __AVR_ATtiny85__
  Wire.endTransmission(); // end transmission
#else
  Wire.endTransmission(false); // end transmission **********************************************************************
#endif 
}
Last edited by adafruit_support_rick on Sat Aug 13, 2016 8:54 am, edited 1 time in total.
Reason: please use Code tags when posting code (</> button)

hobi
 
Posts: 1
Joined: Fri Aug 12, 2016 11:40 am

Re: MPL3115A2 not working

by DavidJones1985 on Fri Nov 25, 2016 4:03 am

Hi,

I am using a MLX90614 infra-red thermopile to read temperature. The code and library found on sparkfunworks just fine on the uno and mega, but not on the due.

I've tried modifying the library as suggested on this page but am an unsure as to what lines of code to change.

I've tried the i2c scanner which picks up the device address just fine.

Can anybody advise on how to resolve this? or perhaps there are other ways in which to read the SDA pin?

DavidJones1985
 
Posts: 3
Joined: Thu Nov 24, 2016 12:06 pm

Re: MPL3115A2 not working

by adafruit2 on Fri Nov 25, 2016 2:34 pm

due has broken I2C, we recommend not using it!

adafruit2
Site Admin
 
Posts: 19408
Joined: Fri Mar 11, 2005 7:36 pm

Re: MPL3115A2 not working

by DavidJones1985 on Fri Nov 25, 2016 3:40 pm

Thanks for the reply.

What about the arduino zero? Are there any known issues with that? Im looking for a faster processor than the 16mhz mega/uno etc.

DavidJones1985
 
Posts: 3
Joined: Thu Nov 24, 2016 12:06 pm

Re: MPL3115A2 not working

by adafruit2 on Fri Nov 25, 2016 3:43 pm

probably works (Zero I2c is better quality) but we have not specifically tested it.

adafruit2
Site Admin
 
Posts: 19408
Joined: Fri Mar 11, 2005 7:36 pm

Re: MPL3115A2 not working

by DavidJones1985 on Fri Nov 25, 2016 6:09 pm

Hmm okay,

I guess I'll try the teensy!

Thanks for the advice

DavidJones1985
 
Posts: 3
Joined: Thu Nov 24, 2016 12:06 pm

Re: MPL3115A2 not working

by soerena on Sun May 06, 2018 5:38 am

adafruit2 wrote:due has broken I2C, we recommend not using it!



Anno 2018, is this still a thing I wonder?

Because I just had to upgrade my project from an atmega2560 to a Due, and while everything is better now - I'm having some strange issues with slow i2c behavior. Someone talked about implementing a 20 microseconds delay before each requestFrom.. Haven't tried that yet though.

soerena
 
Posts: 57
Joined: Fri Nov 16, 2012 7:00 am

Re: MPL3115A2 not working

by adafruit2 on Sun May 06, 2018 12:48 pm

yep Due is/always will have bad i2c - we recommend skipping to the Metro M0 (SAMD21) or M4 (SAMD51)

adafruit2
Site Admin
 
Posts: 19408
Joined: Fri Mar 11, 2005 7:36 pm

Re: MPL3115A2 not working

by fruit_shark on Wed May 09, 2018 1:59 pm

Any progress with this issue, I am trying to get the multiplexer work on an Arduino Due?
- links or suggestions?

I have tried http://playground.arduino.cc/Main/I2cScanner

fruit_shark
 
Posts: 4
Joined: Tue Apr 03, 2018 6:41 am

Re: MPL3115A2 not working

by adafruit2 on Wed May 09, 2018 2:13 pm

no, nothing has changed in 3 days
locking this thread - Due is not recommended for anything, and especially not i2c :)

adafruit2
Site Admin
 
Posts: 19408
Joined: Fri Mar 11, 2005 7:36 pm

Please be positive and constructive with your questions and comments.