制造商零件编号 K007
M5STACK FIRE IOT DEV KIT (PSRAM)
M5Stack Technology Co., Ltd.
所订产品一般在 7-10个工作日 内送达中国,具体时间取决于收货地点。
最低订购金额为人民币 300 元,顺丰快递免运费配送。
当用人民币下单时,按照国际贸易条款 DDP(DigiKey 支付关税、海关费用和当地税款)方式结算。
电汇预付
更多来自全授权合作伙伴的产品
下单后,从合作伙伴发货平均需要时间 1-3 天,也可能产生额外运费。可能另外收取运费。 实际发货时间请留意产品详情页、购物车和结账页面上的说明。
国际贸易结算方式:CPT(交货时支付关税、海关费用和适用 VAT/应付税金)
有关详情,请访问帮助和支持
License: General Public License Humidity Arduino
* Thanks for the source code and project information provided by @C1 Group 1
Nowadays people are too busy with work and/or studies to properly take care of their plants at home. It could come to the point that they might completely neglect them, causing the plants to dehydrate, wilt, and die. With this system, plants can still be cared for even if people are away for a long time.
The system uses an Earth sensor that detects moisture in the soil. If it detects low moisture, the LED will turn red and the buzzer will turn on to notify the user. A servo motor then proceeds to let out water from a container which will then flow into the plant's soil.
Code
from m5stack import *
from m5ui import *
from uiflow import *
import time
import unit
setScreenColor(0x222222)
earth0 = unit.get(unit.EARTH, unit.PORTB)
servo1 = unit.get(unit.SERVO, unit.PORTA)
label0 = M5TextBox(14, 109, "Text", lcd.FONT_DejaVu18, 0xffffff, rotate=0)
rectangle1 = M5Rect(-94, 190, 1000, 50, 0xff0000, 0xFFFFFF)
rectangle2 = M5Rect(-101, 0, 1000, 50, 0x22ff00, 0xFFFFFF)
while True:
rectangle1.hide()
rectangle2.show()
servo1.write_angle(0)
if (earth0.analogValue) <= 20:
rectangle1.show()
rectangle2.hide()
rgb.setColorAll(0xff0000)
label0.setColor(0xff0000)
label0.setText('MOISTURE LOW, WATERING...')
servo1.write_angle(90)
speaker.tone(800, 200)
wait(2)
speaker.tone(800, 0)
else:
rectangle1.hide()
rectangle2.show()
rgb.setColorAll(0x000000)
label0.setColor(0x33ff33)
label0.setText('MOISTURE LEVEL OK')
servo1.write_angle(0)
wait_ms(2)
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.
Visit TechForum谢谢!
敬请关注收件箱中的 DigiKey 新闻与更新!
请输入电子邮件地址