esp8266

Unable to connect NodeMCU with Firebase as console shows setting /number failed: each time

偶尔善良 提交于 2019-12-01 11:18:34
问题 Unable to connect NodeMCU with Firebase as console shows setting /number failed: each time No updation on firebase as well. or should I change the cloud server? #include <ESP8266WiFi.h> #include <FirebaseArduino.h> // Set these to run example. #define FIREBASE_HOST "example.firebaseio.com" #define FIREBASE_AUTH "token_or_secret" #define WIFI_SSID "SSID" #define WIFI_PASSWORD "PASSWORD" void setup() { Serial.begin(9600); // connect to wifi. WiFi.begin(WIFI_SSID, WIFI_PASSWORD); Serial.print(

mqtt between esp8266 and arduino with PubSubclient

社会主义新天地 提交于 2019-12-01 10:56:41
I am using ESP8266 with arduino using WiFiEsp library.I want to make MQTT connection with arduino so I use PubSubclient library.i got error: Attempting MQTT connection...failed, rc=-2 try again in 5 seconds my code is: #include <WiFiEsp.h> #include <WiFiEspClient.h> #include <WiFiEspUdp.h> #include "SoftwareSerial.h" #include <PubSubClient.h> IPAddress server(212, 72, 74, 21); char ssid[] = "atmel"; // your network SSID (name) char pass[] = "bets56789"; // your network password int status = WL_IDLE_STATUS; // the Wifi radio's status // Initialize the Ethernet client object WiFiEspClient

AT command responses (understanding order of code execution on Arduino)

被刻印的时光 ゝ 提交于 2019-12-01 09:00:27
问题 I'm sending AT commands to an ESP8266 from an Arduino Uno/Nano (ATmega328) and attempting to parse the end of the strings received in response to establish how the ESP reacted and whether it was successful (and whether it's ready to receive another command yet). I'm aware that parsing AT command responses has been discussed before here: Get AT command response But I have a specific issue not covered there that might also be of interest to other people on here... First, a function is called

ESP8622 with NodeMCU firmware starts blinking after flashing new version of firmware (old builds are working)

狂风中的少年 提交于 2019-12-01 08:44:26
Yesterday i tried to generate new firmware bin from nodemcu-build.com and after flashing with esptool.py, my esp started blinking (blue diode on esp chip) and sending out (trough USB converter) garbage data. I tried to generate build with combination of modules, tried to flash them (binary and float) and it always start blinking and sending out garbage. Than my co-worker tried his older build and everything worked perfectly, than he send me his older build and after flashing everything works also perfectly. So there is no problem with flashing tool or system (tested on both mac and linux) and

HTTPS (SSL) get request with NodeMCU

非 Y 不嫁゛ 提交于 2019-12-01 08:07:45
问题 I would like to perform GET requests to googleapi.com with my ESP8266 running NodeMCU, to get some data from the google Calendar API. The website allows only secured connection (HTTPS/SSL). First, I've been trying to connect to google.com (secured) to give it a try, but with no success either. Here is the LUA code: conn=net.createConnection(net.TCP, 1) conn:on("receive", function(sck, c) print(c) end ) conn:on("connection", function(conn) print("connected") conn:send("HEAD / HTTP/1.1\r\n"..

SSL certificate verification on ESP8266 Wemos D1 Mini with MQTT broker

一个人想着一个人 提交于 2019-12-01 07:55:43
问题 I have a raspberry pi 3 with raspbian stretch as its operating system. I have installed and fully configured a MQTT broker on the raspberry pi following this tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-the-mosquitto-mqtt-messaging-broker-on-ubuntu-16-04 Everything works fine and well on the broker's side. The certificates get renewed after 60 days and you can only connect to port 1883 via the localhost and the other ports (8883 and 8083) are open but

ESP8622 with NodeMCU firmware starts blinking after flashing new version of firmware (old builds are working)

不打扰是莪最后的温柔 提交于 2019-12-01 06:38:58
问题 Yesterday i tried to generate new firmware bin from nodemcu-build.com and after flashing with esptool.py, my esp started blinking (blue diode on esp chip) and sending out (trough USB converter) garbage data. I tried to generate build with combination of modules, tried to flash them (binary and float) and it always start blinking and sending out garbage. Than my co-worker tried his older build and everything worked perfectly, than he send me his older build and after flashing everything works

ESP8266MOD、刷可以使用AT指令的固件、作为客户端向贝壳云端发送固定数据

谁都会走 提交于 2019-11-30 19:49:33
硬件部分 1. ESP8266MOD 2. Micro USB数据线一根 实物图:(小灯不必) 硬件准备好之后,直接用数据线连接到电脑即可,然后找到所对应的COM口,记下来备用! 为ESP8266刷AT的固件 参考安信可相关网址: http://wiki.ai-thinker.com/esp_download 1、下载烧录工具: 解压后,选择其中的exe文件直接打开就好。 2、下载固件 相关固件在这里, http://wiki.ai-thinker.com/esp8266/sdk ,其实也就是对应的 .bin 文件,我自己用的是下边所示固件: 如下图所示: 我们要刷进去安信可32位的固件,记住对应文件夹及路径! 3、开刷 接下来开始刷固件,参考网址: http://wiki.ai-thinker.com/esp_download ,下边简要说一下大概过程。 首先打开软件,然后点击第一个ESP8266, 填写配置信息 然后弹出如下界面: 修改对应位置如下图所示,由于我已经刷过固件,所以两个图片一样: 修改完成后,直接点击下方的 START 开始,等待结束即可! 4、测试 结束之后,需要给ESP8266重新断电,上电,然后打开 串口助手 , 修改对应信息如下: 发送AT指令,会显示OK 发送之后,可以看到模块返回如下结果,如果没有出现对应结果,尝试按下复位键: 到这里

Quick Start NodeMCU / ESP8266 12E

落花浮王杯 提交于 2019-11-30 19:31:35
先说明一下:本来想买常见的ESP 8266作为Arduinoi的WIFI模块,结果错买成ESP 8266 12E,发现网上的资料比较少。 ESP8266是WIFI芯片,它只是一块芯片必须要搭配相应的电路,而ESP12E是使用ESP8266做的WiFi模块,它有外置的flash以及PCB板载天线。12e出场自带了最新的安信可AT固件 NodeMcu是基于ESP8266-12E的一款硬件,编程语言使用lua脚本 一、连接到电脑 使用Micro USB线将MCU与电脑连接 二、配置附加开发板 1、打开Arduino,选择“首选项”,在“附加开发板管理器网址”中填入http://arduino.esp8266.com/stable/package_esp8266com_index.json,然后点击确定保存这个地址。 2、打开工具->开发板->开发板管理器 搜索8266,点击安装(源码在github上,可能比较慢) 3、选择NodeMCU 1.0作为开发板 三、运行示例程序 示例1 点击示例->ESP8266->Blink 使用D7引脚, void setup() { pinMode(D7, OUTPUT); // Initialize the LED_BUILTIN pin as an output } // the loop function runs over and over

How to send multiple data (conn:send()) with the new SDK (NodeMCU)

只谈情不闲聊 提交于 2019-11-30 16:06:18
I've been reading the NodeMCU documentation and several closed issues about the change of SDK that previouly allowed to send multiple data streams (acting like a queued net.socket:send). It seems a huge debate grew here ( #730 ) and there ( #993 ) or even here ( #999 ). However, I did not find any convincing example of a webserver code that would allow me to read multiple html files (e.g. head.html and body.html ) to display a page. Here's the example from TerryE that I tried to adapt, but with no success: srv=net.createServer(net.TCP) srv:listen(80,function(conn) conn:on ("receive", function