Hello dear community,
I hope I looked enough in the forum history and internet in order to make an "interresting" post. If it's not the case, could you please point me to the right direction, google-keywords, forum-post, etc.
My question is : what is the difference between those ways to interface with sensors, why use different ones, how to do that ?!
I have found an interresting project for which I bought the parts/sensors and whilst waiting for them I tried to read and understand the code.
http://www.cheap-thermocam.tk/ (also available at :
http://cheap-thermocam.bplaced.net/)
It involves the sensor MLX90614 (in particular: the version MLX90614ESF-DCI, 3volts power supply, medical accuracy on body temperature range, very small focus (FOV) of 5degrees).
Looking at the files, the configuration uses i2cmaster.h and has many i2c_write, i2c_start_wait, i2s_stop, etc.
However the sketch uses compat/twi.h and has many TWDR, TWDC, TW_MT_SLA_NACK, etc.
My understanding so far :the sensor is SMB capable.
SMB is part of i2c
i2c is included in wire.h but here, the developper used i2cmaster.h ... in the configuration phase
then for the usage phase, the developper used twi.h
So I think I'm a bit lost and I don't have enough programation/electronic background to understand. If you have a few minutes, your wisdom would be very welcome !!