Comments (5)
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.
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.
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.
@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.
@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)
- The driver would suddenly fatally exit after ten or more hours. HOT 5
- Installation failure on macOS HOT 16
- Code fails on RPI-Zero but not on RPI-3 HOT 1
- On app termination long output of "2018/10/01 11:18:47 Signal received, cancel context" messages HOT 1
- Golang compiler warnings for functions HOT 6
- golint warnings HOT 1
- cross compilations techniques compile error HOT 1
- Cross compilation is not working in macOS for raspberry HOT 2
- Error during call C.dial_DHTxx_and_read(): failed to open pin 22 direction for writing on Raspberry PI3 HOT 7
- Can't compile if set env for raspberry pi
- Ubuntu Server 20.04.1 on Raspberry Pi 3B V2.1: "NewDHT error: pin out high error: sysfs-gpio (GPIO17): sysfs gpio is not initialized" HOT 2
- AM2301 support? HOT 3
- pins could be 4 characters on 64bit RPIs
- DHT11 Compatibility HOT 2
- fix compiler warnings HOT 2
- RPI Zero-W using pin 5.. HOT 6
- ./dht.go.h:73:23: error: unknown type name 'int32_t' HOT 1
- Decimal part of the temperature / humidity value for the DHT11 HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-dht.