Logo   Development Environment

Home
Modules
Published Source License
Screen Shots
Project Status
Updating Firmware

Reference Information
Breadboard
Development Environment
Development History
I2C Addresses
Module Setup
Network Setup
Processor Module Pinning

References
PJRC hardware
ESP8266 Information

Development Environment

Contents

Development Environment Setup
Build Environment Notes
Firmware Releases

Build Environment Notes

LOGGER was developed on a computer that is also used to develop Teensy applications and ESP8266 applications. The Arduino environent is shared. This environment setup has been tried and found to work on machines without the Teensy environment, but, that testing is not continuous. There may be issues if the Teensy environment is missing.

An excellent discussion of how to load the ESP8266 is at http://www.allaboutcircuits.com/projects/update-the-firmware-in-your-esp8266-wi-fi-module/

Espressif, the designers of the ESP8266 integrated circuit, have created a specific piece of software to update the firmware in their chips. It's the ESP Flash Download Tool.

This might be a way to decode a stack dump: https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/stack_dump.md

Reboot

To reboot the module press the SW2 button.

Loading a New Image

Press and hold the SW1 Button then press SW2 to reboot while still holding SW1. The D1 LED should be on at a dim level. Then initiate the upload in the Arduino environment.

Development Environment Setup

Download and install the Arduino development environment from https://www.arduino.cc/en/Main/Software. Version 1.8.10 was used (1.8.10 local copy as a zip file). Early development was done on Arduino (1.8.1 local copy as a zip file) and (1.8.2 local copy as a zip file).

Most development was done on a system that had the Teensyduino development environment installed. This should not be necessary development continued using Arduino 1.8.2 and 1.8.10 without the Teensyduino installation. The Teensyduino development environment from PJRC http://www.pjrc.com/teensy/td_download.html was used. Development was done with Teensy 1.34 beta for Arduino 1.8.1 (local copy). Arduino must be installed first. Teensy modifies the installation.

Adafruit has add on boards for the ESP8266 wifi module. Discussion at: https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/overview Update the Arduino installation by going to Arduino >> File >> Preferences and adding:

https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
http://arduino.esp8266.com/stable/package_esp8266com_index.json
to the Additional Boards Manager. Then going to Tools >> Board >> Boards Manager locating ESP8266 in the list and INSTALLing that board. (Select Type: Contributed to narrow the search). Version 2.5.2 was used. Early development was on version 2.3.0. Later versions are likely to work. Development will continue on later versions when they are released.

The onewire library from the Teensy world is used. Version 2.3.5 was used. Earlier development was done on 2.3.3 and 2.3.0. It is required and may have to be manually added. It comes from https://github.com/PaulStoffregen/OneWire (local copy of 2.3.0) Go to Sketch >> Include Library >> Add .ZIP Library... Then update to the latest version.

The TimeLib library is also common with the Teensy install. Version 1.5.0 was used. It is required and will have to be manually added. It comes from: https://github.com/PaulStoffregen/Time (local copy) Go to Sketch >> Include Library >> Add .ZIP Library...

The ATT M2X environment is used to uplink data to the cloud. The library used does not report a version it came from https://github.com/attm2x/m2x-arduino (local copy) and is packaged as a zip file for inclusion at M2XStreamClient.zip Go to Sketch >> Include Library >> Add .ZIP Library...

There is a bug in core_esp8266_si2c.c the patched file is in the logger release. Copy this file to the appropriate directory if the library has not yet been patched or fixed. A simple note about the bug and the the patch are in the file. Search for MJN and ???.

A path similar to: c:\Users\xxx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266\core_esp8266_si2c.c finds the file with the bug. In core releases prior to 2.6.1 there were two changes, some special debugging code is inserted in twi_writeTo() this returns special error codes in certain conditions. When twi_readFrom() is passed a 0 length the original code does not test for this condition and reads many bytes instead of reading none.

Starting with core 2.6.1 the library code changed substantially. In paths that look like c:\Users\xxx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.1\cores\esp8266\core_esp8266_si2c.c the first change is eliminated and in Twi::readFrom the same failure to test for a 0 length exists and is fixed.

Once all of the environment is installed remember to set the target platform, Generic ESP8266 was used. A flash size of 4M with 1M SPIFFS was used.

A common debugging module for the ESP8266 is the FTDI Friend from ADAfruit. Drivers for this module must be installed, they are available from: FTDI Friend Drivers. Windows 10 automatically installs the drivers. Other versions differ. Once the device is connected figure out which port is used. The Logger uses 115200 baud. Several of the line endings work, Newline seems best.
NOTE: It is possible that Arduino 1.8.10 installs these drivers.

Schematics and Layout Releases

You must be logged in to see the hardware designs.

LOGGER Firmware Releases

See for binary images released in support of the LOGGER.

See the Code History for a complete history of changes to the LOGGER code.

                                                                                                                                                       
Logger by Dragonnorth Group (Michael Newman). Send comments and corrections to:
Webmaster: mnewman@dragonnorth.com