Skip to main content

Infrared object temperature sensor

Project description

GitHub Issues GitHub Commit Maintained Build status badge MIT licensed

Python-SL19

The SL19 xChip is equipped to measure temperature as a function of infrared light/radiation (IR) radiating from objects in its field of view. Is is based on the MLX90614 in which a IR sensitive thermopile detector chip and signal conditioning ASIC are integrated.

The MLX90614 is factory calibrated in wide temperature ranges: -40-125˚C for the ambient temperature and -70-380˚C for the object temperature. The measured value is the average temperature of all objects in the Field Of View of the sensor. The MLX90614 offers a standard accuracy of ±0.5˚C around room temperatures.

Usage

Mu-editor

Download Mu-editor

CW01 and CW02

  • Use XinaBoxUploader and flash MicroPython to the CW01/CW02.
  • Download Python packages from the REPL with the following code:
    import network
    import upip
    sta_if = network.WLAN(network.STA_IF)
    sta_if.active(True)
    sta_if.connect("ssid", "password")
    upip.install("xinabox-SL19")
    

CC03, CS11 and CW03

  • Download the .UF2 file for CC03/CS11/CW03 CircuitPython and flash it to the board.
  • TO DO

MicroBit

  • TO DO

Raspberry Pi

Requires Python 3

pip3 install xinabox-SL19

Example

from xCore import xCore
from xSL19 import xSL19

# SL19 instance
SL19 = xSL19()

# configure SL19
SL19.init()

while True:
    tempAmbient = SL19.getAmbientTempC()	# returns ambient temp in degree celcius
    tempObject = SL19.getObjectTempC()		# returns object temp in degree celcius

    # prints on console
    print('Ambient: ',tempAmbient,' C')
    print('Object : ',tempObject,' C')

    xCore.sleep(2000)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for xinabox-SL19, version 0.0.8
Filename, size File type Python version Upload date Hashes
Filename, size xinabox-SL19-0.0.8.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page