mametarou963
Published

Portable Automatic Faucets Using M5StickC for COVID-19

Using the M5StickC, we developed a product that allows you to wash your hands without touching the device.

BeginnerFull instructions provided1 hour66
Portable Automatic Faucets Using M5StickC for COVID-19

Things used in this project

Hardware components

M5StickC ESP32-PICO Mini IoT Development Board
M5Stack M5StickC ESP32-PICO Mini IoT Development Board
×1
M5StickC PIR HUT
×1
Mini 3A Relay Unit
M5Stack Mini 3A Relay Unit
×1
water moter pomp
×1

Story

Read more

Code

main

MicroPython
from m5stack import *
from m5ui import *
from uiflow import *
import time
import hat
import unit
import hat

setScreenColor(0x111111)
relay1 = unit.get(unit.RELAY, unit.PORTA)

hat_pir0 = hat.get(hat.PIR)



label0 = M5TextBox(26, 67, "Text", lcd.FONT_Default,0xFFFFFF, rotate=0)


relay1.on()
while True:
  if 1 == (hat_pir0.state):
    relay1.on()
  else:
    relay1.off()
  wait_ms(100)
  wait_ms(2)

Credits

mametarou963

mametarou963

0 projects • 0 followers

Comments

Add projectSign up / Login