This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
en:thermophile [2015/02/23 00:10] kakl |
en:thermophile [2015/02/23 00:11] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Infrared thermometer ====== | ||
- | |||
- | This is a thermopile sensor for contact-less measurement of temperature. | ||
- | |||
- | {{:cs:modules:thermopile:thermopile01a_small.jpg?500|thermopile}} | ||
- | |||
- | There is some sample code for usage with [[https://github.com/MLAB-project/MLAB-I2c-modules|pymlab]] Python library and [[en:usbi2c|USBI2C01A]] module: | ||
- | |||
- | from pymlab import config | ||
- | | ||
- | #### Sensor Configuration ########################################### | ||
- | cfg = config.Config( | ||
- | i2c = { | ||
- | "port": 0, # I2C bus number | ||
- | }, | ||
- | | ||
- | bus = [ | ||
- | { | ||
- | "type": "i2chub", | ||
- | "address": 0x73, | ||
- | | ||
- | "children": [ | ||
- | {"name": "thermopile", "type": "thermopile01", "channel": 4, }, | ||
- | ], | ||
- | }, | ||
- | ], | ||
- | ) | ||
- | | ||
- | cfg.initialize() | ||
- | sensor = cfg.get_device("thermopile") | ||
- | | ||
- | #### Measurement #################################################### | ||
- | while True: | ||
- | print "Ta ", sensor.getTambient(), " To ", sensor.getTobject1() | ||