# Plant\_io - Plant Cultivation Kit (CE09696)

**URL:** <https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662>\
**Category:** Product Questions\
**Created:** [24 July 2023 01:27 UTC](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662 "2023-07-24T01:27:50Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![Liam](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/liam/32/3562_2.png) [@Liam](https://forum.core-electronics.com.au/u/Liam)\
**Post date:** [13 February 2024 00:24 UTC](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662/41 "2024-02-13T00:24:43Z")

</div>

Hi Justin,

I tried the code and it worked sometimes and then other times it just turned off.

> [@Justin264431](#):
>
> I tried the code and it worked sometimes and then other times it just turned off.

Very strange, just to confirm - the LED doesnt light sometimes but the HAT’s LED comes on?

> [@Justin264431](#):
>
> When the Plant is operating off of battery power is the LED lights on the HAT supposed to stay on constantly? Or does it just come on when the 20minute power cycle kicks in to run the program and then off again?

The Latter is correct, once the 20 minutes has elapsed the Pico turns on and runs all of the code then turns the DONE pin on and puts it back to sleep by cutting the power.

Questions and debugging are great!  
Keen to get your watering setup running smoothly!  
Liam

---

<div class="post-metadata">

**Author:** ![Justin264431](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/justin264431/32/9663_2.png) [@Justin264431](https://forum.core-electronics.com.au/u/Justin264431)\
**Post date:** [13 February 2024 07:07 UTC](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662/42 "2024-02-13T07:07:01Z")

</div>

Hi Liam,

I have a great update.

After i ran the simple code to test the power HAT that you gave me, (which i think i somehow still managed to not properly work out), i then re-installed the proper plant main.py file which had all my data in it, and there you go…it now seems to be working totally fine. No idea what actually caused the issues, but the battery pack set up is now working to my liking. I haven’t done a long test yet, but i will start now.

Thanks for your help.

I can imagine this must be a tad frustrating for you given the plant io has probably attracted some non programmers to the field (like myself). Well, we persevered and it seems to have paid off, at least for now.

Justin

---

<div class="post-metadata">

**Author:** ![Pixmusix](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/pixmusix/32/9719_2.png) [@Pixmusix](https://forum.core-electronics.com.au/u/Pixmusix)\
**Post date:** [13 February 2024 08:29 UTC](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662/43 "2024-02-13T08:29:00Z")

</div>

> [@Justin264431](#):
>
> it now seems to be working totally fine.  
> we persevered and it seems to have paid off, at least for now.

🥳

# Nice one @Justin264431 !

![](https://media1.tenor.com/m/5ycAvkTEVbsAAAAd/ryan-gosling-ryan-gosling-thumbs-up.gif "Ryan Gosling Ryan Gosling Thumbs Up GIF - Ryan Gosling Ryan Gosling Thumbs Up...")

---

<div class="post-metadata">

**Author:** ![Justin264431](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/justin264431/32/9663_2.png) [@Justin264431](https://forum.core-electronics.com.au/u/Justin264431)\
**Post date:** [13 February 2024 10:16 UTC](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662/45 "2024-02-13T10:16:47Z")

</div>

🕶

 ![IMG_9229](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/2/22db2b9a9580cfa7e60b2f4605b367079c45f6f0.jpeg)  
 ![IMG_9232](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/b/b1cf3aa28b551778237a03cc35ddf885dc6be8db.jpeg)

---

<div class="post-metadata">

**Author:** ![Liam120347](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/liam120347/32/5003_2.png) [@Liam120347](https://forum.core-electronics.com.au/u/Liam120347)\
**Post date:** [13 February 2024 12:30 UTC](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662/46 "2024-02-13T12:30:35Z")

</div>

Hi Justin,

WHOOOOO!!! Sweet work getting it workin, and nice setup!

No frustrations from anyone, it was great exploring and troubleshooting the system.

> [@Justin264431](#):
>
> has probably attracted some non programmers to the field (like myself)

That’s the whole point! We’re all keen to see your learning journey continue!

---

<div class="post-metadata">

**Author:** ![Justin264431](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/justin264431/32/9663_2.png) [@Justin264431](https://forum.core-electronics.com.au/u/Justin264431)\
**Post date:** [13 February 2024 22:00 UTC](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662/47 "2024-02-13T22:00:25Z")

</div>

Hi Liam,

I’ve made a couple of notes:

- Time of day and year are critical pieces of information to map long term horticultural data. I notice in the Plant\_io code data, there isn’t a line for an RTC picodev module. Is that something that can be say daisy chained to an existing atmospheric sensor _seen in pic above_?

- Is it possible to daisy chain a PicoDev OLED module to this setup and have it read out current metrics?

- The longer term goal for me personally would be to have this plant\_io set up become completely wireless (wifi enabled) to monitor data from a wireless position. The problem is I have no idea where to start to code this.

Justin

---

<div class="post-metadata">

**Author:** ![Pixmusix](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/pixmusix/32/9719_2.png) [@Pixmusix](https://forum.core-electronics.com.au/u/Pixmusix)\
**Post date:** [13 February 2024 22:45 UTC](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662/48 "2024-02-13T22:45:07Z")

</div>

> [@Justin264431](#):
>
> The longer term goal for me personally would be to have this plant\_io set up become completely wireless (wifi enabled) to monitor data from a wireless position. The problem is I have no idea where to start to code this.

Learning _sockets_ and _intercom over network_ is NOT beyond you 🙂  
It is not an easy skill however, and I think it will take you a long time to learn.  
That’s not a bad thing if you have the time. If you want to give it a shot, we can try to help.

If you would like to receive updates and monitor the progress of the plant setup, what about something simple like a **daily email.**  
Sending emails from a raspberry PI is much easier than something like SSH.  
You could get a small microcontroller to read the data, format it in a pretty way, and then send you a full colour report every morning.  
Some bar graphs, fun stats.  
Maybe even a line graph showing it’s progress over the last month.  
Could be fun!

---

<div class="post-metadata">

**Author:** ![Justin264431](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/justin264431/32/9663_2.png) [@Justin264431](https://forum.core-electronics.com.au/u/Justin264431)\
**Post date:** [14 February 2024 00:46 UTC](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662/49 "2024-02-14T00:46:58Z")

</div>

> [@Pixmusix](#):
>
> You could get a small microcontroller to read the data, format it in a pretty way, and then send you a full colour report every morning.  
> Some bar graphs, fun stats.

This sounds pretty awesome.

---

<div class="post-metadata">

**Author:** ![Pixmusix](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/pixmusix/32/9719_2.png) [@Pixmusix](https://forum.core-electronics.com.au/u/Pixmusix)\
**Post date:** [14 February 2024 01:07 UTC](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662/50 "2024-02-14T01:07:22Z")

</div>

[Gmail has a API you could use.](https://developers.google.com/gmail/api/guides/sending#python)

You will also need a single board computer that can

1. listen to your PICO using the GPIO
2. Connect to the internet.

Since you’ve started with python and raspberry pi already, I’d suggest this.

> **[Raspberry Pi Zero W (Wireless)](https://core-electronics.com.au/raspberry-pi-zero-w-wireless.html)**
>
> The smallest Raspberry Pi just got a whole lot cooler. The Raspberry Pi Zero W carries the same form factor and specifications as the original Pi Zero and provides built-in WiFi and Bluetooth 4.1!

Before making any purchases or modifications to your working plant setup, consider opening your day to day Personal Computer and following googles API tutorial. Write some code on your computer that sends an email to yourself. Just an email that says “Hello Justin!”. Get familiar; then commit.

---

<div class="post-metadata">

**Author:** ![Blayden](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/blayden/32/7535_2.png) [@Blayden](https://forum.core-electronics.com.au/u/Blayden)\
**Post date:** [14 February 2024 05:58 UTC](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662/51 "2024-02-14T05:58:47Z")

</div>

Hey Justin,

Pixmusix definitely has some awesome ideas here for how this could be set up. making the Plant\_io kit into an IOT connected device was inevitable, but with the use of a Pico W it may be a lot simpler than you think. Even using the Wifi capability of the Pico W to have communication with your local wireless network opens a range of possibilities.

Cheers,  
Blayden

---

<div class="post-metadata">

**Author:** ![Justin264431](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/justin264431/32/9663_2.png) [@Justin264431](https://forum.core-electronics.com.au/u/Justin264431)\
**Post date:** [16 February 2024 10:00 UTC](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662/52 "2024-02-16T10:00:33Z")

</div>

Hey Guys,

So i’ve been busy adding some sensor’s (BME280, ENS160, VEML6030), which i think i’ve managed to get working fine…whilst connected to USB. When i ran the setup on battery i noticed that all the Air Quality Sensor Data were: “eCO2(value=0, rating=‘invalid’),operating ok,0,AQI(value=0, rating=‘invalid’)”. Basically, i’m just wondering if there needs to be a little more of a delay when grabbing the eCO2 Data because it seems like the sensors didn’t have enough time to initialise. Or i’m doing something wrong.

# This project requires the Plant\_io module which handles

# - Interfacing with electronics (pump, moisture sensor, PiicoDev modules)

# - Datalogging to a file

# 

# Plant\_io removes a lot of setup complexity from PiicoDev but is only compatible with select modules.

from time import sleep\_ms  
from Plant\_io import Plant\_io, DataLogger

while True:  
### Step 1: Initialise the Plant  
plant = Plant\_io()  
plant.moisture\_setpoint = 80 # change this to tune how moist the growing media should be. Use the results from test\_moisture\_sensor.py

```
# Attach sensors. Comment-out any sensors you are not using.
print("Initialising PiicoDev modules")
plant.attach('BME280') # Atmospheric Sensor
plant.attach('ENS160') # Air-Quality Sensor

```

# plant.attach(‘VEML6040’) # Colour Sensor

```
plant.attach('VEML6030') # Ambient Light Sensor

```

# plant.attach(‘VL53L1X’) # Laser Distance Sensor

# plant.attach(‘LIS3DH’) # 3-Axis Accelerometer

# plant.attach(‘QMC6310’) # 3-Axis Magnetometer

```
print("")

### Step 2: Collect some data to log
soil_moisture = plant.measure_soil()
voltage = plant.measure_system_voltage()

```

# Ambient Light Sensor VEML6030

```
lux = plant.VEML6030_light()

```

# 

# Atmospheric Sensor BME280

```
temperature_C, pressure_Pa, humidity_RH = plant.BME280_weather()

```

# 

# Air-Quality Sensor ENS160

```
ENS160_status, AQI, TVOC, eCO2 = plant.ENS160_air_quality()

```

# 

# Colour Sensor VEML6040

# hsv = plant.VEML6040\_HSV()

# rgb = plant.VEML6040\_RGB()

# 

# Laser Distance Sensor VL53L1X

# distance\_mm = plant.VL53L1X\_distance()

# 

# 3-Axis Accelerometer LIS3DH

# acceleration = plant.LIS3DH\_acceleration()

# 

# Magnetometer QMC6310

# plant.QMC6310\_calibrate() # should only need to run once. Comment out once calibration is complete.

# flux = plant.QMC6310\_flux()

# polar = plant.QMC6310\_polar()

```
### Step 3: Run the pump if plant requires water. This function uses soil moisture to decide whether to run the pump or not.
pump_running_seconds = plant.run_pump_control()

# Print some debugging information
print(f'Moisture {soil_moisture:5.2f}% Pump Time {pump_running_seconds:5.2f}s')

### Step 4: Log the data to a file
period_minutes = 20 # The chosen interval time on the Makerverse Nano Power Timer
file_name = 'log.txt'

# These are the labels that appear at the top of each data column in the log.txt file
# TODO: Add your heading titles here
heading_time = 'Time [minutes]'
heading_moisture = 'Moisture [%]'
heading_pump = 'Pump Run [seconds]'
heading_voltage = 'Supply Voltage [V]'
heading_lux = 'lux'
heading_temperature = 'Temperature [C]'
heading_pressure = 'Pressure [Pa]'
heading_humidity = 'Humidity [RH%]'
heading_ENS160_status = 'ENS160_status'
heading_eCO2 = 'eCO2 [ppm]'
heading_AQI = 'AQI'
heading_TVOC = 'TVOC [ppb]'
data_heading = [heading_time, heading_moisture, heading_pump, heading_voltage, heading_lux, heading_temperature, heading_pressure, heading_humidity , heading_eCO2 , heading_ENS160_status, heading_TVOC, heading_AQI ,] # The heading that will appear at the top of the log file

logfile = DataLogger(file_name, data_heading, period_minutes) # Open the log file, and write the data_heading if the file was just created.
timestamp = logfile.last_timestamp + period_minutes # get the most recent timestamp

# Construct a data dictionary - dictionary keys match the data headings eg. {heading string : data to log}
# TODO: Add your sampled data here
data = {heading_time : timestamp,
        heading_moisture : soil_moisture,
        heading_pump : pump_running_seconds,
        heading_voltage : voltage,
        heading_temperature : temperature_C,
        heading_pressure : pressure_Pa,
        heading_humidity : humidity_RH,
        heading_lux : lux,
        heading_eCO2 : eCO2,
        heading_ENS160_status: ENS160_status,
        heading_TVOC : TVOC,
        heading_AQI : AQI,
        
        
        
        }

logfile.log_data(data)

### Step 5: Signal to the Makerverse Nano Power Timer that we are DONE!
# This removes power from the project until the next timer interval
plant.sleep()

### Step 6: If we are running from USB power then power will never be removed by the Nano Power Timer.
# Instead we can just insert a delay. When powered only by batteries, this code will never run.
sleep_ms(round(1000*60*period_minutes))

```

---

<div class="post-metadata">

**Author:** ![Michael](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/michael/32/3545_2.png) [@Michael](https://forum.core-electronics.com.au/u/Michael)\
**Post date:** [20 February 2024 06:09 UTC](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662/53 "2024-02-20T06:09:18Z")

</div>

You’re totally right - the Air Quality sensor will need more on-time to warm up the sensor.

check out the [ENS160 guides](https://core-electronics.com.au/guides/piicodev/piicodev-air-quality-sensor-ens160-getting-started-guide/) for a rundown on how the warm up time works. It may be that you need to pre-treat the sensor for 24 hours to get past it’s initial startup time, and then the subsequent startup times will be much faster.

---

<div class="post-metadata">

**Author:** ![Josh265172](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@Josh265172](https://forum.core-electronics.com.au/u/Josh265172)\
**Post date:** [18 May 2024 03:35 UTC](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662/54 "2024-05-18T03:35:01Z")

</div>

Hi,

Finally got back around to figuring out my problem of the soil moisture probe not giving correct readings and thought id put up a solution i found. I ended up using a different script to get the raw output, run it 100 times and then output the average and then use those values in the Plant\_io.py script. Worked a treat, i now get nice 0% and 100% values 🙂 time to get this thing all setup then.

```auto
from time import sleep_ms
from Plant_io import Plant_io

# Initialise the Plant_io controller
plant = Plant_io()

def test_adc_reading(soil):
    soil_adc_reading = soil.read_u16()
    print(f"ADC Reading: {soil_adc_reading}")
    return soil_adc_reading

# Initialize a list to store the ADC readings
adc_readings = []

# Run the function 100 times
for _ in range(100):
    adc_reading = test_adc_reading(plant.soil)
    adc_readings.append(adc_reading)
    sleep_ms(100)  

# Calculate the average ADC reading
average_adc_reading = sum(adc_readings) / len(adc_readings)

print(f"Average ADC Reading: {average_adc_reading}")

```

---

<div class="post-metadata">

**Author:** ![Aaron](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/aaron/32/9861_2.png) [@Aaron](https://forum.core-electronics.com.au/u/Aaron)\
**Post date:** [19 May 2024 23:36 UTC](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662/55 "2024-05-19T23:36:18Z")

</div>

Hi @Josh265172,

Glad to hear you go it all working well now 🙂!!!

---

<div class="post-metadata">

**Author:** ![Tom224738](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@Tom224738](https://forum.core-electronics.com.au/u/Tom224738)\
**Post date:** [4 September 2024 09:59 UTC](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662/56 "2024-09-04T09:59:39Z")

</div>

This is a great project & I’d order a heap for my classes if it was Arduino based. Is that possible? I can’t justify teaching another programming language for one project.

---

<div class="post-metadata">

**Author:** ![Liam120347](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/liam120347/32/5003_2.png) [@Liam120347](https://forum.core-electronics.com.au/u/Liam120347)\
**Post date:** [4 September 2024 10:43 UTC](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662/57 "2024-09-04T10:43:53Z")

</div>

Hi Tom,

Definitely possible, are you using Arduino Uno’s, or would it be possible to use the Pico (with Arduino) the code would have to be ported but that’s entirely do-able

---

<div class="post-metadata">

**Author:** ![Pixmusix](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/pixmusix/32/9719_2.png) [@Pixmusix](https://forum.core-electronics.com.au/u/Pixmusix)\
**Post date:** [5 September 2024 00:43 UTC](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662/58 "2024-09-05T00:43:19Z")

</div>

Hey @Tom224738  
Do you want Arduino because of the simplicity of the IDE, language, and ecosystem? Or do you want Arduino because you like (or already own) the hardware?

---

<div class="post-metadata">

**Author:** ![Tom224738](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@Tom224738](https://forum.core-electronics.com.au/u/Tom224738)\
**Post date:** [5 September 2024 06:15 UTC](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662/59 "2024-09-05T06:15:42Z")

</div>

Hi,  
I want Arduino because that’s the system we already teach with at our school and i wouldn’t change it for just one project.

---

<div class="post-metadata">

**Author:** ![Pixmusix](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/pixmusix/32/9719_2.png) [@Pixmusix](https://forum.core-electronics.com.au/u/Pixmusix)\
**Post date:** [5 September 2024 06:32 UTC](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662/60 "2024-09-05T06:32:02Z")

</div>

> [@Tom224738](#):
>
> i wouldn’t change it for just one project.

Can’t argue with that.  
Looking through the plantIO code base I can see that it’s built upon the strong foundation CE has developed for their in-house piicodev and maker-verse lines. These libraries are micropython native. Porting it the C++ is possible, but, in my personal opinion, not a trivial weekend project.

I could imagine remixes of this project, inspired by @Michael & CEs design, but built from the ground up in a way appropriate for the Arduino ecosystem. If there was some support from the forums, is that something you would be interested in perusing?

---

<div class="post-metadata">

**Author:** ![Robert93820](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@Robert93820](https://forum.core-electronics.com.au/u/Robert93820)\
**Post date:** [6 September 2024 00:52 UTC](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662/61 "2024-09-06T00:52:52Z")

</div>

Hi Tom  
At the end of the day would it be a case of simply reading the relevant info from sensors via I2C and processing that with Arduino instead of Pico or whatever.

I have not gone into this sort of thing but quite some time ago I purchased some rotary encoder boards with a system called “Seesaw” (I think Adafruit) on board to decode the encoders. An Arduino UNO had no bother reading the I2C rotary encoder info from that.  
Cheers Bob

[Previous page](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662.md?page=2)

[Next page](https://forum.core-electronics.com.au/t/plant-io-plant-cultivation-kit-ce09696/17662.md?page=4)
