-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not running at RPi3 #57
Comments
Hi @abataille. |
Data s Pin 17 and ground is the rightmost ground. Sent from my iPad
|
Not at all. If you are using the latest bcm2835 library that should not be a problem. |
I can check that tomorrow when I have access to that log. Sent from my iPad
|
the log shows: |
I also changed the bcm2385 lib to v. 50 and the pin to pin 16. |
I already have this wiring, except I get 3.3V and ground from other pins.
|
Just to make sure that nothing is wrong with Jessie and the hardware. |
There should be no problem with BCM library on 64bit. I have the same setup here working fine. pi@raspberrypi:~/node-dht-sensor $ uname -a
Linux raspberrypi 4.4.26-v7+ #915 SMP Thu Oct 20 17:08:44 BST 2016 armv7l GNU/Linux
pi@raspberrypi:~/node-dht-sensor $ lsb_release -d
Description: Raspbian GNU/Linux 8.0 (jessie) pi@raspberrypi:~/node-dht-sensor $ node test/async-explicit.js 22 17 1
temperature: 22.4°C, humidity: 82.4%, time: 25ms Also, if this python script from Adafruit is working it validates your wiring. Can you try pi@raspberrypi:~/node-dht-sensor $ npm list
node-dht-sensor@0.0.32 /home/pi/node-dht-sensor
└── nan@2.4.0 |
My installation just looks the same.
|
Your libbcm2835.a is in the default location and it seems that you installed node-dht-sensor globally, right? Anyway, that should not be a problem either. Although not common, you could try setting NODE_PATH to your node modules directory to make sure it is loading modules from where you expect, such as: $ export NODE_PATH=/usr/lib/node_modules One more thing we could check is node and npm versions you are running. $ node -v
v7.1.0
$ npm -v
3.10.9 If all that is fine, here is a complete valitation procedure you can follow assuming BCM2835 library is already installed:
pi@raspberrypi:~/project $ git clone https://github.com/momenso/node-dht-sensor.git
Cloning into 'node-dht-sensor'...
remote: Counting objects: 409, done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 409 (delta 6), reused 0 (delta 0), pack-reused 394
Receiving objects: 100% (409/409), 82.10 KiB | 0 bytes/s, done.
Resolving deltas: 100% (236/236), done.
Checking connectivity... done.
pi@raspberrypi:~/project $ cd node-dht-sensor/
pi@raspberrypi:~/project/node-dht-sensor $ npm install
> node-dht-sensor@0.0.32 preinstall /home/pi/project/node-dht-sensor
> ./check-lib.sh
Library bcm2835 found.
> node-dht-sensor@0.0.32 install /home/pi/project/node-dht-sensor
> node-gyp configure
> node-dht-sensor@0.0.32 postinstall /home/pi/project/node-dht-sensor
> node-gyp build
make: Entering directory '/home/pi/project/node-dht-sensor/build'
CXX(target) Release/obj.target/node_dht_sensor/node-dht-sensor.o
CXX(target) Release/obj.target/node_dht_sensor/dht-sensor.o
SOLINK_MODULE(target) Release/obj.target/node_dht_sensor.node
COPY Release/node_dht_sensor.node
make: Leaving directory '/home/pi/project/node-dht-sensor/build'
node-dht-sensor@0.0.32 /home/pi/project/node-dht-sensor
└── nan@2.4.0
pi@raspberrypi:~/project/node-dht-sensor $ node test/async-explicit.js 22 17 1
temperature: 22.7°C, humidity: 80.2%, time: 20ms |
Miracle. That worked. |
Solved, I had the wrong pinout for the 3 pin sensor. DOH! |
I have install BCM2835 successfully.
Then I install the node-dht-sensor.
From your test I ran
sudo node duty.js 22 17
BCM2835 initialized.
Error: failed to read sensor
The same works fine with an Raspberry Pi 1.
Any idea ?
The text was updated successfully, but these errors were encountered: