資料介紹
描述
介紹
農業和糧食生產是社會的一個主要方面,日常生活直接受到它的影響。我們正在尋求創建一個小型模型監測和抽水系統,以幫助維持家庭種植的植物的水位。未來的補充可以是大氣水和溫度監測。該項目旨在通過仔細平衡植物內的水位以確保不會因澆水過多或澆水不足而造成作物損失,至少是在小范圍內解決作物損失問題。
流程/步驟
第 1 步:創建電路
按照鏈接的 Fritzing 圖或面包板圖像將電路放在一起。
?

第 2 步:云交互
在 IoT Cloud 上創建東西以設置用于云連接的儀表板

首先在 Arduino IoT Cloud 上創建“事物”。然后創建你的三個變量;給出了信息。查看儀表板圖像以查看變量是“只讀”還是“讀/寫”。最后創建儀表板并將變量鏈接到適當的小部件。
第 3 步:代碼 [.ino]
將以下代碼復制到 Arduino IDE 中...
/*
Sketch generated by the Arduino IoT Cloud Thing "AutoGarden"
https://create.arduino.cc/cloud/things/36881e31-0b15-4ae9-ad3d-c0bee1f0ea06
Arduino IoT Cloud Variables description
The following variables are automatically generated and updated when changes are made to the Thing
int moisture;
bool RunPump;
Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
which are called when their values are changed from the Dashboard.
These functions are generated with the Thing and added at the end of this sketch.
*/
#include "thingProperties.h"
#define PumpRunner 0 // set the pin for the pump
int val = 0; // returned value from soil moisture sensor
int soilPin = A0; // pin for reading from the soil moisture sensor
int soilPower = 7; // pin for powering the the soil moisture sensor.
int setMLevel;
void setup() {
// Initialize serial and wait for port to open:
Serial.begin(9600);
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found
delay(1500);
// Defined in thingProperties.h
initProperties();
// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
/*
The following function allows you to obtain more information
related to the state of network and IoT Cloud connection and errors
the higher number the more granular information you’ll get.
The default is 0 (only errors).
Maximum is 4
*/
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
pinMode(PumpRunner, OUTPUT);
pinMode(soilPower, OUTPUT);
digitalWrite(soilPower, LOW);
}
void loop() {
ArduinoCloud.update();
// Your code here
moisture = readSoil();
moisture = map(moisture, 0, 700, 0, 100);
Serial.println(moisture);
digitalWrite(PumpRunner, LOW);
delay(1000);
if(moisture <= setMLevel && moisture >= 10){
RunPump = true;
}
if(RunPump){
digitalWrite(PumpRunner, HIGH);
delay(1000); // pump takes a second or two to start up
digitalWrite(PumpRunner, LOW);
delay(1000); // one second delay so water can settle
RunPump = false;
}
delay(1000);// remaining delay, go to value minus 3010
}
int readSoil(){
digitalWrite(soilPower, HIGH);
delay(10);
val = analogRead(soilPin);
digitalWrite(soilPower, LOW);
return val;
}
第 4 步:屬性代碼
// Code generated by Arduino IoT Cloud, DO NOT EDIT.
#include <ArduinoIoTCloud.h>
#include <Arduino_ConnectionHandler.h>
const char THING_ID[] = "36881e31-0b15-4ae9-ad3d-c0bee1f0ea06";
const char SSID[] = SECRET_SSID; // Network SSID (name)
const char PASS[] = SECRET_PASS; // Network password (use for WPA, or use as key for WEP)
void onSetMLevelChange();
void onRunPumpChange();
int moisture;
int setMLevel;
bool RunPump;
void initProperties(){
ArduinoCloud.setThingId(THING_ID);
ArduinoCloud.addProperty(moisture, READ, ON_CHANGE, NULL);
ArduinoCloud.addProperty(setMLevel, READWRITE, ON_CHANGE, onSetMLevelChange);
ArduinoCloud.addProperty(RunPump, READWRITE, ON_CHANGE, onRunPumpChange);
}
WiFiConnectionHandler ArduinoIoTPreferredConnection(SSID, PASS);
第 5 步:設置 Internet 連接
在 Arduino 編輯器的“秘密”選項卡中,設置您的無線網絡 ID 和密碼。測試并確保您的設備正確連接到云。
風險
運行這個項目有幾個風險。
- 短路的可能性:該項目中用水會造成危險,因此可能會以“試運行”的形式進行測試。
- 項目結果可能無法準確工作,因為傳感器讀數可能不一致或結果解釋不準確。
- 小型機房備用電源遠程監測系統
- 抽水蓄能電站基本知識
- 基于PLC的變頻調速恒壓供水系統設計與實現 113次下載
- 基于ARIMA模型的環境監測系統設計方案 11次下載
- 使用樹莓派2實現的植物澆水系統的資料合集 56次下載
- 鍋爐汽水系統Modelica建模與模型標定 0次下載
- 創建Proteus原理圖仿真模型
- 溪口抽水蓄能電站技術改造三例
- 空氣調節的水系統原理
- PLC與變頻器控制的自動恒壓供水系統
- 基于GPRS的油井水系統的遠程監測技術的研究
- 深井揚水系統監控裝置的研制
- 小型無線安全報警系統的設計與實現
- 加強小型煤礦安全監測系統的探討
- 基于變頻器的供水系統設計
- FP8數據格式在大型模型訓練中的應用 411次閱讀
- 深度學習的典型模型和訓練過程 1613次閱讀
- 如何使用RMxprt創建電機模型 5985次閱讀
- 如何從一個簡單的數學表達式創建一個Saber模型? 733次閱讀
- IBIS建模:為何以及如何創建您自己的IBIS模型 2205次閱讀
- 集成模型的原理及創建集成模型的方法 5423次閱讀
- FireflyRK3128主板Ubuntu 根文件系統創建 3390次閱讀
- 如何才能快速的創建機器人模型 4822次閱讀
- 如何制作一個簡易的活塞式抽水機模型? 2.6w次閱讀
- 自動抽水控制器電路圖大全(繼電器/噴灌控制器/抽水機自動控制器) 9.3w次閱讀
- JavaScript創建對象的方式 3828次閱讀
- 基于PLC的變頻恒壓供水系統的設計 2.9w次閱讀
- 基于物聯網技術的下水道溢流監測系統解決下水道溢流 6969次閱讀
- 變頻恒壓供水系統簡述 1.3w次閱讀
- 一種簡單的變頻恒壓供水系統的設計方案 1.1w次閱讀
下載排行
本周
- 1山景DSP芯片AP8248A2數據手冊
- 1.06 MB | 532次下載 | 免費
- 2RK3399完整板原理圖(支持平板,盒子VR)
- 3.28 MB | 339次下載 | 免費
- 3TC358743XBG評估板參考手冊
- 1.36 MB | 330次下載 | 免費
- 4DFM軟件使用教程
- 0.84 MB | 295次下載 | 免費
- 5元宇宙深度解析—未來的未來-風口還是泡沫
- 6.40 MB | 227次下載 | 免費
- 6迪文DGUS開發指南
- 31.67 MB | 194次下載 | 免費
- 7元宇宙底層硬件系列報告
- 13.42 MB | 182次下載 | 免費
- 8FP5207XR-G1中文應用手冊
- 1.09 MB | 178次下載 | 免費
本月
- 1OrCAD10.5下載OrCAD10.5中文版軟件
- 0.00 MB | 234315次下載 | 免費
- 2555集成電路應用800例(新編版)
- 0.00 MB | 33566次下載 | 免費
- 3接口電路圖大全
- 未知 | 30323次下載 | 免費
- 4開關電源設計實例指南
- 未知 | 21549次下載 | 免費
- 5電氣工程師手冊免費下載(新編第二版pdf電子書)
- 0.00 MB | 15349次下載 | 免費
- 6數字電路基礎pdf(下載)
- 未知 | 13750次下載 | 免費
- 7電子制作實例集錦 下載
- 未知 | 8113次下載 | 免費
- 8《LED驅動電路設計》 溫德爾著
- 0.00 MB | 6656次下載 | 免費
總榜
- 1matlab軟件下載入口
- 未知 | 935054次下載 | 免費
- 2protel99se軟件下載(可英文版轉中文版)
- 78.1 MB | 537798次下載 | 免費
- 3MATLAB 7.1 下載 (含軟件介紹)
- 未知 | 420027次下載 | 免費
- 4OrCAD10.5下載OrCAD10.5中文版軟件
- 0.00 MB | 234315次下載 | 免費
- 5Altium DXP2002下載入口
- 未知 | 233046次下載 | 免費
- 6電路仿真軟件multisim 10.0免費下載
- 340992 | 191187次下載 | 免費
- 7十天學會AVR單片機與C語言視頻教程 下載
- 158M | 183279次下載 | 免費
- 8proe5.0野火版下載(中文版免費下載)
- 未知 | 138040次下載 | 免費
評論