I'd like to build my very own grow controler with the raspberry pi. I want to messure temperature, humidity and how wet the soil is and i want to control a water pump and lights. My question is wether it's possible to use only Python to accomplish all of that. I dont have an overall view of what i can accomplish with which programming language, that's why im asking. I'm a little bit familiar with Python and Java (which i dont want to use if not necessary).

Thanks for your answers

  • Why wouldn't it be possible?
    – goldilocks
    Mar 28, 2017 at 15:43
  • Maybe because it's not possible to write code that reacts to the data delivered by the different components, or at least not with Python, but your answer gives me hope, thanks!
    – Daniel
    Mar 28, 2017 at 15:45
  • It was rhetorical ;) I'm sure it is possible, because most pi-specific things (generally: working with things accessible via the breakout pins) already have python implementations. But thinking about this should enable you to make the problem more concrete.
    – goldilocks
    Mar 28, 2017 at 15:51

1 Answer 1


You can achieve each of those things with Python on the Raspberry Pi. The key is in the Raspberry Pi Python library support for GPIO peripherals.

For help on a particular sensor search for raspberry pi Python sensor name.

Most of the sensors you mention are digital (return 0 or 1) and may be directly connected to the Pi provided their voltage is 3V3 compatible (otherwise you will need a level shifter or voltage divider circuit).

The hygrometer is likely to be an analogue sensor (returns a varying voltage) for which you will need to buy an additional ADC (Analogue to Digital Converter).

To control outputs you may also need special equipment. The Pi GPIO only switch a little current at 3V3, not enough to drive a water pump or normal lights. For the motor you will need as additional motor driver board. For lights you might use a relay or build a transistor circuit.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.