News Create a Raspberry Pi Light Show with Analog Inputs

SonoraTechnical

Reputable
May 28, 2020
86
67
4,610
You need to enable the SPI Interface in the RaspberryPI as well. The omission of any mention of SPI in this article is odd.... It's what allows the 'I/O' expansion in this tutorial, that is the ability to accept analog inputs. The MCP3008 is an A/D converter, which relays the info back to the RaspberryPi over the SPI Interface.... similar to what you might do for I/O expansion over an UART or I2C interface.
 

biglesp

Commendable
Jun 11, 2020
6
1
1,515
You need to enable the SPI Interface in the RaspberryPI as well. The omission of any mention of SPI in this article is odd.... It's what allows the 'I/O' expansion in this tutorial, that is the ability to accept analog inputs. The MCP3008 is an A/D converter, which relays the info back to the RaspberryPi over the SPI Interface.... similar to what you might do for I/O expansion over an UART or I2C interface.
Hello, thanks for your comment.
We are using the GPIO Zero Python 3 module to handle communication with the MCP3008 and this has two SPI modes.
  1. A software SPI which is always available and needs no further configuration, but it is much slower than hardware.
  2. A hardware SPI which is enabled when the SPI kernel module is enabled via raspi-config or the GUI Raspberry Pi configuration tool.
GPIO Zero Documentation for SPI
https://gpiozero.readthedocs.io/en/stable/api_spi.html

I hope that this clears the issue for you. Many thanks for reading.