นี่คือตัวอย่างของแอปพลิเคชัน LORA ที่ดี สถานีอากาศมีเซ็นเซอร์อุณหภูมิเซ็นเซอร์ความดันอากาศและเซ็นเซอร์ความชื้น ข้อมูลถูกอ่านและส่งไปยัง Cayenne MyDevices และ Weather Underground โดยใช้ LORA และเครือข่ายสิ่งต่าง ๆ
การเดินสายขึ้นอยู่กับรูปแบบของเรื่องนี้: https://www.thethingsnetwork.org/labs/story/build-the-cheapest-possible-node-yourself
ติดตามคำแนะนำของการสร้างโหนดที่ถูกที่สุดที่เป็นไปได้ด้วยตัวเองเพื่อเพิ่ม RFM95W ลงใน Arduino Pro Mini หากประสบความสำเร็จให้เพิ่มเซ็นเซอร์ตามที่แสดงในรูปแบบด้านบน
ในที่สุดบัดกรีลวด 86 มิลลิเมตรไปยังหมุดเสาอากาศ RFM95W เพื่อเพิ่มช่วง
ในการวางสถานีอากาศที่ไหนสักแห่งฉันวาดเคสและพิมพ์ด้วยเครื่องพิมพ์ 3D
แบบจำลองสามารถพบได้ใน Thingiverse แน่นอนว่าคุณสามารถสร้างตัวแปรของคุณเองได้แน่นอน
https://www.thingiverse.com/thing:2594618
รหัสที่ฉันใช้สามารถพบได้ใน gitHub: https://github.com/henri98/lorawanweatherstation
ฉันใช้อะตอมกับ Platformio เพื่อตระหนักถึงโครงการนี้ดังนั้นนี่คือโครงการ Platformio
ฉันใช้ libarys folowing:
ในการส่งข้อมูลไปยังสภาพอากาศใต้ดินให้สร้างการรวม HTTP ในคอนโซลของเครือข่ายสิ่งต่าง ๆ ข้อมูลจะถูกส่งไปยัง URL พร้อมโพสต์หรือรับ สคริปต์ต่อไปนี้จับข้อมูลและส่งไปยังสภาพอากาศใต้ดิน ลงทะเบียนสถานีอากาศส่วนบุคคลของคุณเองที่ https://www.wunderground.com/personal-weather-station/signup
<? php
Echo Time ();
file_put_contents('json/post'.time().'.json', file_get_contents('php://input'));
$json = file_get_contents('php://input');
$data = json_decode($json);
// take the data out of the json
$temperature_1 = $data->payload_fields->temperature_1;
$barometric_pressure_2 = $data->payload_fields->barometric_pressure_2;
$relative_humidity_3 = $data->payload_fields->relative_humidity_3;
// tempc to tempf
$tempf = ($temperature_1 * 9/5) + 32;
// pressure
$pressure = $barometric_pressure_2/33.863886666667;<br>
if( isset($pressure) && !empty($pressure) && isset($tempf) && !empty($tempf) && isset($relative_humidity_3) && !empty($relative_humidity_3)){ <br> file_get_contents("<a href="https://rtupdate.wunderground.com/weatherstation/updateweatherstation.php?ID=XXXXXXX&PASSWORD=XXXXXXXX&dateutc=now&tempf=" rel="nofollow" target="_blank">https://rtupdate.wunderground.com/weatherstation/updateweatherstation.php?ID=XXXXXXX&PASSWORD=XXXXXXXX&dateutc=now&tempf=</a>" . $tempf . "&humidity=" . $relative_humidity_3 . "&baromin=" . $pressure);
}