-
Notifications
You must be signed in to change notification settings - Fork 594
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
msg.payload output is zero #293
Comments
Hi, |
I've used this guide for connections: https://learn.adafruit.com/raspberry-pi-analog-to-digital-converters/mcp3008 this is the code I'm using for my current sensor in python:
In node-red I've selected channel 0 and CE0 but getting zero for output. Before, it was outputting a range from 490-520 which is what the code was giving me. I've now connected it to a potentiometer to test but getting same result of zero no matter which way to turn the potentiometer. |
It's just outputting zero all the time instead of a number around 500 even without running another script. Could this be affected by other nodes I'm trying to run? like raspi-io, wiring-pi, or johnny five? |
think i found my answer: I think I found my answers: "Here's a guess: During the initialization phase of a Johnny-Five/Raspi-IO application all available GPIOs on the Raspberey Pi are automatically configured as GPIO outputs, irrespective of whether the Johnny-Five/Raspi-IO application actually use those GPIOs or not. On the other hand, node-red-node-pi-mcp3008 requires that the SPI specific GPIOs be configured as SPI GPIOs, not as GPIOs outputs. They were actually configured as SPI GPIOs at boot time but the fact that Johnny-Five/Raspi-IO reconfigures everything to be a GPIO output then breaks node-red-node-pi-mcp3008." Here's the link to the thread: |
closing as it's not a problem with the node, just config and conflict with other device errors |
I have a MCP3008 connected to a ACS712 current sensor. I have everything connected correctly. It would output around 500 like its supposed to when nothing is connected to the current sensor. But when I run a python script on the raspberry pi to log data for the current sensor, msg.payload would display zero for output. Would you happen to know why it is doing this? Thanks!
The text was updated successfully, but these errors were encountered: