Kacang Bawang

Category: Microcontrollers

EEPROM for ESP8266

This article describes a small EEPROM emulation library that I wrote for ESP8266. It implements a very simple EEPROM emulation scheme that allows storing 16bit values. Each such 16bit value is found by its 16bit index.

Which allocation scheme does ESP8266 RTOS SDK use?

I wanted to know which memory allocation scheme (heap_1.c, heap_2.c, heap_3.c, heap_4.c or heap_5.c) was used in the ESP8266 RTOS SDK. This is not mentioned anywhere in the docs (I’ve looked as of 1/12/16). What to do? Let’s just take a look at what is compiled in then.

Actually, this works even with a […]

ESP8266 512k flash: compiling using RTOS SDK 1.3

Since update from version 1.2 to 1.3 of Espressif’s RTOS SDK, if you try to compile anything targeting a 512kB flash device you get this message:

In this post I will show you how to organize and compile a project to using the RTOS SDK and how to solve the above problem. This post […]

ESP8266 SDK: os_printf() prints garbage, uart_init() doesn’t work…

Espressif SDK provides a function os_printf() for printing to the debug uart. However, when used out of the box it prints garbage. What gives? Consider a default project with the following in user_main.c.

Compile, run, what do you see? That’s right – garbage. Well, it’s not really garbage, it’s actually outputting “hello world” at […]

My Smart Switch, or How I Built a Smarthome Gadget with No Electronics Experience, While Living in a Village in Indonesia

They say that laziness is the mother of progress. It certainly was in my case. I am currently residing in Indonesia, where the outside lighting of one’s house is somewhat of a security practice, and it so happened that it became my job to ensure that these lights went on every evening, and equally importantly, […]

Latest AT Firmware for ESP8266 with 512k Flash

The AT firmware is the default firmware for ESP8266 and provides AT style commands for actions such as join access point and send tcp packet. It is distributed in binary form by Espressif, but it can also be built from source (binary blobby as it may be). Typically one can find a new version of […]

Breadboarding an ESP-03

Here is my method of mounting esp8266‘s, specifically ESP-03 on a breadboard without the use of a breakout board. Details inside.


If you’re reading this, chances are you are in the same boat I was in before writing this text – I wanted to save some data to EEPROM on a PIC24F and … it doesn’t have one. (The manual claims that PIC24F has EEPROM, but that is not fully so – only select models, namely […]

Pitfalls While Setting Up esp8266 ESP-03

Here are some obvious and not-so-obvious pitfalls you may encounter while trying to communicate with an ESP-03 over UART. We will be using a USB-Serial device to connect directly to the ESP.

JSON RPC lib for microcontrollers released!

I have just released my JSON RPC 2.0 implemenation under MIT License. It is built on top of JSMN JSON parser and is meant for use in microcontrollers. At least that’s where I’m using it. Note: you will need to use my branch of JSMN. The features are: simple API (only 3 functions!) low memory […]