(前略) if (hum > wet_l3): command(LCD_2ndline) print("Dry") writeLCD("Dry ") led1.on() url = "https://notify-api.line.me/api/notify" # 追加 access_token = '*****************************************'# トークンを記述 headers = {'Authorization': 'Bearer ' + access_token}# 追加 message = '水やりを開始します' # 追加 payload = {'message': message}# 追加 r = requests.post(url, headers=headers, params=payload,)# 追加 motor.forward()
![庭の水やりで身近なIoTを体験、自動水やりシステムの構築 ~給水をLINEで通知~](https://cdn-ak-scissors.b.st-hatena.com/image/square/aa428e9fbef9addce434e3194efed22d8aee6ba1/height=288;version=1;width=512/https%3A%2F%2Fimage.itmedia.co.jp%2Fnews%2Farticles%2F2107%2F22%2Fl_piclemat01.jpg)