What I want to do is to use a DS18B20 through 1-Wire to read temperature on an OPi Zero.
The sensor seems to be detected by the board (I see the file under /sys/bus/w1/devices/28-something), and then it disappears randomly after a reboot or a power cycle. (file goes away and obviously I can't get any readings). Then it starts working randomly again after an indefinite amount of reboots.
I'm having this problem for a while now, and it's driving me absolutely crazy.
This one here on the picture is the sensor I'm using.
I have attached a 4.7K Ohm resistor between the VCC and Digital cables, and attached to OPi Zero as follows:
VCC -> BCM pin 2 (5V, I've also tried with 3.3V)
Digital -> BCM pin 26 (PA10)
Ground -> BCM pin 25
After that, I've edited my /boot/armbianEnv.txt and it looks like this now:
overlays=usbhost2 usbhost3 i2c0 i2c1 w1-gpio
Also adapted the /etc/default/cpufrequtils file as follows:
# WARNING: this file will be replaced on board support package (linux-root-...) upgrade
And the /etc/modules-load.d/modules.conf:
So, after all these modifications, I do a reboot and I can see the w1_gpio and w1_therm modules loaded in the output from lsmod, and I can see the device in /sys/bus/w1/devices/28-something
I can get my readings and everything works properly. Then, I do a reboot. Here is where I get super confused, because it seems like there's no systematic error in the wiring or the kernel modules being loaded as far as I can see. But, the device disappears after the reboot. Sometimes it will get detected again, without me doing any changes in the configuration. I've already tried two of the same sensor, but it doesn't seem to make any difference, same problem still.
I've also put the armbianmonitor output to the post. Looking desparately for some ideas to help me debug this problem. Thanks!