Anny XuChristina ZhangRiven
Published © MIT

IoT Smart Plant Assistant made with ESP32 Future Board

Make a plant assistant with the ESP32 Future board to remind you to water the plant when the soil is too dry

BeginnerFull instructions provided3 hours918

Things used in this project

Hardware components

Future Board
KittenBot Future Board
×1
KittenBot 400mAh Rechargable Lithium Battery Pack for Meowbit
KittenBot 400mAh Rechargable Lithium Battery Pack for Meowbit
×1

Software apps and online services

KittenBot Kittenblock

Story

Read more

Code

plant assistant.py

Python
#/bin/python
from future import *

from time import sleep

import mqttsimple

P0 = MeowPin('P0', 'ANALOG')

x = 0

buzzer.melody(CORRECT)
screen.sync = 0
sleep(3)
if not wifi.sta.isconnected():
  wifi.connect(str("Kittenbot"), "xxxx")
sleep(1)
mqtt = mqttsimple.MQTTClient("iot.kittenbot.cn", "hum",port=1883)
mqtt.connect()
while True:
  x = P0.getAnalog(12)
  mqtt.publish("/Hum", str(x))
  screen.fill((0, 0, 0))
  screen.text(x,10,10,3,(0, 119, 255))
  screen.refresh()
  sleep(3)

Credits

Anny Xu
7 projects • 15 followers
Contact
Christina Zhang
35 projects • 38 followers
Founder of KittenBot
Contact
Riven
8 projects • 21 followers
Contact
Thanks to Sherlock.

Comments

Please log in or sign up to comment.