ตู้ไปรษณีย์แจ้งเตือนทาง Line สอนทำแบบระเอียดยิ๊บ..
---------------------
จากเมื่อสัปดาห์ที่แล้วผมได้โพสต์วีดีโอทดสอบการทำงานของตู้ไปรษณีย์แจ้งเตือนทางไลน์ไป ก็มีหลายๆคนสนใจผมจึงได้ทำคลิปขึ้นมา เพื่อพาทุกคนทำ ผมวังว่าคลิปนี้จะมีประโยชน์สำหรับใครหลายคนนะครับผม😊
-------------------------------------------------
คลิป https://www.youtube.com/watch?v=_cVsQ1oRuRA&t=108s
--------------------------------------------------
โค้ด
void Line_Notify1(String message1) ;
#include <ESP8266WiFi.h>
#include <DHT.h>
#define WIFI_SSID "ชื่อ wifi" /////////////*************แก้
#define WIFI_PASSWORD "รหัส wifi"////////**************แก้
#define LINE_TOKEN_PIR "line token"////***************แก้
#define PirPin D6
#define DHTPIN D7
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
String message1 = "ข้อความแจ้งเตือน";//****************แก้
bool beep_state = false;
bool send_state = false;
uint32_t ts, ts1, ts2;
void setup() {
Serial.begin(115200);
Serial.println();
pinMode(PirPin, INPUT);
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, HIGH);
dht.begin();
Serial.println("connecting");
WiFi.mode(WIFI_STA);
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Serial.print("connecting");
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
delay(500);
}
Serial.println();
Serial.print("connected: ");
Serial.println(WiFi.localIP());
delay(10000);
Serial.println("Pir Ready!!");
read_sensor();
ts = ts1 = ts2 = millis();
}
void loop() {
ts = millis();
if (WiFi.status() == WL_CONNECTED) {
digitalWrite(LED_BUILTIN, LOW);
} else {
digitalWrite(LED_BUILTIN, HIGH);
}
if ((ts - ts2 >= 60000) && (WiFi.status() == WL_CONNECTED)) {
read_sensor();
}
if ((ts - ts1 >= 5000) && (beep_state == true)) {
beep_state = false;
}
if ((digitalRead(PirPin) == HIGH) && (beep_state == false) && (WiFi.status() == WL_CONNECTED)) {
while (digitalRead(PirPin) == HIGH) delay(100);
Serial.println("Detect !");
Line_Notify1(message1);
beep_state = true;
}
delay(10);
}
void Line_Notify1(String message) {
WiFiClientSecure client;
if (!client.connect("notify-api.line.me", 443)) {
Serial.println("connection failed");
delay(2000);
return;
}
String req = "";
req += "POST /api/notify HTTP/1.1\r\n";
req += "Host: notify-api.line.me\r\n";
req += "Authorization: Bearer " + String(LINE_TOKEN_PIR) + "\r\n";
req += "Cache-Control: no-cache\r\n";
req += "User-Agent: ESP8266\r\n";
req += "Content-Type: application/x-www-form-urlencoded\r\n";
req += "Content-Length: " + String(String("message=" + message1).length()) + "\r\n";
req += "\r\n";
req += "message=" + message1;
// Serial.println(req);
client.print(req);
delay(20);
while (client.connected()) {
String line = client.readStringUntil('\n');
if (line == "\r") {
break;
}
}
}
void read_sensor() {
float h = dht.readHumidity();
float t = dht.readTemperature();
if (isnan(h) || isnan(t)) {
Serial.println("Failed to read from DHT sensor!");
return;
}
Serial.print("Temperature: ");
Serial.print(t);
Serial.println(" *C ");
}
----------------------------------------------------------
同時也有1部Youtube影片,追蹤數超過139萬的網紅Jessica Vu,也在其Youtube影片中提到,I finally moved out! Welcome to my first slice of life vlog ? (a cinematic journal / diary entry video format) ? Made in partnership with Function of...
c# string to type 在 Gillianyhs Facebook 的最佳解答
5x $50 voucher + Beanbag worth $88 giveaway! 😍🙆🏼💕
.
Besides offering 'anything under the sun’ from Taobao, @ezbuy.sg is now providing a One-Stop Home-Renovation solution to all! On top of the wide range of Taobao furniture at very affordable prices and $2.99 Prime shipping fee, ezbuy’s partners provide Interior Designer and Renovation service package as low as $6,999 for a 4RM flat! Visit ezbuy.sg for more information. ☺️
.
Here’s a giveaway from ezbuy -
- Simply tag 3 of your friends below and share this post to those who are planning for a new home
- Not an ezbuy member? Sign up now and get free $10 shopping voucher with my IG bio link (bit.ly/gillian65) to shop for free! No minimum purchase, no string attached! 😙
.
1 Grand lucky winners will receive a cozy Bean Bag worth $88 and 5 winners will win $50 ezbuy shopping vouchers. Giveaway ends on 31st Jan, T&C applies! 🤓
#ezbuy #sggiveaway
c# string to type 在 Naomi Neo Facebook 的最佳解答
$50 voucher giveaway - 12.12 ezbuy end year sale is here and everything must GO!
@ezbuy.sg is giving away up to $300 vouchers for everyone to shop on 12.12 on their site! Are you ready to save up to 70% from your Taobao shopping spree?! Oh... and they are also offering FREE AGENT FEE TOO.
Here’s a giveaway from ezbuy - Simply tag 3 of your friends below and invite them to shop on ezbuy during 1212 - Not an ezbuy member? Sign up now and get free $10 shopping voucher at bit.ly/Free10ezbuy to shop for free! No minimum purchase, no string attached.
12 lucky winners will win $50 ezbuy shopping vouchers. Giveaway ends on 15th December, T&C applies. Wish everyone a happy shopping with ezbuy on 12th & 13th December!
#ezbuy #ezbuy1212 #taobao1212 #sggiveaway
c# string to type 在 Jessica Vu Youtube 的精選貼文
I finally moved out! Welcome to my first slice of life vlog ? (a cinematic journal / diary entry video format) ? Made in partnership with Function of Beauty - get your own custom skincare + 20% off any product/bundle with a free spa headband with my link: http://cen.yt/fobskinjessicavu
Fluent in more than one language? Help me + other viewers by adding subtitles for this video in your language here! ?♀️ http://bit.ly/3b3tg4T
FOLLOW ME!
✧ ?PODCAST: https://anchor.fm/volumeup
✧ IG: https://instagram.com/jessyluxe
✧ TIKTOK: https://tiktok.com/@jessyluxe
✧ TWITTER: https://twitter.com/luxejessy
✧ SOUNDCLOUD: https://soundcloud.com/jessyluxe
✧ SPOTIFY: https://open.spotify.com/user/x39pm9yrqj1nklvv9ptgvsd3d?si=k8uDK8-URZ2Ihw_y80eNtA
﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍
Hi all! How do you like this video style? It felt kind of weird editing things out of chronological order, but I really liked this more laid back type of video without much talking directly to the camera. Please let me know what you think!
Now that I've finally settled into my new apartment, I feel a lot more energized. It's crazy how a simple change in environment can make such a huge difference. Thank you to everyone who has been checking up on me and my apartment situation (*꒦ິ꒳꒦ີ) I appreciate you all very much and can't wait to make new videos for you in my new home ♡
♡ xo
﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍
I N T H I S V I D E O
‹ use yesstyle codes "JESSICA10" + "JESSICAVU" for $ off ›
SKINCARE ⁺
˖ Function of Beauty Moisturizer http://cen.yt/fobskinjessicavu
WEARING ⁺
˖ Yosemite Bear Embroidered Long Sleeve Sweatshirt https://bit.ly/2NGJ5pi
˖ Hana Lee x Ana Luisa Jewelry Gold Dagger Earrings https://bit.ly/3uGVTwo
˖ JINS x Pokemon Pikachu Glasses http://bit.ly/3uGbtIG
˖ Hair Roller https://bit.ly/3pu9AeM
ETC ⁺
˖ Brita Plastic Water Filter Bottle 26 oz. ("Sea Glass") https://amzn.to/2ZZXCyK
˖ The 100-Day Happiness Planner ("Blue & White") http://bit.ly/2O51g7L
˖ The Humans: A Novel by Matt Haig https://amzn.to/3sON3er
˖ White String Fairy Lights https://bit.ly/3dWmHCM
︾
T E C H
˖ CAMERA
Sony ZV-1 Digital Camera
https://amzn.to/3sG8caz
˖ EDITING PROGRAM
Final Cut Pro X 10.5
︾
M U S I C
˖ 방탄소년단 (BTS) - Life Goes On Piano Cover by Pair Piano https://youtu.be/adpQxotIrIQ
https://youtu.be/dBYT0qRt67w
˖ Joe Hisaishi - Spring Piano Cover by Pair Piano https://youtu.be/dBYT0qRt67w
﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍
? BUSINESS EMAIL: jessica@rare.global
FTC: Sponsored by Function of Beauty ? Some links listed are affiliate links and some products used I received in PR („• ֊ •„)