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

電子發燒友App

硬聲App

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

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

3天內不再提示
電子發燒友網>電子資料下載>電子資料>在Arduino IoT Cloud的幫助下創建植物通訊器

在Arduino IoT Cloud的幫助下創建植物通訊器

2023-01-31 | zip | 0.63 MB | 次下載 | 免費

資料介紹

描述

Arduino IoT Cloud 的幫助下創建植物通訊器!

正如英國詩人威廉華茲華斯曾經說過的:

“你的思想是花園,你的思想是種子,收獲可以是花朵或雜草。”

讓我們的植物保持活力可能是一項相當大的挑戰,因為我們與植物之間缺乏清晰的溝通。讓他們開心的一種方法是把我們的植物帶在身邊,但也許我們不想帶著從冬季夾克口袋里伸出來的大仙人掌或蕨類植物四處走動。此外,大多數植物不喜歡寒冷。在花了幾個月時間嘗試與我們的吊蘭進行通信之后,我們放棄了,而是將 IoT Bundle 組件與 Arduino IoT Cloud 一起使用來創建一個設備,該設備可以遠程調查任何植物的健康狀況。

簡而言之

在這個實驗中,我們將學習如何保護我們的植物并確保它們存活下來,以及如何使用 Arduino 魔法。通過監測濕度、溫度和光照,我們可以確保我們的植物生長良好。

到該項目結束時,您的工廠將以可視化方式與您交流其需求,并通過 Arduino IoT CLoud 向您展示其目前的工作情況。

組件

注意:要實現此項目中演示的所有功能,您需要訂閱 Arduino IoT Cloud。通過刪除其中一個變量(光、溫度或濕度),可以在沒有 Arduino IoT Cloud 訂閱的情況下執行該項目。

學習目標

  • 介紹 Arduino 物聯網
  • 介紹 Arduino IoT Remote 應用程序
  • DIY 濕度傳感器
  • 創建 Arduino 物聯網云儀表板

想知道更多?

教程是讓您熟悉 Arduino RP2040 和物聯網的一系列實驗的一部分。所有實驗都可以使用 IoT Bundle 中包含的組件來構建。

設置 Arduino 物聯網云

如果您是 Arduino IoT Cloud 的新手,請查看我們的入門指南

我們將從按照以下步驟設置 Arduino IoT Cloud 開始:

  • 登錄到您的 Arduino 創建帳戶
  • 創建一個東西
  • 連接設備
  • 添加變量
  • 添加網絡憑據
設置 Arduino 物聯網云
?

變量

我們將從添加四個變量開始:

pYYBAGPXKvuAM-TlAAFTqquRI2Q290.png
?

設置硬件和草圖

DIY土壤水分

放置在土盆中的兩根導線構成一個可變電阻器,其阻值隨土壤濕度而變化。這個可變電阻器以分壓器配置連接,Arduino 收集與兩條線之間的電阻成比例的電壓。這意味著土壤越潮濕,Arduino 測量到的電壓就越低,因為土壤中的電阻會隨著水分的增加而降低。土壤越干燥,電阻越高。使用 1 兆歐電阻器和兩根電線,我們可以創建我們的 DIY 土壤濕度傳感器。

pYYBAGPXKyGAXNhTAAe96khjXK8064.png
?

該值將用于設置閾值,以便 Arduino 知道您的植物何時需要水。將下面顯示的代碼添加到您的草圖中并測試植物的水分含量。這些值顯示在串行監視器中。

#include "thingProperties.h"
int moisturePin = A2;
/* Set this threeshold accordingly to the resistance you used */
/* The easiest way to calibrate this value is to test the sensor in both dry and wet earth */
int threshold = 800;
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();
}
void loop() {
  ArduinoCloud.update();
  moisture = get_average_moisture();
  Serial.print("moisture ");
  Serial.println(moisture);
  /* assign the message variable based on water levels */
  if (moisture > threshold) {
  message = "Warning your plant needs water!"; /* Insert here your emergency message */
  } else {
  message = "Your plant has enough water!";
  }
  Serial.println(message);
}
int get_average_moisture() {
  int tempValue = 0; /* variable to temporarily store moisture value */
  /* make an average of 10 values to be more accurate */
  for (int a = 0; a < 10; a++) {
  tempValue += analogRead(moisturePin);
  delay(100);
 }
  return tempValue / 10;
}
/*
Since Message is READ_WRITE variable, onMessageChange() is
executed every time a new value is received from IoT Cloud.
*/
void onMessageChange()  {
  /* Add your code here to act upon Message change */
}

光和溫度傳感器

請參見下面的示意圖以連接兩個傳感器我們將使用這兩個函數從傳感器讀取值:

poYBAGPXKzWACc7QAAjA3JPqvPM938.png
?
#include "thingProperties.h"
int lightPin = A0; /*the analog pin the light sensor is connected to */
int tempPin = A1; /*the analog pin the TMP36's Vout (sense) pin is connected to */
int moisturePin = A2;
/* Set this threshold accordingly to the resistance you used */
/* The easiest way to calibrate this value is to test the sensor in both dry and wet earth */
int threshold = 800;
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();
}
void loop() {
  ArduinoCloud.update();
  light = analogRead(lightPin); /* assign light variable to light sensor values */
  Serial.print("light ");
  Serial.println(light);
  temperature = get_temperature(); /* assign temperature variable to temperature in Celsius */
  Serial.print("temperature ");
  Serial.println(temperature);
  
  moisture = get_average_moisture();
  /* assign the message variable based on water levels */
  if (moisture > threshold) {
    message = "Warning your plant needs water!"; /* Insert here your emergency message */
  } else {
    message = "Your plant has enough water!";
  }
}
int get_average_moisture() {
  int tempValue = 0; /* variable to temporarly store moisture value */
  /* make an average of 10 values to be more accurate */
  for (int a = 0; a < 10; a++) {
    tempValue += analogRead(moisturePin);
    delay(100);
  }
  return tempValue / 10;
}
float get_temperature() {
  int reading = analogRead(tempPin);
  float voltage = reading * 3.3;
  voltage /= 1024.0;
  /* temperature in Celsius */
  float temperatureC = (voltage - 0.5) * 100 ; /*converting from 10 mv per degree wit 500 mV offset */
  /* Convert to Fahrenheit */
  float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0;
  return temperatureC;
}
void onMessageChange()  {
  /* Add your code here to act upon Message change */
}

請注意,您可以通過在“get_temperature()”函數末尾返回 temperatureF 而不是 temperatureC 來使用華氏度單位。

儀表板

部署項目的最后一步是使用 Arduino IoT 儀表板添加控制面板。我們可以導航到Dashboards -> Build Dashboard -> ADD,然后我們可以添加四個小部件并將它們鏈接到變量,如下所示:

  • 圖形小部件 -> 溫度變量
  • 圖形小部件 -> 濕度變量
  • 儀表小部件 -> 光變量
  • Messenger 小部件 -> 消息變量
?

現在,我們可以看到傳感器數據的可視化表示。

?

祝賀您現在已經構建了自己的 DIY 植物通訊器,展示了您的植物如何使用 IoT Bundle 和 IoT Cloud 進行操作。

想知道更多?

本教程是讓您熟悉 Arduino IoT Bundle 的一系列實驗的一部分。所有實驗都可以使用 IoT Bundle 中包含的組件來構建。


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

評論

查看更多

下載排行

本周

  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次下載  |  免費
主站蜘蛛池模板: 天天精品视频在线观看资源 | 欧美三级网站 | 日韩三级免费看 | 一区二区三区中文 | 女人色视频 | 免费性视频 | 爱爱免费视频网站 | 天堂中文资源网 | 激情五月在线 | 亚洲综合色丁香婷婷六月图片 | 夜夜春夜夜爽 | 亚洲天堂免费 | 美女视频黄.免费网址 | 婷婷五月五 | 日韩有码电影 | 伊人网色| 波多野结衣在线观看一区二区三区 | 成人精品综合免费视频 | 性欧美17一18sex性高清 | 五月综合色 | 免费你懂的 | 射久久| 亚洲第一看片 | sss在线play| 女主播扒开内衣让粉丝看个够 | 9966国产精品视频 | 夜夜爱网站 | 国产精品资源在线观看 | 干成人网| 三级在线观看视频 | 免费观看黄色网址 | 色多多福利网站老司机 | 国内夫妇交换性经过实录 | 额去鲁97在线观看视频 | 一级特黄特黄的大片免费 | 欧美成人伊人久久综合网 | 亚洲综合色一区 | 欧美色天使| 激情五月激情综合网 | yy8090韩国日本三理论免费 | 精品国产免费观看久久久 |