Archive

For the NodeMCU category

Maximum Frequency an ESP8266 can yield

No Comments

An ESP8266 running NodeMCU can yield maximum frequency of 1.44 kHz with a duty cycle of 61%.  The wave form is given below.  The code used to perform this test is:

pin = 8
gpio.mode(pin, gpio.OUTPUT);
while true do
 tmr.wdclr()
 gpio.write(pin, gpio.LOW)
 gpio.write(pin, gpio.HIGH)
end

Without clearing the watch dog (tmr.wdclr), the device can yield a frequency of 1.84 kHz.  Without clearing the watch dog, the device reboots after a few seconds.

ESP8266 Wave Form

Click on the picture to enlarge it.

Interrupt NodeMCU init.lua

No Comments

It can be sometimes challenging to regain control of the NodeMCU running on a ESP8266 when init.lua has a tight loop in it.  To do so,  first, download esptool.py from GitHub.

Execute the following command

python esptool.py --port /dev/ttyUSB0 --baud <baud-rate> erase_flash

where

<baud-rate> is the baud rate of the connection between the ESP8266 and your PC.  Typically, 9600.

<serial-port> is the serial port the ESP8266 is connected to.  Typically,  /dev/ttyUSBn on Linux.

After having done this, you will need to re-install NodeMCU.  It can be done using the following command:

python esptool.py --port /dev/ttyUSB0 --baud <baud-rate> 
     write_flash 0x00000 <nodemcu-path>

where

<baud-rate> is the baud rate of the connection between the ESP8266 and your PC.  Typically, 9600.

<serial-port> is the serial port the ESP8266 is connected to.  Typically,  /dev/ttyUSBn on Linux.

<nodemcu-path> is the filename an path of the NodeMCU image.  Example: ../nodemcu_float_0.9.6-dev_20150704.bin

ESP8266 Resources Page

No Comments

I have written a page that contains many useful links about the ESP8266 platform.  You can display this page either using the top menu option “ESP8266 Resources” or by cliking on this link.

ESP8266 – Remarkable free book

No Comments

NodeMCU LUA base ESP8266 Development Kit

A remarkable book about the ESP8266 is freely available.  It can be downloaded from Kolban’s book on the ESP8266.  It contains more than 300 pages of information.  This book is a very good overview of the technology and a great starting point if you want to develop around this device.

Table of Contents

  • Introduction
  • Overview
  • Connecting to the ESP8266
  • WiFi Theory
  • AT Command Programming
  • Assembling circuits
  • Programming
    • Boot mode
    • The ESP8266 SDK
    • Compiling
    • Linking
    • Debugging
    • Architecture
    • WiFi at startup
    • Working with WiFi
    • Working with TCP/IP
    • ESP-NOW
    • Working with I2C
    • Hardware SPI
    • Working with serial
    • Task handling
    • Timers and time
    • Working with memory
    • Working with flash memory
    • Pulse Width Modulation – PWM
    • Analog to digital conversion
    • Sleep modes
    • Watchdog timer
    • Security
    • Mapping from Arduino
    • Partner TCP/IP APIs
    • Programming using Eclipse
    • Programming using the Arduino IDE
    • Programming with JavaScript
    • Programming with Lua
    • Programming with Basic
    • Integration with Web Apps
    • Mobile apps
    • Sample Snippets
    • Sample applications
    • Sample Libraries
    • Reference materials
    • C++ Programming
    • Simple class definition
    • Lambda functions
    • Ignoring warnings
    • Eclipse
    • ESPFS breakdown
    • ESPHTTPD breakdown
    • Makefiles
    • Forums
    • Reference documents
    • Github
    • SDK
  • Heroes
  • Areas to Research
Blue Taste Theme created by Jabox