在线观看www成人影院-在线观看www日本免费网站-在线观看www视频-在线观看操-欧美18在线-欧美1级

電子發燒友App

硬聲App

0
  • 聊天消息
  • 系統消息
  • 評論與回復
登錄后你可以
  • 下載海量資料
  • 學習在線課程
  • 觀看技術視頻
  • 寫文章/發帖/加入社區
會員中心
創作中心

完善資料讓更多小伙伴認識你,還能領取20積分哦,立即完善>

3天內不再提示
電子發燒友網>電子資料下載>電子資料>創建小型模型監測和抽水系統

創建小型模型監測和抽水系統

2023-02-10 | zip | 0.10 MB | 次下載 | 免費

資料介紹

描述

介紹

農業和糧食生產是社會的一個主要方面,日常生活直接受到它的影響。我們正在尋求創建一個小型模型監測和抽水系統,以幫助維持家庭種植的植物的水位。未來的補充可以是大氣水和溫度監測。該項目旨在通過仔細平衡植物內的水位以確保不會因澆水過多或澆水不足而造成作物損失,至少是在小范圍內解決作物損失問題。

流程/步驟

第 1 步:創建電路

按照鏈接的 Fritzing 圖或面包板圖像將電路放在一起。

?

?
?
?
pYYBAGOlJUmAW7MJAABZq1b8f9U017.png
?
1 / 2 ?設備面包板接線示意圖
?

第 2 步:云交互

IoT Cloud 上創建東西以設置用于云連接的儀表板

?
?
?
poYBAGOlJUuAZ9CwAAAzoTk4ckw371.png
?
1 / 2 ?變量列表
?

首先在 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 和密碼。測試并確保您的設備正確連接到云。

風險

運行這個項目有幾個風險。

  • 短路的可能性:該項目中用水會造成危險,因此可能會以“試運行”的形式進行測試。
  • 項目結果可能無法準確工作,因為傳感器讀數可能不一致或結果解釋不準確。

下載該資料的人也在下載 下載該資料的人還在閱讀
更多 >

評論

查看更多

下載排行

本周

  1. 1山景DSP芯片AP8248A2數據手冊
  2. 1.06 MB  |  532次下載  |  免費
  3. 2RK3399完整板原理圖(支持平板,盒子VR)
  4. 3.28 MB  |  339次下載  |  免費
  5. 3TC358743XBG評估板參考手冊
  6. 1.36 MB  |  330次下載  |  免費
  7. 4DFM軟件使用教程
  8. 0.84 MB  |  295次下載  |  免費
  9. 5元宇宙深度解析—未來的未來-風口還是泡沫
  10. 6.40 MB  |  227次下載  |  免費
  11. 6迪文DGUS開發指南
  12. 31.67 MB  |  194次下載  |  免費
  13. 7元宇宙底層硬件系列報告
  14. 13.42 MB  |  182次下載  |  免費
  15. 8FP5207XR-G1中文應用手冊
  16. 1.09 MB  |  178次下載  |  免費

本月

  1. 1OrCAD10.5下載OrCAD10.5中文版軟件
  2. 0.00 MB  |  234315次下載  |  免費
  3. 2555集成電路應用800例(新編版)
  4. 0.00 MB  |  33566次下載  |  免費
  5. 3接口電路圖大全
  6. 未知  |  30323次下載  |  免費
  7. 4開關電源設計實例指南
  8. 未知  |  21549次下載  |  免費
  9. 5電氣工程師手冊免費下載(新編第二版pdf電子書)
  10. 0.00 MB  |  15349次下載  |  免費
  11. 6數字電路基礎pdf(下載)
  12. 未知  |  13750次下載  |  免費
  13. 7電子制作實例集錦 下載
  14. 未知  |  8113次下載  |  免費
  15. 8《LED驅動電路設計》 溫德爾著
  16. 0.00 MB  |  6656次下載  |  免費

總榜

  1. 1matlab軟件下載入口
  2. 未知  |  935054次下載  |  免費
  3. 2protel99se軟件下載(可英文版轉中文版)
  4. 78.1 MB  |  537798次下載  |  免費
  5. 3MATLAB 7.1 下載 (含軟件介紹)
  6. 未知  |  420027次下載  |  免費
  7. 4OrCAD10.5下載OrCAD10.5中文版軟件
  8. 0.00 MB  |  234315次下載  |  免費
  9. 5Altium DXP2002下載入口
  10. 未知  |  233046次下載  |  免費
  11. 6電路仿真軟件multisim 10.0免費下載
  12. 340992  |  191187次下載  |  免費
  13. 7十天學會AVR單片機與C語言視頻教程 下載
  14. 158M  |  183279次下載  |  免費
  15. 8proe5.0野火版下載(中文版免費下載)
  16. 未知  |  138040次下載  |  免費
主站蜘蛛池模板: 四虎影视在线影院在线观看 | 亚洲人成网站在线观看妞妞网 | 在线看你懂 | 99精品视频在线播放2 | 男人边吃奶边做视频免费网站 | 免费三级网站 | 特级aaaaaaaaa毛片免费视频 | 四虎影院永久在线 | 国产aaaaaa| 中文字幕1区2区 | 六月天丁香婷婷 | 中文在线三级中文字幕 | 九九热在线精品 | 搞逼综合网 | 日本视频www色 | 日本免费一区二区三区视频 | 免费看片aⅴ免费大片 | 久综合| 精品久久久久久午夜 | 午夜性视频播放免费视频 | 首页 亚洲 欧美 制服 丝腿 | 天堂中文在线资源库用 | 99国产成人精品2021 | 9久久精品| 日韩精品卡4卡5卡6卡7卡 | 欧美一区二区在线观看视频 | 国产三级一区 | 91福利专区 | 五月欧美 | 丁香花在线电影小说观看 | 不良视频在线观看 | 色综合网天天综合色中文男男 | 视频在线观看高清免费大全 | 久久久久久夜精品精品免费啦 | 亚洲 欧美 自拍 另类 | 很很鲁在线视频播放影院 | 天天摸天天看天天爽 | 久草在线资源网 | 久久婷婷激情 | 亚洲成综合人影院在院播放 | 欧美极品xxxxⅹ另类 |