banner



How To Upload Amica Nodemcu

Tulisan ini saya buat, setelah berkutat dengan masalah gagalnya upload plan dari Arduino IDE ke board IoT nodeMCU Versi ane.0 Amica (pada board yang tidak terinstalasi NodeMCU x.ten Lua )  dengan pesan Error:

warning: espcomm_send_command: didn't receive command response
alert: espcomm_send_command(FLASH_DOWNLOAD_BEGIN) failed
error: espcomm_upload_mem failed

Setelah mencari referensi ke Web, akhirnya mendapat solusi.

Semoga tulisan ini dapat membantu anda jika mengalami masalah yang sama.

NodeMCU adalah suatu open source IoT platform yang memasukan firmware yag mana berjalan diatas fleck ESP8266 Wi-Fi SoC.

Gambar 1. Lath NodeMCU

Gambar 2. Tampilan belakang Board NodeMCU

Langkah-langkah:

1. Tancapkan Board NodeMCU diatas breadboard

Gambar three. NodeMCU yang ditancapkan diatas breadboard

2. Install driver CP2102 (USB to Serial Converter) sesuai dengan sistem operasi  yang dapat di download.

3. Catat nomor port hasil instalasi, misalnya COM4

Gambar four. Port setelah instalasi driver USB CP2102

3. Install Arduino IDE (Sketch) yang dapat di download

4. Install esp8266 boards director

4.a. Pada menu File, pilih Preferences

4.b. Pada Additional Lath Director URLs isikan:

http://arduino.esp8266.com/stable/package_esp8266com_index.json

Gambar 5. Isian pada Preferences

4.c. Pada carte du jour Tools, Board ..., pada sub menu pilih Boards managing director.

4.d. Scroll kebawah, dan pilih esp8266 by ESP8266, dan install

 Gambar half-dozen. Setelah boards manager diinstalasi

five. Pilih board & Port yang sesuai

v.a. Pada menu Tools, Board ...,  pada sub menu pilih NodeMCU 1.0 (ESP 12E module)

5.b. Pada bill of fare Tools, Port, pilih COM4

 Gambar 7. Setting pada Tools

vi.Buatlah rangkaian anda dimana kaki anoda pada pin D7, dan kaki cathoda pada GND

Gambar  viii. Led pada pin D7 dan GND

7. Buat koding sebagai berikut:

void setup() {
  pinMode(D7, OUTPUT);
}

void loop() {
  digitalWrite(D7, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);              // wait for a second
  digitalWrite(D7, Low);    // turn the LED off by making the voltage LOW
  filibuster(1000);              // wait for a second
}

8. Lakukan verify

9. Lakukan upload

Gambar 9. Upload berhasil

Jika anda berhasil melakukan hal tersebut diatas, maka led akan blink.


10. Jika gagal

Trouble Shooting:

Pada saat upload muncul error:

warning: espcomm_send_command: didn't receive control response
alarm: espcomm_send_command(FLASH_DOWNLOAD_BEGIN) failed
mistake: espcomm_upload_mem failed

Untuk mendapatkan verbose output yang lebih spesific, dapat disetting pada menu File, Preference, dan berikan tanda check pada Testify verbose output during (x) compilation (x) upload.

Solusi:
Hal tersebut dapat terjadi karena lath tidak berhasil masuk ke programming/flash mode, untuk memungkinkan programming/flash mode hubungkan pin D3 (GPIO 0) ke  GND

Gambar 10. Pull pivot D3 (GPIO 0) ke GND

Dan coba Upload ulang (contoh verbose hasil upload yang berhasil).

Sketch uses 230,113 bytes (22%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 32,368 bytes (39%) of dynamic retention, leaving 49,552 bytes for local variables. Maximum is 81,920 bytes.
C:\Users\hendra-new\AppData\Local\Arduino15\packages\esp8266\tools\esptool\0.4.9/esptool.exe -vv -cd nodemcu -cb 115200 -cp COM4 -ca 0x00000 -cf C:\Users\HENDRA~1\AppData\Local\Temp\arduino_build_696037/nodeMCUhelloworld.ino.bin
esptool v0.4.ix - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
setting board to nodemcu
setting baudrate from 115200 to 115200
setting port from COM1 to COM4
setting accost from 0x00000000 to 0x00000000
espcomm_upload_file
espcomm_upload_mem
setting serial port timeouts to grand ms
opening bootloader
resetting lath
trying to connect
affluent start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested one
trying to connect
flush outset
setting serial port timeouts to one ms
setting serial port timeouts to thousand ms
flush consummate
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving ii bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving ii bytes of data
espcomm_send_command: receiving two bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving two bytes of data
espcomm_send_command: receiving ii bytes of data
espcomm_send_command: receiving 2 bytes of data
Uploading 234256 bytes from C:\Users\HENDRA~1\AppData\Local\Temp\arduino_build_696037/nodeMCUhelloworld.ino.bin to flash at 0x00000000
erasing flash
size: 039310 address: 000000
first_sector_index: 0
total_sector_count: 58
head_sector_count: 16
adjusted_sector_count: 42
erase_size: 02a000
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
setting serial port timeouts to 15000 ms
setting serial port timeouts to one thousand ms
espcomm_send_command: receiving 2 bytes of data
writing wink
................................................................................ [ 34% ]
................................................................................ [ 69% ]
.....................................................................            [ 100% ]
starting app without reboot
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving two bytes of information
endmost bootloader
flush start
setting serial port timeouts to one ms
setting serial port timeouts to one thousand ms
flush complete

Akhir silakan mencoba, dan semoga berhasil.

Salam,

Hendra.

Source: http://hsoewarno.blogspot.com/2016/10/memulai-nodemcu-10.html

Posted by: piketheirey.blogspot.com

0 Response to "How To Upload Amica Nodemcu"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel