I've been messing with raspberry pi, and I am learning about interfacing it with analog devices. I am using the MCP3008 for that and following this tutorial [here][1]. I wired it up like the pictures below: 
[![enter image description here][2]][2]
[![enter image description here][3]][3]

I did all of the required things to set up spi devices such as:
1) enable spi in raspi-config
2) uncommented dtparam=spi=on in config.txt.
3) ls /dev/sp* says /dev/spidev0.0 and /dev/spidev0.1

Everything to me seems correct, but the output from a potentiometer is still 0 no matter what i do with it. can anyone spot the problem?


  [1]: https://pimylifeup.com/raspberry-pi-adc/
  [2]: https://i.sstatic.net/5bTAu.jpg
  [3]: https://i.sstatic.net/ubZF2.jpg