Chat about current Lua tools and IDEs

User avatar
By flash_os
#51767 Compiled without error:

Code: Select all#include "ESP8266WiFi.h"
#include "UbidotsMicroESP8266.h"
#define TOKEN  "YdtbEvgKnwVssEDK2wzMqmnGjuOnxU"  // Put here your Ubidots TOKEN
#define WIFISSID "Untrusted-Network"
#define PASSWORD "12345"

Ubidots client(TOKEN);

void setup(){
    Serial.begin(9600);
    delay(10);
    client.wifiConnection(WIFISSID, PASSWORD);
}
void loop(){
    float value = analogRead(A0);
    client.add("Temperature", value);
    client.sendAll(true);
}


But while uploading to NodeMcu Lua ESP8266 CH340G ESP-12E

Code: Select allUploading 237408 bytes from C:\Users\flash_os\AppData\Local\Temp\build8017001818300400212.tmp/sketch_jul29b.cpp.bin to flash at 0x00000000
error: failed sending 1072 bytes
...
.error: failed sending 1072 bytes
warning: espcomm_send_command: didn't receive command response
warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed
warning: espcomm_send_command: wrong direction/command: 0x01 0x03, expected 0x01 0x04
error: espcomm_upload_mem failed

Code taken from:
http://ubidots.com/docs/devices/nodeMCU ... to-ubidots

Followed by instruction:
http://ubidots.com/docs/devices/nodeMCU.html#setup
User avatar
By Arindam
#64234 I have been facing this problem myself in the beginning. My full error stack went like this.

Code: Select allesptool v0.4.9 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
   setting board to ck
   setting baudrate from 115200 to 115200
   setting port from /dev/ttyUSB0 to /dev/ttyACM1
   setting address from 0x00000000 to 0x00000000
   espcomm_upload_file
   espcomm_upload_mem
opening port /dev/ttyACM1 at 115200
   tcgetattr
   tcsetattr
   serial open
opening bootloader
resetting board
trying to connect
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
trying to connect
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
trying to connect
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
resetting board
trying to connect
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
trying to connect
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
trying to connect
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
resetting board
trying to connect
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
trying to connect
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
trying to connect
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed


To resolve this I did
1. Made sure the ground of my ESP8266-V1 was connected to the ground of the Arduino (yes I do not use separate FTDI programmer, just use the Arduino)
2. Held the flash button which just pulls down the GPIO-0 pin to GND before powering up the board. This causes the board to enter programmable/flashable mode.

Thanks