![]() |
Dallas 1-Wire Support - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PINE A64(+) (https://forum.pine64.org/forumdisplay.php?fid=4) +--- Forum: Pine A64 Hardware, Accessories and POT (https://forum.pine64.org/forumdisplay.php?fid=32) +---- Forum: POT modules (https://forum.pine64.org/forumdisplay.php?fid=8) +---- Thread: Dallas 1-Wire Support (/showthread.php?tid=1004) |
Dallas 1-Wire Support - ItsDave - 05-10-2016 Hello - After several hours wasted trying to get the board to boot up (don't use unetbootin!) I finally managed to get Ubuntu installed on the Pine 64 2Gb. I am trying to get it to read a Dallas 1-wire sensor from the GPIO Headers (Using pin 4). I've installed the ported GPIO library for the Pi which doesn't seem to be able to read the device. Has anyone managed to read data from the Dallas 1-Wire interface yet? Also I read somewhere that the Pine64 supports analog connections - what pins support analog sensors? RE: Dallas 1-Wire Support - peterz - 05-10-2016 (05-10-2016, 03:01 AM)ItsDave Wrote: Hello - Here are described pins of Raspberry PI bus, Euler Bus, Exp bus and Wifi/BT bus. http://files.pine64.org/doc/Pine%20A64%20Schematic/Pine%20A64%20Pin%20Assignment%20160119.pdf I suppose you mean Raspberry PI bus GPIO4 (RPI pin7) because RPI pin4 is 5V VCC. Here is table where a community member tested the GPIO pins (PINE seems to have different GPIO numbers than Raspberry PI) http://joey.hazlett.us/pine64/pine64_pins.html Raspberry PI bus doesn't have ADC (Analog to Digital Converter). You can use MCP3004/MCP3008 chip to achieve this. https://learn.adafruit.com/reading-a-analog-in-and-controlling-audio-volume-with-the-raspberry-pi (step by step guide) https://cdn-shop.adafruit.com/datasheets/MCP3008.pdf (MCP3008 datasheet) Here is guide for DS18B20 1Wire temperature sensor for Raspberry PI. https://learn.adafruit.com/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing/ds18b20 RE: Dallas 1-Wire Support - ItsDave - 05-10-2016 (05-10-2016, 04:37 AM)peterz Wrote:(05-10-2016, 03:01 AM)ItsDave Wrote: Hello - Thanks for your reply, although I am currently a little confused by it! The links you have added refer to getting the DS18B20 working with an RPi rather then a Pine64 which is something i've already achieved (or i'd be posting on the Rpi forums).... However, the same doesn't seem to work on the Pine64 (although I have just noticed the difference in the GPIO numbers - I shall try that this evening). On the Pi once connected the sensor is mounted at /sys/bus/devices/w1/ but I can't seem to find a similar location for the Pine. RE: Dallas 1-Wire Support - peterz - 05-10-2016 [quote pid='9118' dateline='1462887408'] Thanks for your reply, although I am currently a little confused by it! The links you have added refer to getting the DS18B20 working with an RPi rather then a Pine64 which is something i've already achieved (or i'd be posting on the Rpi forums).... However, the same doesn't seem to work on the Pine64 (although I have just noticed the difference in the GPIO numbers - I shall try that this evening). On the Pi once connected the sensor is mounted at /sys/bus/devices/w1/ but I can't seem to find a similar location for the Pine. [/quote] This just the theory for now, because I don't have my pine yet. GPIO should be working. I have seen some threads on this forum related to connected LED and i2c. For 1 wire I'm not sure. Some python libraries were ported to PINE as well. I plan to test this (and other sensors and peripherals) once I receive my PINE (who know when). Tllim posted on this forum about IR reciver (3 pins) is actually also 1 wire bus. Perhaps that works already. But again I can't test anything until I receive my PINE. ![]() RE: Dallas 1-Wire Support - martinayotte - 05-10-2016 Did you have loaded the proper kernel driver for that ? I think the w1-gpio driver is not even enabled in the current kernel from longsleep. You need to enable it and compile new kerne as well as to tweak the device-tree to specify which pin to use. @peterz, you've mentioned IR receiver, but this is completely different thing, it is not using Dallas 1 wire protocol. RE: Dallas 1-Wire Support - ItsDave - 05-10-2016 (05-10-2016, 08:16 AM)martinayotte Wrote: Did you have loaded the proper kernel driver for that ? I suspected this may be the case - although doing so is out of my depth ![]() RE: Dallas 1-Wire Support - martinayotte - 05-10-2016 I will give it a try and if I succeed, I will submit a PR to Simon (longsleep) ... RE: Dallas 1-Wire Support - ItsDave - 05-10-2016 I wish you luck! If you need anyone to test anything just shout ![]() RE: Dallas 1-Wire Support - longsleep - 05-10-2016 Well - w1 is disabled intentionally as i did not want to handle blacklisting to avoid constant bit-banging / interrupts this module generates when loaded (and afaik it loads automatically when not blacklisted). Let me know in the PR if that is not the case or if i am wrong and it does not constantly bit-bank for no reason when loaded ![]() RE: Dallas 1-Wire Support - peterz - 05-11-2016 (05-10-2016, 08:16 AM)martinayotte Wrote: Did you have loaded the proper kernel driver for that ? @martinayotte, This is thread where tllim mentioned about 1-wire bus for IR receiver http://forum.pine64.org/showthread.php?tid=353 |