# Node-red-node-pi-mcp3008 always return 0

**URL:** https://discourse.nodered.org/t/node-red-node-pi-mcp3008-always-return-0/560
**Category:** General
**Created:** [2 June 2018 21:47 UTC](https://discourse.nodered.org/t/node-red-node-pi-mcp3008-always-return-0/560 "2018-06-02T21:47:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![excessnet](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/excessnet/32/404_2.png) [@excessnet](https://discourse.nodered.org/u/excessnet)
#### Post date: [2 June 2018 21:47 UTC](https://discourse.nodered.org/t/node-red-node-pi-mcp3008-always-return-0/560/1 "2018-06-02T21:47:11Z")

</div>

Hello there,

I’ve been trying for several hours to figure out why the MCP3008 always read “0” on node-red.

I’ve confirmed with many site and also using the Adafruit Library ( [https://learn.adafruit.com/raspberry-pi-analog-to-digital-converters/mcp3008](https://learn.adafruit.com/raspberry-pi-analog-to-digital-converters/mcp3008) ) that my connection are okay. I can get/read value with the Adafruit librairy using the simpleexample.py .

I just started fresh, so let me know what I should try or do

I’m using a RPi Zero W

1. Installer Raspian
2. raspi-config, enable “SPI” in “Interface Options” and reboot
3. Using curl command ( [https://nodered.org/docs/hardware/raspberrypi](https://nodered.org/docs/hardware/raspberrypi) ) to install node-red (I tried with and without RPi specific nodes).
4. Install “node-red-node-pi-mcp3008” using Pallet Manager
5. Add an inject node (let at timestamp), add the MCP3008 (lets A0 and CE0), add a debug.

I tried on CE1 and all the others Ax ports… always return Zero.

Any idea ?

---

<div class="post-metadata">

### Author: ![excessnet](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/excessnet/32/404_2.png) [@excessnet](https://discourse.nodered.org/u/excessnet)
#### Post date: [2 June 2018 23:39 UTC](https://discourse.nodered.org/t/node-red-node-pi-mcp3008-always-return-0/560/2 "2018-06-02T23:39:19Z")

</div>

I feel SO stupid… I plugged the 3.3V and GND at the other end of the breadboard and forgot it was separated on the middle… damn me… sorry !
