Is there a way to route an analog signal from a simple temperature sensor through an ADC, MCP3008, into a digital pin. I have used all the analog pins on my Arduino Mega 2560 and am trying to utilize all the digital I/Os.
Any insights on the matter would be greatly appreciated.
1 Answer 1
The MCP3008 is an SPI device. You connect it to the SPI pins of your Arduino. Then you can read 8 analog channels through it.
It requires 4 pins: MISO, MOSI, SCK and a chip select pin.
-
If you don't plan on adding anything else that uses SPI you could just connect the ChipSelect to ground, and free a pin on the Arduino.Gerben– Gerben2016年09月03日 10:24:06 +00:00Commented Sep 3, 2016 at 10:24
-
1@Gerben That is not good practice. Chip Select is not just used to multiplex the bus but also to synchronise the start and (sometimes) the end of communication.Majenko– Majenko2016年09月03日 11:23:45 +00:00Commented Sep 3, 2016 at 11:23
Explore related questions
See similar questions with these tags.