esp8266

MQTT / ESP8266 / NodeMCU / Lua code not publishing

∥☆過路亽.° 提交于 2019-12-11 11:55:27
问题 I have a problem with the following Lua code on an ESP8266... function sendData(humidity,temperature) -- Setup MQTT client and events print("sendData() entered") print("Setting up mqtt.Client...") m = mqtt.Client(mqtt_client_id, 120, username, password) print("Attempting client connect...") m:connect(mqtt_broker_ip , mqtt_broker_port, 0, function(conn) print("Connected to MQTT") print(" IP: " .. mqtt_broker_ip) print(" Port: " .. mqtt_broker_port) print(" Client ID: " .. mqtt_client_id) print

Arduino Uno + ESP8266 reading server's response

大憨熊 提交于 2019-12-11 09:48:40
问题 I'm sending a GET request from Arduino Uno using ESP8266. The request is sent, but I'm unable to print the received response. I'm using code from https://elementztechblog.wordpress.com/2015/05/13/esp8266-based-temperature-data-logger-using-arduino/ I have changed the code for connecting to my server and I can see the GET request is received on my server's log. I tried putting while (ser.available()) { Serial.write(ser.read()); } after the Serial.println("AT+CIPCLOSE"); statement. BUT I'm not

Arduino ESP8266 AT GET Request

醉酒当歌 提交于 2019-12-11 06:25:23
问题 I'm having trouble to send data to my database with the ESP8266-01. I'm getting the correct data from the sensor in the Console but nothing in my Database. The PHP Script is correct, I know that, just to be sure, I'm gonna add it in here too. My Code: // http://playground.arduino.cc/Main/Average #include <Average.h> #include <SoftwareSerial.h> char serialbuffer[100];//serial buffer for request url SoftwareSerial mySerial(10, 11); const char* ssid = "Master"; const char* password = "#Bennet99*

LUA Programming ,ESP8266 NODEMCU Serial communication

南笙酒味 提交于 2019-12-11 05:58:17
问题 I am trying to send data over the serial port of the ESP8266 12E NODE MCU dev kit to an arduino serial port. I've having a hard time trying to find an example of the syntax used and I tried using serial.print() via the arduino to send data and it works but I'm unsure how to accomplish this in Lua. Any help is appreciated I can get the SSID and Password form arduino INIT.lua SSID = "XXXX" Password = "XXXX" wifi.setmode(wifi.STATION) wifi.sta.config(SSID,Password) -- Replace with your AP Name

Send data sensor from arduino to esp8266 who send it to the cloud using SSL

别等时光非礼了梦想. 提交于 2019-12-11 05:37:43
问题 I have an arduino Uno which collect data from sensor, i want to send this data to the cloud using wifi esp8266 who support SSL using the library WifiClientSecure, is there an alternative to send data from arduino to the esp card and esp8266 read this data and send it after that to the cloud, i'm able to work with mqtt but i want to know if there is a way to have a directly connection between the arduino uno and esp8266 without having a third part, any help will be gratefull. 回答1: According to

nodemcu custom firmware build problems

坚强是说给别人听的谎言 提交于 2019-12-11 04:06:09
问题 hello everybody:) I built a firmware with cloud build service. The firmware is master and includes "adc, file, gpio, http, mqtt, net, node, ow, spi, tmr, uart, wifi" and also supports SSL. Using ESP 07 and the previous version of firmware was nodeMCU 0.9.6 and that was correctly worked but didn't support some modules that i need. To flash the firmware, i use NodeMCU flasher with these setting: flasher setting I upload the binary firmware file to address 0x00000 and esp_init_data_default.bin

Communication between 2 ESP8266 WiFi modules without router using AT commands

我的未来我决定 提交于 2019-12-11 01:07:08
问题 I'm trying to make a TCP based communication to send a simple message "Hello" from one ESP8266 module to another using this document. I'm using 2 USB to TTL as hardware and Realterm as serial terminal. I could do it when ESP8266 modules are connected to a router, sending AT commands as below, Set the Server: AT+CWJAP="AccessPointName","Password"//Join to your WiFi network AT+CIPMUX=1//0 for single connection 1 for multiple connection. AT+CIPSERVER=1,1336//Set as Server. 1 to open Server mode

how to get AT response from ESP8266 connected to arduino

痴心易碎 提交于 2019-12-10 12:23:37
问题 I am fighting with ESP8266 wifi module and connecting arduino. After updating firmware to newest version i started to programm arduino to get data incoming from wifi. I saw many examples about maiking webserver via ESP8266 but none of them works for me. ESP is connected to my Arduino Leonardo: > Arduino -> ESP8266 power 3.3V -> vcc ground -> ground tx -> rx (via logic level converter 5->3.3V) rx -> tx (via logix level converter power 3.3V ->gpio0 (without any resistors) I made simple sketch:

【零知ESP8266教程】进阶篇2 http WEB服务器示例

只谈情不闲聊 提交于 2019-12-10 11:02:28
1、概述 HTTP web server作为ESP8266的一个常用功能,在这里使用零知开源平台进行该示例的演示。 2、软件和硬件 ①硬件我们本次使用零知-ESP8266; ②软件使用零知开发工具(持续更新中),自带示例: 3、方法步骤 (1)先在零知开发工具中打开AdvancedWebServer示例,或者复制下面的代码到零知开发工具中: /********************************************************** * 文件: x.ino by 零知实验室([url]www.lingzhilab.com[/url]) * -^^- 零知开源,让电子制作变得更简单! -^^- * 时间: 2019/05/28 12:22 * 说明: ************************************************************/ # include <ESP8266WiFi.h> # include <WiFiClient.h> # include <ESP8266WebServer.h> # include <ESP8266mDNS.h> # ifndef STASSID # define STASSID "ssid" //记得修改热点名称 # define STAPSK "passwd" //还有热点密码 #

【ESP8266】MicroPython的快速入门教程

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-09 23:25:36
ESP8266版本的MicroPython和pybaord版本的有不少区别,无论从使用习惯还是API上,都有许多不同。下面以ESP-MP-01开发板为例,介绍使用方法。这个方法也可以用在NodeMcu、机智云等开发板上。 准备工作 在开始玩MicroPython前,我们需要做好准备工作。 硬件上,只需要一根macroUSB数据线,大部分安卓手机的数据线都可以,很多开发板也带有macroUSB线,即使没有,淘宝上几元包邮的也可以使用。 软件上,需要准备的东西多一点。 CH340的USB驱动 终端软件 MicroPython需要使用支持串口功能的终端,而不能使用普通的串口调试工具。很多只在windows下工作的嵌入式开发者可能不太习惯使用终端软件,这可能需要一点时间去适应。论坛搜集了常用的几种终端软件,大家可以试试。 超级终端(WinXP) putty kitty xshell SecureCRT MobaXterm 大部分MicroPython的版本,物理串口都只使用了一种波特率:115200, n, 8, 1, none。当然对于象pyb这样使用的USB虚拟串口,其实串口参数随便设置成什么效果都是一样的,但是使用标准参数还是可以减少不必要的问题。 因为ESP8266本身没有USB接口,因此也无法象pyb那样使用虚拟磁盘功能,虽然内部有很大的Flash,却无法直接象磁盘那样访问