esp-open-rtos/examples/ds18b20_broadcaster
Alex Stewart d0ed5f03a2 A couple of fixups prior to merging into main project
Changed the ds_sensor_t struct to just return a float instead of major/minor
Renamed ds18b20.h functions to have consistent `ds18b20_*` naming.
Removed some unnecessary LICENSE files.  Clarified onewire origin/license.
2016-02-22 21:18:50 -08:00
..
ds18b20_broadcaster.c A couple of fixups prior to merging into main project 2016-02-22 21:18:50 -08:00
Makefile Add clear version of commit 72f30ad. 2016-02-18 18:42:50 +01:00
README.md Add clear version of commit 72f30ad. 2016-02-18 18:42:50 +01:00

DS19B20 Broadcaster

In this example you can see how to get data from multiple ds18b20 sensor and emit result over udb broadcaster address.

As a client server, you can use this simple udp receiver, writen in python:

import select, socket

s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.bind(('<broadcast>', 8005))
s.setblocking(0)

while True:
    result = select.select([s],[],[])
    msg = result[0][0].recv(1024)
    print msg.strip()