MLX90615

The MLX90615 is an Infra Red thermometer for non contact temperature measurements from Melexis (http://www.melexis.com/Infrared-Thermometer-Sensors/Infrared-Thermometer-Sensors/MLX90615-685.aspx)

The default communication protocol is I2C.

To use this module create a MLX90615 instance by passing the I2C peripheral name to which it is connected to.

Using the module is simple:

from melexis.mlx90615 import mlx90615
import streams

streams.serial()

mlx = mlx90615.MLX90615(I2C0)

while True:
    print("Temperature:",mlx.temperature())
    sleep(1000)

MLX90615 class

class MLX90615(drvname, clock=100000)

Creates a MLX90615 instance using the MCU I2C circuitry drvname (one of I2C0, I2C1, ... check pinmap for details). The created instance is configured and ready to communicate. clock is configured by default in slow mode.

MLX90615 inherits from i2c.I2C, therefore the method start() must be called to setup the I2C channel before any temperature can be read.

temperature()

return the object temperature in Celsius. The object temperature is the temperature of the object the mlx90615 is pointing towards.

ambient()

return the ambient temperature in Celsius. The ambient temperature is the temperature inside the MLX90615 package.

raw()

return the raw infrared readings (signed, 16 bits).