Giter Club home page Giter Club logo

Comments (5)

d2r2 avatar d2r2 commented on August 24, 2024

Hi Gonzih,

Miss your letter, so want to apologize for late response.

Huh, first, I never work with beaglebone device (this software tested with few models of RaspberryPI, as well as BananaPI), so not ready to talk what could be a reason, why this library not working with beaglebone hardware.
Second, this software use standard Linux GPIO subsystem to work with external devices via binary logic input/output pins. So, your device should have /sys/class/gpio/ directory structure used here as interface to interact with sensor (you may find this in dht.go.h). I do not use devices such /dev/gpiomem or /dev/mem, as you describe in your mail. Could you check, that directory /sys/class/gpio/ is present on your device?

If you have more specific information about issue (including error output), let me know - perhaps I can find root cause of an issue.

Regards,
Denis

from go-dht.

Gonzih avatar Gonzih commented on August 24, 2024

Hi Denis, thanks for your reply.

Yeah beaglebone gpio system is similar to pi one, but is also different a bit. I suspect main differente can be seing in those files from adafruit library. https://github.com/adafruit/Adafruit_Python_DHT/blob/master/source/Beaglebone_Black/bbb_mmio.c https://github.com/adafruit/Adafruit_Python_DHT/blob/master/source/Raspberry_Pi_2/pi_2_mmio.c

I will poke around trying to port your codebase to beaglebone, but for now I just shell out to python script to read data.

from go-dht.

d2r2 avatar d2r2 commented on August 24, 2024

Hi Gonzih,

As I know there are two approach how we can work with GPIO in linux. In the code provided by your GPIO handled via "memory mapped" device (/dev/mem), which better in respect of speed, but worse for compatibility between various RPI clones (Raspberry, Bananian, Orange, BeagleBone and so on). As I remember, almost each RPI clone has their own registers (memory addresses) not equals to other clone (that is why, for instance, for popular python GPIO library exists separate version for BananaPi: https://github.com/LeMaker/RPi.GPIO_BP; if you try to use regular python lib "import RPi.GPIO" for BananaPI - it will not work).

In my Golang DHT (c code) I use "device tree" approach, where all GPIO pins mapped to /sys/class/gpio/... virtual file system files. It slower, but better compatible between RPI clones.

It's pity, that I have no BeagleBone system near me, because perhaps BeagleBone have some issue with "device tree" GPIO, and I have not possibility to check if there is some problem there...

UPDATE: It seems there are some challenges with GPIO device tree config on BeagleBone system, starting from 3.8 kernel. Watch the video: https://www.youtube.com/watch?v=wui_wU1AeQc

from go-dht.

Gonzih avatar Gonzih commented on August 24, 2024

@d2r2 thanks a lot for the explanation, now it is clear to me what is going on! Thanks a lot again, sorry for wasting your time like that :)

from go-dht.

d2r2 avatar d2r2 commented on August 24, 2024

@Gonzih, thank you for paying attention to my project! When I will have free time, I will fork and adapt your temperature-service project back to dht library ;)

from go-dht.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.