Quantcast
Channel: Armbian news
Viewing all articles
Browse latest Browse all 486

DS18B20 temperature sensor in Lamobo R1

$
0
0

Been trying to use a DS18B20 with the Lamobo R1 and the last ArmBian, without success.

 

As I have already an RTC in the first pins, connected it as follows:

 

PIN 16=GPI04 / DATA

PIN 17=3.3V

PIN 20=GND

 

I also added the required resistor between 3.3V and GPI04.

 

Add to /etc/modules

 

w1_sunxi

w1_gpio

w1_therm

 

Added to my fex file:

 

[w1_para]

w1_used = 1

gpio = 16

 

Modified my dts:

 

 pinctrl@01c20800 {

....

                       my_w1_pin@0 {

                                allwinner,pins = "PH16";

                                allwinner,function = "gpio_in";

                                allwinner,drive = <0x0>;

                                allwinner,pull = <0x1>;

                                linux,phandle = <0x44>;

                                phandle = <0x44>;

                        };

                };

 

       onewire_device {

                compatible = "w1-gpio";

                gpios = <0x1f 0x8 0x14 0x0>;

                pinctrl-names = "default";

                pinctrl-0 = <0x44>;

                status = "okay";

        }; 

 

I also disabled the UART associated with pin 16.

 

After rebooting, no sign of it:

 

root@ruir:/sys/bus/w1/devices# ls -la

total 0

drwxr-xr-x 2 root root 0 Apr 11 17:56 .

drwxr-xr-x 4 root root 0 Apr 11 17:55 ..

root@ruir:/sys/bus/w1/devices#

 

So what do you think I am actually missing?

 

P.S. I am reading about raspberry folds adding 

dtoverlay=w1-gpio,gpiopin=16

To their configurations, no idea if it applies or what to do about that.


Viewing all articles
Browse latest Browse all 486

Trending Articles