This Microbit extension allows users to mesure ambient or object temperature using an IR-MLX90614 sensor.
Insert the IR-MLX90614 into the I2C ports of a breakout board.
Allows to mesure either ambient temperature or object temperature
The following code displays the ambient temperature when the button A is pressed and the object temperature when the button B is pressed.
input.onButtonPressed(Button.A, function () {
basic.showNumber(MLX90614.temperature(Environment.Ambient))
})
input.onButtonPressed(Button.B, function () {
basic.showNumber(MLX90614.temperature(Environment.Object))
})
For PXT/microbit