esp8266

How to set interrupt priorities in Arduino?

删除回忆录丶 提交于 2021-02-20 04:50:08
问题 I am working on ESP8266. And I program it directly through FTDI using Arduino IDE. I am having problems with stack when both GPIO and UART interrupt occurs at same time or GPIO event occurs when UART sends or receives something. Is it possible to set interrupt priorities on Arduino?. 回答1: Interrumpts in Arduino have a predefined order of priority that can't be change. Here is is: 1 Reset 2 External Interrupt Request 0 (pin D2) (INT0_vect) 3 External Interrupt Request 1 (pin D3) (INT1_vect) 4

ESP8266 crashes after simple http request

狂风中的少年 提交于 2021-02-08 11:35:53
问题 I am working with the NodeMCU V3 module. Whenever I try to make an http request to my server, the module crashes. Here's the code: void setup() { WiFi.begin("wifi-name", "wifi-password"); while (WiFi.status() != WL_CONNECTED) { //Wait for the WiFI to connect } } void loop() { HTTPClient http; WiFiClient client; http.begin( client, "server-address" ); int httpCode = http.GET(); String payload = http.getString(); //Get the response payload Serial.println(httpCode); //Print HTTP return code

ESP8266 crashes after simple http request

主宰稳场 提交于 2021-02-08 11:35:07
问题 I am working with the NodeMCU V3 module. Whenever I try to make an http request to my server, the module crashes. Here's the code: void setup() { WiFi.begin("wifi-name", "wifi-password"); while (WiFi.status() != WL_CONNECTED) { //Wait for the WiFI to connect } } void loop() { HTTPClient http; WiFiClient client; http.begin( client, "server-address" ); int httpCode = http.GET(); String payload = http.getString(); //Get the response payload Serial.println(httpCode); //Print HTTP return code

Inconsistent connectivity via WiFi manager in ESP8266

China☆狼群 提交于 2021-01-29 20:12:51
问题 I am facing a peculiar problem. The below code snippet connects to new WiFi network. No hard-coded ssid or password in the program . I am using AsyncWifiManager and AsyncWebServer modules. When I am connecting to my home WiFi router providing ssid and password in autoconnect portal, NodeMCU is getting connected and the server is working fine. But whenever I am changing the WiFi, connecting to my mobile phone hotspot, then server is not running, though I am getting local IP address in Serial

Exception 28 thrown on ESP8266-01 when connected to Adafruit MQTT and Telegram

孤街醉人 提交于 2021-01-29 14:17:19
问题 The title is quite self-explanatory, but I will try to explain the issue further here so as to be more precise. My code runs on an ESP8266-01 connected to a fan and is used to control it through Telegram (with its own bot) and Adafruit MQTT, from both of which it receives a command (not at the same time, it's just to have multiple ways to control the fan in case I don't have my phone by me). Anyway, this is where the problems kick in: after an indeterminate amount of time (could be 5 minutes,

Socket error on client <>, disconnecting with Paho MQTT-SN Gateway and ESP8266 CLient

痞子三分冷 提交于 2021-01-29 10:00:27
问题 I'm trying to test MQTT-SN. I'm using Mosquitto Broker, Paho MQTT-SN Gateway and this library (https://github.com/S3ler/arduino-mqtt-sn-client) for the clients. I'm using an esp8266 as a client. With this client, I can connect, subscribe, receive from subscribed topics but I cant publish into topics memset(buffer, 0x0, buffer_length); mqttSnClient.publish(buffer, publishTopicName , qos); Every time I try to publish with this client, Mosquitto gives me Socket error on client <clientid>,

ESP8266 - Response from server gets cut

自古美人都是妖i 提交于 2021-01-28 11:41:52
问题 I'm using an ESP8266 connected to an Arduino one via SoftwareSerial to make a post request to a node web server. The ESP8266 sends some data to the server and it should get back other data. The data arrives at the server correctly, but the response from the server is incomplete (it gets cut each time in a different way) and I can't access the body of the response from my Arduino sketch. The server sends the response correctly, as i've checked with hurl. This is my code: #include

Websockets ESP8266

对着背影说爱祢 提交于 2021-01-28 04:52:42
问题 I'm trying to send data to a server with websocket in ESP8266, but the handshake don't work. I'm sending the following sequence of AT commands: AT+RST AT+CWMODE=1 AT+CIPMODE=0 AT+CIPMUX=1 AT+CWJAP="ssid_my_network","password" AT+CIPSTART=4,"TCP","ip_server",port AT+CIPSEND=4,data_lenght In this moment, i send the header: GET ws:ip_server HTTP/1.1\r\n Host: ip_server\r\n Upgrade: websocket\r\n Connection: Upgrade\r\n Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r\n Sec-WebSocket-Version: 13\r\n

Understanding IR codes for Samsung TV

自古美人都是妖i 提交于 2021-01-01 05:09:02
问题 Can somebody help me to understand how could I use RAW IR data in an project using ESP8266-HTTP-IR-Blaster library ? I've created a NodeMCU board with an IR sender and receiver according to https://github.com/mdhiggins/ESP8266-HTTP-IR-Blaster Everything is working fine as long as I'm using the captured codes for ex.: http://NodeMCU-IP/msg?code=E0E040BF:SAMSUNG:32 This is the Code for the Power button (E0E040BF) As I'm using it in a home automation system, it would very beneficial for me if I

Understanding IR codes for Samsung TV

你说的曾经没有我的故事 提交于 2021-01-01 05:07:06
问题 Can somebody help me to understand how could I use RAW IR data in an project using ESP8266-HTTP-IR-Blaster library ? I've created a NodeMCU board with an IR sender and receiver according to https://github.com/mdhiggins/ESP8266-HTTP-IR-Blaster Everything is working fine as long as I'm using the captured codes for ex.: http://NodeMCU-IP/msg?code=E0E040BF:SAMSUNG:32 This is the Code for the Power button (E0E040BF) As I'm using it in a home automation system, it would very beneficial for me if I