Dallas hitanemi ds18b20 við Raspberrypi

Ræsa upp af Whezzy image. http://www.raspberrypi.org/downloads

tengja siðan við GPIO 4 og pull upp með 3.3 voltum yfir 4.7k viðnám.

 dallas hitanemi dallas

dallas hitanemi

ræsa gpio

root@raspberrypi:/home/pi# modprobe w1-gpio

stilla gpio 4 fyrir hita

root@raspberrypi:/home/pi#  modprobe w1-therm

Sjá hvort nemi hafi komið inn

root@raspberrypi:/home/pi# ls /sys/bus/w1/devices/w1\ bus\ master/
28-0000043a474e  uevent                     w1_master_name     w1_master_search
driver           w1_master_add              w1_master_pointer  w1_master_slave_count
power            w1_master_attempts         w1_master_pullup   w1_master_slaves
subsystem        w1_master_max_slave_count  w1_master_remove   w1_master_timeout
root@raspberrypi:/home/pi#

lesa af nema

root@raspberrypi:/home/pi# cat /sys/bus/w1/devices/w1\ bus\ master/28-0000043a474e/w1_slave
8b 01 4b 46 7f ff 05 10 3a : crc=3a YES
8b 01 4b 46 7f ff 05 10 3a t=24687

hitin er 24.6gr
root@raspberrypi:/home/pi#