chinese直男口爆体育生外卖, 99久久er热在这里只有精品99, 又色又爽又黄18禁美女裸身无遮挡, gogogo高清免费观看日本电视,私密按摩师高清版在线,人妻视频毛茸茸,91论坛 兴趣闲谈,欧美 亚洲 精品 8区,国产精品久久久久精品免费

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

如何設(shè)置帶有Arduino IDE的NodeMCU 1.0

454398 ? 來源:網(wǎng)絡(luò)整理 ? 作者:網(wǎng)絡(luò)整理 ? 2019-12-09 15:12 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

步驟1:您需要什么

要遵循本教程,您需要以下組件:

Micro USB電纜

NodeMCU 1.0(ESP-12E模塊)

LEDstrip

此外,您將需要:

Adafruit IO帳戶

Google日歷

Zapier帳戶

Arduino IDE 1.8.2

步驟2:Google日歷

如何設(shè)置帶有Arduino IDE的NodeMCU 1.0

因?yàn)槟嵝涯?,您?yīng)該在Google Calender中進(jìn)行活動。

轉(zhuǎn)到以下網(wǎng)站并進(jìn)行活動:

https://www.google.com/calendar

步驟3:連接帶有Zapier的Google日歷

創(chuàng)建一個Zapier帳戶(如果尚未執(zhí)行此操作)。單擊“制作一個zap”(右上角的橙色按鈕),然后將您的Google Calender與Zapier連接。為此,您需要在搜索字段中輸入Google Calender并單擊它。這樣,您可以將壓延機(jī)與Zapier連接。

步驟4:觸發(fā)器

選擇事件開始作為觸發(fā)器并選擇您的Google帳戶。接下來,在“編輯選項(xiàng)”部分中,您應(yīng)該寫出要觸發(fā)事件的距離。您將根據(jù)自己的回答在LED燈條上收到通知。最后,您需要編寫與您在Google日歷中命名活動的方式完全匹配的搜索詞。立即保存您的Zap。

第5步:將Zapier與Adafruit IO連接

觸發(fā)觸發(fā)器之后,執(zhí)行此操作。要將Adafruit IO與Zapier連接,您需要轉(zhuǎn)到以下鏈接:https://zapier.com/developer/invite/25310/e5b57f6e084ed73db02db095986ead31/不要創(chuàng)建新的Zap,請進(jìn)一步處理已經(jīng)制作的Zap ?,F(xiàn)在選擇Adafruit作為動作。

步驟6:Adafruit數(shù)據(jù)和值

添加您的Adafruit帳戶并粘貼您的AIO密鑰。設(shè)置為值“ 1”。我們需要它來觸發(fā)事件。稍后,您還將在代碼中看到該值。轉(zhuǎn)到Adafruit并進(jìn)行一個名為“測試”的提要。在Zapier中輸入此內(nèi)容。您可以測試Zap是否有效。您應(yīng)該在Adafruit Feed中看到該值。

步驟7:添加代碼以連接到Adafruit

使用MicroUSB電纜將NodeMCU連接到PC。您還應(yīng)該將LED燈帶也連接到NodeMCU的D5,G和3V中。確保以這種方式連接LED燈條。現(xiàn)在將以下代碼添加到Arduino草圖中。

// Adafruit IO Digital Output Example

// Tutorial Link: https://learn.adafruit.com/adafruit-io-basics-digital-output

//

// Adafruit invests time and resources providing this open source code.

// Please support Adafruit and open source hardware by purchasing

// products from Adafruit!

//

// Written by Todd Treece for Adafruit Industries

// Copyright (c) 2016 Adafruit Industries

// Licensed under the MIT license.

//

// All text above must be included in any redistribution.

/************************** Configuration ***********************************

/ edit the config.h tab and enter your Adafruit IO credentials

// and any additional configuration needed for WiFi, cellular,

// or ethernet clients.

#include “config.h”

#include “Adafruit_NeoPixel.h”

/************************ Example Starts Here *******************************

/ digital pin 5

#define PIXEL_PIN D5

#define PIXEL_COUNT 24

#define PIXEL_TYPE NEO_GRB + NEO_KHZ800

Adafruit_NeoPixel pixels = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE);

// set up the ‘digital’ feed

AdafruitIO_Feed *Test = io.feed(“Test”);

void setup() {

// start the serial connection

Serial.begin(115200);

// wait for serial monitor to open

while(! Serial);

// connect to io.adafruit.com

Serial.print(“Connecting to Adafruit IO”);

io.connect();

// set up a message handler for the ‘digital’ feed.

// the handleMessage function (defined below)

// will be called whenever a message is

// received from adafruit io.

Test-》onMessage(handleMessage);

// wait for a connection

while(io.status() 《 AIO_CONNECTED) {

Serial.print(“。”);

delay(500);

}

// we are connected

Serial.println();

Serial.println(io.statusText());

pinMode(D5, OUTPUT);

}

void loop() {

// io.run(); is required for all sketches.

// it should always be present at the top of your loop

// function. it keeps the client connected to

// io.adafruit.com, and processes any incoming data.

io.run();

}

步驟8:Arduino中的新標(biāo)簽

新建一個標(biāo)簽頁并將其命名“config.h中”。您實(shí)際上需要包含config.h(請參見前面的代碼)。在以下代碼中,您需要編寫您自己的Adafruit用戶名和您自己的密鑰。如果您還不知道密鑰,請轉(zhuǎn)到Adafruit IO,然后單擊“查看AIO密鑰”。將其粘貼到Arduino中。確保已安裝Arduino Neopixel庫,否則代碼將無法正常工作。

/************************ Adafruit IO Config *******************************/

// visit io.adafruit.com if you need to create an account,

// or if you need your Adafruit IO key.

#define IO_USERNAME “Your AIO username”

#define IO_KEY “Your AIO key”

/******************************* WIFI **************************************

/ the AdafruitIO_WiFi client will work with the following boards:

// - HUZZAH ESP8266 Breakout -》 https://www.adafruit.com/products/2471

// - Feather HUZZAH ESP8266 -》 https://www.adafruit.com/products/2821

// - Feather M0 WiFi -》 https://www.adafruit.com/products/3010

// - Feather WICED -》 https://www.adafruit.com/products/3056

#define WIFI_SSID “Your wifi or hotspot name”

#define WIFI_PASS “Your wifi or hotspot password”

// comment out the following two lines if you are using fona or ethernet

#include “AdafruitIO_WiFi.h”

AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

/******************************* FONA **************************************

/ the AdafruitIO_FONA client will work with the following boards:

// - Feather 32u4 FONA -》 https://www.adafruit.com/product/3027

// uncomment the following two lines for 32u4 FONA,

// and comment out the AdafruitIO_WiFi client in the WIFI section

// #include “AdafruitIO_FONA.h”

// AdafruitIO_FONA io(IO_USERNAME, IO_KEY);

/**************************** ETHERNET ************************************

/ the AdafruitIO_Ethernet client will work with the following boards:

// - Ethernet FeatherWing -》 https://www.adafruit.com/products/3201

// uncomment the following two lines for ethernet,

// and comment out the AdafruitIO_WiFi client in the WIFI section

// #include “AdafruitIO_Ethernet.h”

// AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);

步驟9:測試是否已連接到Adafruit

如果復(fù)制正確,則在串行監(jiān)視器中上傳后應(yīng)該會看到以下內(nèi)容:

Connecting to Adafruit IO.。..

Adafruit IO connected.

步驟10:更新代碼以接收數(shù)據(jù)

在初始選項(xiàng)卡中添加以下代碼,以在LED燈條上接收顏色。如果您的活動即將開始,您將獲得這些顏色。

if (data-》toPinLevel() == 1) {

for(int i=0; i

pixels.setPixelColor(i, 0, 255, 0);

pixels.show();

}

Serial.println(“Event is about to start!”);

}

digitalWrite(PIXEL_PIN, data-》toPinLevel());

}

}

步驟11:最終通知

如果執(zhí)行了以下步驟正確并且您的事件即將開始,您將在串行監(jiān)視器上收到通知。您將看到以下內(nèi)容:

Connecting to Adafruit IO.。.

Adafruit IO connected.

received 《- Event is about to start!

責(zé)任編輯:wv

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請聯(lián)系本站處理。 舉報投訴
  • Arduino
    +關(guān)注

    關(guān)注

    190

    文章

    6498

    瀏覽量

    192231
  • NODEMCU
    +關(guān)注

    關(guān)注

    13

    文章

    289

    瀏覽量

    22455
收藏 人收藏
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

    評論

    相關(guān)推薦
    熱點(diǎn)推薦

    【Milk-V Duo S 開發(fā)板免費(fèi)體驗(yàn)】Milk-V DuoS之使用Arduino開發(fā)小核

    快速上手。同時,Arduino 社區(qū)非?;钴S,您可以輕松地獲取到各種項(xiàng)目教程、文檔和支持。 Milk-V Duo 系列已經(jīng)支持 Arduino 開發(fā),您可以直接使用 Arduino IDE
    發(fā)表于 07-17 21:01

    使用AMD Vitis Unified IDE創(chuàng)建HLS組件

    這篇文章在開發(fā)者分享|AMD Vitis HLS 系列 1 - AMD Vivado IP 流程(Vitis 傳統(tǒng) IDE) 的基礎(chǔ)上撰寫,但使用的是 AMD Vitis Unified IDE,而不是之前傳統(tǒng)版本的 Vitis HLS。
    的頭像 發(fā)表于 06-20 10:06 ?1008次閱讀
    使用AMD Vitis Unified <b class='flag-5'>IDE</b>創(chuàng)建HLS組件

    《ESP32S3 Arduino開發(fā)指南》第二章 Arduino基礎(chǔ)知識

    Arduino提供了一個開放易學(xué),進(jìn)入門檻相對較低的開發(fā)平臺,讓電子愛好者對于開源硬件的廣泛使用變成了可能。 廣泛來說,Arduino指的是一個生態(tài),這里就包括Arduino開發(fā)板、Ardui
    發(fā)表于 05-13 09:28

    用于 SPI 絕對編碼器的 Arduino 示例代碼

    : [Arduino 板] [AMT22 編碼器] [AMT-06C-1-036 電纜] ,或帶有相應(yīng)連接器的類似電纜 [Arduino IDE] [下載 AMT22 單圈樣例代碼]
    的頭像 發(fā)表于 01-26 21:35 ?814次閱讀
    用于 SPI 絕對編碼器的 <b class='flag-5'>Arduino</b> 示例代碼

    如何使用Arduino實(shí)現(xiàn)CAN總線通信呢

    的硬件模塊實(shí)現(xiàn)CAN總線通信。 硬件需求 Arduino板 :任何支持Arduino IDE的板子都可以,例如Arduino Uno、Mega等。 CAN總線模塊 :例如MCP2515
    的頭像 發(fā)表于 12-23 09:06 ?1951次閱讀

    安信可本地人臉識別方案來啦,支持 Arduino 環(huán)境

    下載 ArduinoIDE,這里先附上 Win10 系統(tǒng) 64bit(Win11)下載鏈接:ArduinoIDE 2.3.3 https://downloads.arduino.cc/arduino-ide/arduino-ide
    的頭像 發(fā)表于 12-05 14:29 ?1084次閱讀
    安信可本地人臉識別方案來啦,支持 <b class='flag-5'>Arduino</b> 環(huán)境

    HAL庫在Arduino平臺上的使用

    HAL庫在Arduino平臺上的使用 Arduino平臺是一個開源的電子原型平臺,它包括硬件(基于微控制器的電路板)和軟件(Arduino IDE)。
    的頭像 發(fā)表于 12-02 14:04 ?1639次閱讀

    開源項(xiàng)目!基于 Arduino 的 MIDI 架子鼓

    MIDI 鼓的整個過程 - 從使用壓電傳感器到使用 3D 打印設(shè)計布局,再到使用 Arduino Leonardo 進(jìn)行編碼。 此設(shè)置可與 GarageBand、Ableton 等程序無縫協(xié)作。和我一起
    發(fā)表于 11-25 12:00

    基于Arduino的串口通信項(xiàng)目

    Arduino開發(fā)板的TX和RX引腳連接起來。 二、軟件準(zhǔn)備 Arduino IDE :從Arduino官方網(wǎng)站下載并安裝Arduino
    的頭像 發(fā)表于 11-22 09:24 ?2200次閱讀

    esp8266連接阿里云平臺時mqtt連接超時

    esp8266nodemcu在使用arduino.ide連接阿里云平臺的時候,wifi配置正常但連接不上mqtt,顯示報錯如下: Attempting MQTT connection...失敗, rc=-4 5秒! 這是我所寫的代碼,請問有大佬知道如何改嗎?
    發(fā)表于 10-26 21:39

    Turbo模式1.0設(shè)置步驟

    電子發(fā)燒友網(wǎng)站提供《Turbo模式1.0設(shè)置步驟.pdf》資料免費(fèi)下載
    發(fā)表于 10-15 10:11 ?0次下載
    Turbo模式<b class='flag-5'>1.0</b><b class='flag-5'>設(shè)置</b>步驟

    《DNK210使用指南 -CanMV版 V1.0》第八章 CanMV IDE初體驗(yàn)

    窗口,如下圖所示:圖8.2.1 設(shè)備連接窗口在設(shè)備連接窗口中,需要正確選擇CanMV IDE與Kendryte K210連接使用的COM端口號,然后點(diǎn)擊“OK”按鈕,便可進(jìn)行設(shè)備連接。高級設(shè)置是用來配置
    發(fā)表于 09-14 17:02

    arduino(1)--ESP8266配置

    arduino ide,文件->首選項(xiàng),在下圖紅框內(nèi)輸入: http://arduino.esp8266.com/stable/package_esp8266com_index.json 點(diǎn)擊確定
    發(fā)表于 09-06 11:00

    簡述三種esp32的開發(fā)方式是什么

    IDE開發(fā)、Espressif IoT Development Framework(ESP-IDF)開發(fā)和MicroPython開發(fā)。 一、Arduino IDE開發(fā) Arduino
    的頭像 發(fā)表于 08-20 09:11 ?8096次閱讀

    Arduino Nano 和 NodeMCU ESP8266 讀取 DHT11 環(huán)境溫濕度數(shù)據(jù)及 OLED顯示

    Arduino Nano 和 NodeMCU ESP8266 讀取 DHT11 環(huán)境溫濕度數(shù)據(jù)及 OLED顯示
    的頭像 發(fā)表于 08-13 18:04 ?2076次閱讀
    <b class='flag-5'>Arduino</b> Nano 和 <b class='flag-5'>NodeMCU</b> ESP8266 讀取 DHT11 環(huán)境溫濕度數(shù)據(jù)及 OLED顯示