これは、素敵なLoraアプリケーションの例です。気象観測所には、温度センサー、空気圧センサー、湿度センサーが含まれています。データは読み上げられ、LoraとThings Networkを使用してCayenne MydevicesとWeather Undergroundに送信されます。
配線は、このストーリーのスキームに基づいています:https://www.thethingsnetwork.org/labs/story/build-theapest-possible-your
可能な限り安価なノードを構築するためのインストルチョウチョンに従って、RFM95WをArduino Pro Miniに追加します。成功した場合は、上記のスキームに示すようにセンサーを追加します。
最後に、86ミリワイヤをRFM95Wアンテナピンにはんだ付けして、範囲を増加させます。
ウェザーステーションをどこかに配置するために、ケースを描き、3Dプリンターで印刷しました。
モデルはThingiverseで見つけることができます。もちろん、もちろん独自のバリアントを作成できます。
https://www.thingiverse.com/thing:2594618
私が使用したコードは、github:https://github.com/henri98/lorawanweatherstationで見つけることができます
私はこのプロジェクトを実現するためにプラットフォームを使用してAtomを使用したため、これはPlatformioプロジェクトです。
私はlibaryを使用しました:
地下Weatherにデータを送信するには、Things NetworkのコンソールにHTTP統合を作成します。 データは、投稿またはGETで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);
}