สมาชิกในกลุ่มที่ 4
นาย ภูพิพัฒน์ สียิ่ง
นาย ฉัตรชัย ศรีตะ
นาย วราวุฒิ ดิษฐกระจันทร์
นาย ณัฐวุติ เเผนไธสงค์
นาย บวรภัคร ละเหลา
นาย ชินวัตร ชูขุนทด
วัดระดับน้ำอัตโนมัติ
แนวคิดที่ได้จาก
youtube https://youtu.be/KMcg1VS-IF4
วัสดุอปกรณ์
eps8266 wifi
mico USB
Ulttasonis sensor
ขวดน้ำ 2 ขวด
ปั้มน้ำ USB
ขั้นตอนการทำงาน
วัดค่าระดับน้ำ
เเสดงค่าใน Blynk APP
รอเเสดงผล
สั่งงานให้ ...... ทำงาน
ได้ผล...
/* Fill-in information from Blynk Device Info here */
#define BLYNK_TEMPLATE_ID "TMPLtsgIoZdl"
#define BLYNK_DEVICE_NAME "teemmy55"
#define BLYNK_AUTH_TOKEN "s_CZ4B_uJsvfnziGotIYYPZcJ91XGkKJ"
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "iot";
char pass[] = "044056570";
#define trigger D1
#define echo D2
long level;
void setup()
{
// Debug console
Serial.begin(115200);
Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
// You can also specify server:
//Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass, "blynk.cloud", 80);
//Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass, IPAddress(192,168,1,100), 8080);
pinMode( trigger, OUTPUT );
pinMode( echo , INPUT );
}
void loop()
{
digitalWrite( trigger , LOW );
digitalWrite( trigger , HIGH );
digitalWrite( trigger , LOW );
long duration = pulseIn( echo, HIGH , 10000 );
level = 0.034 * duration / 2;
level = 30-level;
Blynk.virtualWrite(V1, level);
Blynk.run();
Serial.println(level);
// You can inject your own code or combine it with other sketches.
// Check other examples on how to communicate with Blynk. Remember
// to avoid delay() function!
}
ภาพปลากรอบ
แทรก > youtube
ราบรื้น