spectraphilic / wasp_sketches

Waspmote sketches develoded by our group
1 stars 0 forks source link

MLX90614 not working #40

Closed jdavid closed 5 years ago

jdavid commented 5 years ago

It works with Arduino but not with the waspmote. Actually the MLX90614 is not exactly I2C but SMBUS.

Links:

If PWM is enabled, the MLX90614’s SMBus Request condition is needed to disable PWM and reconfigure PWM/SDA pin before starting SMBus communication. Once PWM is disabled, it can be only enabled by switching the supply OFF – ON or exit from Sleep Mode. The MLX90614’s SMBus request condition requires forcing LOW the SCL pin for period longer than the request time (tREQ) >1,44ms. The SDA line value is ignored in this case.

One idea is to try the Wire library from Arduino.

ArcticSnow commented 5 years ago

A careful review of the existing code might do the trick. Especially the functions wire.beginTransmission() and wire.endTransmission(). These are part of the original arduino sparkfun library but were removed in our adapted version of the library