You can see this too:https://electronoobs.com/eng_arduino_tut83.php
Note that the ADS1115 uses I2C.
Not that I'm hell bent on doing this the hard way, I may just order whatever has the best library available and make life easy. I'm just kind of surprised that I haven't found a proper walkthrough of writing code for reading ADCs
Each ADC has it's own command protocol built on top of the SPI protocol so you're not going to see a general way of interacting with ADCs.
The way to interact with a general SPI device is this:
1. First select the device by pulling LOW the CS line of the device.
2. Send a sequence of bytes one bit at a time through a GPIO line using another GPIO line as a clock signal; one bit is sent per clock transition.
3. Continue toggling the clock and receive the result through another GPIO line.
4. Finally raise the CS line of the device to indicate the end of the interaction.
This page has a pretty good description of this process:
https://learn.sparkfun.com/tutorials/serial-peripheral-interface-spi/allNow that you can send and receive results you need to look at your specific device's datasheet to determine what to send and how to interpret the results.
The code at
https://playground.arduino.cc/Code/MCP3208/ has the convenient function read_adc() which will do all of this for you. The command it sends are the top 5 bits of the
commandbits variable. You can look up what those bits mean on page 19 of the MCP3208 datasheet:
https://playground.arduino.cc/Code/MCP3208/