please choosego to mobile | Continue to access the PC version
View: 13364|Reply: 3

ds18B20 -- tempsensor -- OK

[Copy link]

12

threads

30

posts

150

credits

Registered member

Rank: 2

credits
150
Published in 2016-1-5 03:23:41 | Show all floors |Read mode
tested with 18DS20 TempSensor (resistor between VCC and data)
this is described elsewhere in the forum, but I added some info

GPIO P01 for VCC : +3.3V
GPIO P06 for GND
GPIO P37 for data (CON3-P37 = PA20)

--declaration--in file script.bin---
[w1_para]
w1_used = 1
gpio = 20

(in scriptbin is defined : gpio_pin_28 = portA20)
(I thought -- wrongly --- that gpio had to be 28 ...)



modprobe w1-sunxi
modprobe w1-gpio
modprobe w1-therm

#dmesg
[  206.449020] W1_SUNXI: Added w1-gpio on GPIO-20
[  225.174972] Driver for 1-wire Dallas network protocol.
[  225.182341] W1_GPIO: added w1 master on GPIO20
[  225.216153] w1_master_driver w1_bus_master1: Family 28 for 28.000003c620a3.37 is not registered.
---------------------------------------------------------------
root@OrangePI:/sys/bus/w1/devices/28-000003c620a3# cat w1_slave
3f 01 4b 46 7f ff 01 10 7a : crc=7a YES
3f 01 4b 46 7f ff 01 10 7a t=19937

----temperature is 19,937 degrees celcius----

1

threads

25

posts

141

credits

Registered member

Rank: 2

credits
141
Published in 2016-1-11 19:07:31 | Show all floors
cool! how did you defined that this is ds-sensor?
and could you explain declaration? what does mean w1?

3

threads

60

posts

258

credits

Intermediate member

Rank: 3Rank: 3

credits
258
Published in 2016-1-12 16:17:13 | Show all floors
It's OneWire, the protocol used by DS18B20

2

threads

7

posts

97

credits

Registered member

Rank: 2

credits
97
Published in 2017-3-5 18:31:47 | Show all floors
Edited by Giuseppe at 2017-3-5 18:35

Hi,
I understand it's an old post but What may have happened?
the temperature is correct but.... crc=ba NO ????

  1. 88 01 80 81 1f ff 80 80 77 : crc=ba NO
  2. 00 00 00 00 00 00 00 00 00 t=24500
  3. giuseppe@orangepizero:/sys/bus/w1/devices/28-0115616bf7ff$
Copy code

You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list