製作1個自動灌溉系統(簡易版)
透過soil moisture sensor得到泥土的濕度後,便能運用這個數據判斷泥土是否太乾枯,需不需要灌溉.
當太乾枯的時候,便發出提示. 灌溉後,泥土變回濕潤時提示便會關閉.
需要的物料 :
- micro:bit x 1
- I/O board x 1
- soil moisture sensor x 1
- 12" M/M Jumper Wires x 3
soil moisture sensor 在 I/O board的接駁方法 :
SIG --> P0 (用作讀取數據)
GND --> 5V (-)
VCC --> 5V(+)

Coding 概覽 :

analog的數值會需要自行微調,建議由老師/學生自行測試.
可透過「show number analog read pin P0」來自行判斷什麼是濕.
