PiPlanter | Interfacing an ADC, Python, and MySQL [Documentation]

As this post is more of an update, I won’t be adding any explanations, just giving the python code.

This will read 3 values from the adc and put them into the database “adc_database”. It will put them in the table “adc_input_data_4” in the columns “Channel_1″,”Channel_2” and “Channel_3” respectively.

There you go, bigger post coming later tonight.

2 Comments

  1. Love the derp. Love the blog as well – planning on adapting your PiPlanter idea to my situation. Everything has been very informative.

    I’m just wondering, based off your blog and other searching, how one would go about connecting two ADC’s to the RPI to essentially expand the number of analog sensors?

    I have 2 “zones” for planting that I wish to gather all the sensor data from, as well as several hygrometers, working out to about 15 sensors overall. With the MCP3008, it would appear I’m limited to 8 inputs. I was unable to find a larger newbie friendly ADC with more inputs, but I did note the CS0 and CS1 pins that would appear you could use for two ADC’s sharing the SCLK, MISO and MOSI pins?

    I apologize if this is a bit far out for a comment 🙂 But I do appreciate your input!

    1. Hey, I’m not totally sure if that would work out, but It might be worth it to experiment. Please come back if you find out if this works.

Leave a Reply