/
Temperature Sensor - Waterproof (DS18B20) Temperature Sensor - Waterproof (DS18B20)

Temperature Sensor - Waterproof (DS18B20) - PowerPoint Presentation

myesha-ticknor
myesha-ticknor . @myesha-ticknor
Follow
446 views
Uploaded On 2016-08-10

Temperature Sensor - Waterproof (DS18B20) - PPT Presentation

Wiring Steps Write device tree overlay Example click here Compile the device tree Example dtc O dtb o BBW100A0dtbo b 0 BBW100A0dts 3 Copy it to firmware ID: 441312

device 00a0 tree temperature 00a0 device temperature tree raw time test devices sys firmware dtbo

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Temperature Sensor - Waterproof (DS18B20..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Temperature Sensor - Waterproof (DS18B20)Slide2

WiringSlide3

Steps

Write device tree overlay

Example(

click here

)

Compile the device tree

:

Example

:

dtc

-O

dtb

-o BB-W1-00A0.dtbo -b 0 -@ BB-W1-00A0.dts

3. Copy it to firmware:

Example

:

cp

BB-W1-00A0.dtbo /lib/firmware/

4. Load the device tree:

Example

:

echo BB-W1:00A0 > /sys/devices/bone_capemgr.9/slotSlide4

Test

Python:

import time

w1="/sys/bus/w1/devices/28-000002e34b73/w1_slave"

while True:

raw = open(w1, "r").read()

print "Temperature is "+

str

(float(

raw.split

("t=")[-1])/1000)+" degrees"

time.sleep

(1)

(source:

http://hipstercircuits.com/dallas-one-wire-temperature-reading-on-beaglebone-black-with-dto/

)Slide5

Test

2. C

Program

(available from “Resources” section of class website)