|
2010-06-08
, 10:44
|
|
Posts: 1,391 |
Thanked: 4,272 times |
Joined on Sep 2007
@ Vienna, Austria
|
#22
|
Mmmh, all I came up without having a clue if there is a special mechanism is the following:
This, wrapped in a own thread, could to the trick, but does anyone have a smarter, less CPU-hogging and faster way to get the latest value?Code:f = open('/sys/class/i2c-adapter/i2c-2/2-0029/lux') while True: value = f.read() print value f.seek(0)
The Following 5 Users Say Thank You to thp For This Useful Post: | ||
Cheers Bjoern
My website:
- olausson.de
- gallery.olausson.de
My Applications: