Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help wanted changing resolution of DS18B20 on Orange Pi

Featured Replies

Hello, I have got my Orange Pi PC+ reading a DS18B20, but it only gives 0.5 degree increments so I believe the resolution is set to 9 bit. This is nowhere near good enough for the application I plan to use it for.

 

When I cat w1_slave I get:

90 01 80 01 1f ff 02 04 5c : crc=5c YES

90 01 80 01 1f ff 02 04 5c t=25000

 

I have attempted to use this: https://github.com/danjperron/BitBangingDS18B20

but it appears to be specifically for RaspPi.

 

Does anyone know how I can change the resolution to 11 or 12 bit?

 

Many thanks

There is a thread where someone tweak the kernel to get this functionality :

https://forum.armbian.com/index.php/topic/1558-w1-therm-driver-modifications/#entry12058

But it seem that he never completed the task to provide actual patch for Armbian build.

 

Looking at kernel history, I saw that someone else done it a different way :

https://github.com/megous/linux/commit/0a19f129d71f18e73249d54de96c835186b8607e

It should be done like :

echo 12 > /sys/bus/w1/devices/28-000005a2fac5/w1_slave

But comments say that this change is volatile and will be reset at next power recycle :

Writing a value between 9 and 12 to the sysfs w1_slave file will change the precision of the sensor for the next readings. This value is in (volatile) SRAM, so it is reset when the sensor gets power-cycled. To store the current precision configuration into EEPROM, the value 0 has to be written to the sysfs w1_slave file. Since the EEPROM has a limited amount of writes (>50k), this command should be used wisely.

rc14_one:/sys/bus/w1/devices/28-0115832712ff/driver# echo 12 > 28-0115831d2eff/w1_slave
-bash: 28-0115831d2eff/w1_slave: Permission denied

 

setting manual write permission to w1_slave

 

rc14_one:/sys/bus/w1/devices/28-0115832712ff/driver/28-0315826d08ff# echo 12 > w1_slave
-bash: echo: write error: Input/output error

 

I was using latest armbian debian jessie.

How can I implement that to it?

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.