You can build and code your own Plantagotchi -- an adorable virtual plant friend to help you take care of your real potted plants and flowers!

We'll use the PyBadge's analog read capabilities to measure the moisture level of our potted plant's soil. In fact, the dirt will act like one big variable resistor. When soil is dry, it's not very conductive, so its resistance is high. Add water to the minerals in the soil and it will become more conductive, lowering the overall resistance.

We'll provide a 3.3V reference voltage from the PyBadge over one alligator connected to a nail plunged into the soil. Then, another alligator clip will be plugged into analog pin A3 on the PyBadge and connected to a second nail in the soil. By reading the voltage level on pin A3 (from a possible 0 to 1023) we'll be able tell how moist the soil is. When it's dry, the voltage level read will be low, when it's wet, the reading will be high.

Determining light levels is even easier -- we'll simply use the PyBadge's built-in light sensor!

Parts

Angled shot of a Adafruit PyBadge for MakeCode Arcade, CircuitPython, or Arduino.
What's the size of a credit card and can run CircuitPython, MakeCode Arcade or Arduino? That's right, its the Adafruit PyBadge! We wanted to see how much we...
$34.95
In Stock
Group of Small Alligator Clip to Male Jumper Wires
When working with unusual non-header-friendly surfaces, these handy cables will be your best friends! No longer will you have long, cumbersome strands of alligator clips. These...
$3.95
In Stock
Fully Reversible Pink/Purple USB A to micro B Cable
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also fully reversible! That's right, you will save seconds a day by...
$3.95
In Stock
Lithium Ion Polymer Battery 3.7v 350mAh with JST 2-PH connector and short cable
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This...
$5.95
In Stock

Optional

Grow Your Own Clovers Kit with 4-H logo
We are super pleased to enjoy a partnership with an engaging, empowering foundation like 4-H. Here at Adafruit we drive ourselves to "be...
$5.95
In Stock

This guide was first published on Aug 05, 2019. It was last updated on Mar 08, 2024.

This page (Overview) was last updated on Mar 08, 2024.

Text editor powered by tinymce.