What's new
VORON Design

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members!

[WIP] Adding a DS18B20 to a NanoPi NEO

mallcop

Active member
Staff member
Voron Owner
I'm a fan of these little boards, and I'm working through old forum posts and coming up with scripts to get this working. Right now this post is a placeholder for me to collect notes, because they're 404ing pretty quickly anymore.




Code:
#!/bin/bash

sudo apt update
sudo apt upgrade -y
sudo apt install python-pip python3-pip python3-numpy python3-matplotlib libatlas-base-dev -y

pip3 install w1thermsensor numpy

sudo sed -i 's/usbhost2/usbhost2 w1-gpio/' /boot/armbianEnv.txt
echo 'param_w1_pin=PG11' | sudo tee -a /boot/armbianEnv.txt
echo 'param_w1_pin_int_pullup 1' | sudo tee -a /boot/armbianEnv.txt

sudo dtc -I dtb -O dts -f /boot/dtb/overlay/sun8i-h3-w1-gpio.dtbo -o /boot/dtb/overlay/sun8i-h3-w1-gpio.dts # convert dtbo to dts so you can nano/edit it
sudo sed -i 's/PD14/PG11/g' /boot/dtb/overlay/sun8i-h3-w1-gpio.dts
sudo dtc -I dts -O dtb -f /boot/dtb/overlay/sun8i-h3-w1-gpio.dts -o /boot/dtb/overlay/sun8i-h3-w1-gpio.dtbo

git clone https://github.com/th33xitus/kiauh.git

sudo reboot
 
Last edited:
Top