女人自慰AV免费观看内涵网,日韩国产剧情在线观看网址,神马电影网特片网,最新一级电影欧美,在线观看亚洲欧美日韩,黄色视频在线播放免费观看,ABO涨奶期羡澄,第一导航fulione,美女主播操b

電子發燒友App

硬聲App

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

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

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

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

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

資料介紹

描述

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

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

“你的思想是花園,你的思想是種子,收獲可以是花朵或雜草?!?/font>

讓我們的植物保持活力可能是一項相當大的挑戰,因為我們與植物之間缺乏清晰的溝通。讓他們開心的一種方法是把我們的植物帶在身邊,但也許我們不想帶著從冬季夾克口袋里伸出來的大仙人掌或蕨類植物四處走動。此外,大多數植物不喜歡寒冷。在花了幾個月時間嘗試與我們的吊蘭進行通信之后,我們放棄了,而是將 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蘇泊爾電磁爐線路的電路原理圖資料合集
  2. 2.02 MB   |  286次下載  |  5 積分
  3. 2長虹液晶電視R-HS310B-5HF01的電源板電路原理圖
  4. 0.46 MB   |  87次下載  |  5 積分
  5. 3AO4803A雙P通道增強型場效應晶體管的數據手冊
  6. 0.11 MB   |  28次下載  |  2 積分
  7. 4長虹液晶彩電LS29機芯的技術資料說明
  8. 3.42 MB   |  16次下載  |  2 積分
  9. 5AI智能眼鏡產業鏈分析
  10. 4.43 MB   |  14次下載  |  免費
  11. 6TP4055 500mA線性鋰離子電池充電器中文手冊
  12. 0.75 MB   |  9次下載  |  免費
  13. 7TP4054 400mA線性鋰離子電池充電器中文手冊
  14. 0.70 MB   |  2次下載  |  免費
  15. 8TP4057X 500mA線性鋰離子電池充電器中文手冊
  16. 0.74 MB   |  2次下載  |  免費

本月

  1. 1人形機器人電機驅動和傳感報告
  2. 4.27 MB   |  475次下載  |  免費
  3. 2蘇泊爾電磁爐線路的電路原理圖資料合集
  4. 2.02 MB   |  286次下載  |  5 積分
  5. 3長虹液晶電視R-HS310B-5HF01的電源板電路原理圖
  6. 0.46 MB   |  87次下載  |  5 積分
  7. 4U盤一鍵制作
  8. 23.84 MB   |  41次下載  |  免費
  9. 5AO4803A雙P通道增強型場效應晶體管的數據手冊
  10. 0.11 MB   |  28次下載  |  2 積分
  11. 6Altium Designer元件庫
  12. 17.11 MB   |  26次下載  |  免費
  13. 7長虹液晶彩電LS29機芯的技術資料說明
  14. 3.42 MB   |  16次下載  |  2 積分
  15. 8AI智能眼鏡產業鏈分析
  16. 4.43 MB   |  14次下載  |  免費

總榜

  1. 1matlab軟件下載入口
  2. 未知  |  935127次下載  |  10 積分
  3. 2開源硬件-PMP21529.1-4 開關降壓/升壓雙向直流/直流轉換器 PCB layout 設計
  4. 1.48MB  |  420064次下載  |  10 積分
  5. 3Altium DXP2002下載入口
  6. 未知  |  233089次下載  |  10 積分
  7. 4電路仿真軟件multisim 10.0免費下載
  8. 340992  |  191382次下載  |  10 積分
  9. 5十天學會AVR單片機與C語言視頻教程 下載
  10. 158M  |  183342次下載  |  10 積分
  11. 6labview8.5下載
  12. 未知  |  81586次下載  |  10 積分
  13. 7Keil工具MDK-Arm免費下載
  14. 0.02 MB  |  73815次下載  |  10 積分
  15. 8LabVIEW 8.6下載
  16. 未知  |  65988次下載  |  10 積分