Jump to content

activate 1-Wire


bjorns

Recommended Posts

Hi,

 

I've been trying to get my DS1820 temp sensor working but cant seem to get the device to show up om my orange pi zero 2 running Orange Pi 3.0.6 Bullseye

 

Most info i find starts our with run armbian-config but orangpi doesnt have it. All i got is the orangepi-config but it doesnt have the "Go to the “system” section and select “Hardware” then activate w1-gpio."

 

so i was looking arround and found you need to enable overlays in  /boot/armbianEnv.txt  but dont have it aswell but the alternative  /boot/orangepiEnv.txt

there i add the 

 

 /boot/orangepiEnv.txt

overlay_prefix=sun50i-h616
overlays=w1-gpio
param_w1_pin=PC8                          <<<<< not sure about the pin numers
param_w1_pin_int_pullup=1

 

 

looking at the output i would say PC8 is correct pin name.

root@orangepizero2:~# gpio readall
 +------+-----+----------+------+---+   H616   +---+------+----------+-----+------+
 | GPIO | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | GPIO |
 +------+-----+----------+------+---+----++----+---+------+----------+-----+------+
 |      |     |     3.3V |      |   |  1 || 2  |   |      | 5V       |     |      |
 |  229 |   0 |    SDA.3 |  OFF | 0 |  3 || 4  |   |      | 5V       |     |      |
 |  228 |   1 |    SCL.3 |  OFF | 0 |  5 || 6  |   |      | GND      |     |      |
 |   73 |   2 |      PC9 |  OFF | 0 |  7 || 8  | 0 | OFF  | TXD.5    | 3   | 226  |
 |      |     |      GND |      |   |  9 || 10 | 0 | OFF  | RXD.5    | 4   | 227  |
 |   70 |   5 |      PC6 | ALT5 | 0 | 11 || 12 | 0 | OFF  | PC11     | 6   | 75   |
 |   69 |   7 |      PC5 | ALT5 | 0 | 13 || 14 |   |      | GND      |     |      |
 |   72 |   8 |      PC8 |  OFF | 0 | 15 || 16 | 0 | OFF  | PC15     | 9   | 79   |
 |      |     |     3.3V |      |   | 17 || 18 | 0 | OFF  | PC14     | 10  | 78   |
 |  231 |  11 |   MOSI.1 |  OFF | 0 | 19 || 20 |   |      | GND      |     |      |
 |  232 |  12 |   MISO.1 |  OFF | 0 | 21 || 22 | 0 | OFF  | PC7      | 13  | 71   |
 |  230 |  14 |   SCLK.1 |  OFF | 0 | 23 || 24 | 0 | OFF  | CE.1     | 15  | 233  |
 |      |     |      GND |      |   | 25 || 26 | 0 | OFF  | PC10     | 16  | 74   |
 |   65 |  17 |      PC1 |  OFF | 0 | 27 || 28 |   |      |          |     |      |
 |  272 |  18 |     PI16 | ALT2 | 0 | 29 || 30 |   |      |          |     |      |
 |  262 |  19 |      PI6 |  OFF | 0 | 31 || 32 |   |      |          |     |      |
 |  234 |  20 |     PH10 | ALT3 | 0 | 33 || 34 |   |      |          |     |      |
 +------+-----+----------+------+---+----++----+---+------+----------+-----+------+
 | GPIO | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | GPIO |
 +------+-----+----------+------+---+   H616   +---+------+----------+-----+------+


if i understaand correct i need to add the kernel moduels by doing:

 

modprobe w1-therm
modprobe w1-gpio

 

after reboot i should see the device show up? using:

 

ls /sys/bus/w1/devices

 

but go nothing.

so i check :

root@orangepizero2:~# cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 0-287, parent: platform/300b000.pinctrl, 300b000.pinctrl:
 gpio-76  (                    |red:power           ) out lo
 gpio-77  (                    |green:status        ) out hi
 gpio-80  (                    |usb1-vbus           ) out hi
 gpio-166 (                    |cd                  ) in  lo IRQ ACTIVE LOW
 gpio-210 (                    |reset               ) out hi ACTIVE LOW

gpiochip1: GPIOs 352-383, parent: platform/7022000.pinctrl, 7022000.pinctrl:

 

it seems like im missing something fundamentally? can some one point me in the write direction?

Link to comment
Share on other sites

First off, you aren't using Armbian.  So posting questions in the Armbian forum isn't the the correct place to ask your questions.  Since you are using the orangepi provided software, that is the appropriate place to ask your questions on that software.

However feel free to download the Armbian build for your board and try it if you would like: https://www.armbian.com/orange-pi-zero-2

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines