Changes

Jump to navigation Jump to search
980 bytes added ,  15:09, 18 January 2016
Created page with "{{Infobox tsg | name = TemperatureHumidity | image = | caption = TemperatureHumidity device | downloads = {{bulleted list | Media:tempe..."
{{Infobox tsg
| name = TemperatureHumidity
| image =
| caption = TemperatureHumidity device
| downloads = {{bulleted list
| [[Media:temperaturehumidity.py|Custom Module]]
| [https://pypi.python.org/pypi/RuSocSci RuSocSci] (Python package)
}}
}}

The TemperatureHumidity is a little (15 x 5 x 5 cm) black box with a black sphere on top. It is connected to your computer with the attached USB cable. When connected it will identify itself as a Virtual Serial port.

== Code example ==
You can read temperature and humidity values with any software that connects to a serial port. Most conveniently you can use the rusocsci library in python. Here is a little example how to write a script that read the temperature and humidity and writes it to the standard output (console):

<code>
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import temperaturehumidity
th = temperaturehumidity.TemperatureHumidity()
print(th.waitString())
</code>

Navigation menu