diff --git a/line.ino b/line.ino new file mode 100644 index 0000000..1c2e540 --- /dev/null +++ b/line.ino @@ -0,0 +1,18 @@ +boolean line_notify(String msg) { + WiFiClientSecure client; + client.setInsecure(); + if(!client.connect(host, 443)) { + Serial.println("connect error!"); + return false; + } + String query = String("message=") + msg; + String request = String("") + + "POST /api/notify HTTP/1.1\r\n" + + "Host: " + host + "\r\n" + + "Authorization: Bearer " + token + "\r\n" + + "Content-Length: " + String(query.length()) + "\r\n" + + "Content-Type: application/x-www-form-urlencoded\r\n\r\n" + + query + "\r\n"; + client.print(request); + return true; +} \ No newline at end of file diff --git a/umbrella.ino b/umbrella.ino new file mode 100644 index 0000000..a32cb5a --- /dev/null +++ b/umbrella.ino @@ -0,0 +1,21 @@ +//umbrella notice +void unotice(){ + delay(900); + M5.Lcd.fillScreen(BLUE); + M5.Lcd.setTextColor(BLACK); + M5.Lcd.setTextSize(4); + M5.Lcd.setCursor(10,10); + M5.Lcd.printf("Umbrella!"); + digitalWrite(LED_PIN, HIGH); + M5.Beep.beep(); + delay(300); + digitalWrite(LED_PIN, LOW); + M5.Beep.mute(); + delay(300); + digitalWrite(LED_PIN, HIGH); + M5.Beep.beep(); + delay(300); + digitalWrite(LED_PIN, LOW); + M5.Beep.mute(); + delay(300); +} \ No newline at end of file