ESP8266 - Workshop - Wed December 3 - 6:30pm "Uploading and Firmware Workshop"

Everybody is invited along to ESP-8266 Workshop #2 at 6:30pm.

The focus of this workshop will be (Introduction to ) Toolchains + Uploading Firmware to the modules.

Anybody that missed the last workshop can come along too - and we’ll help them to catch up on trying out some of the interesting AT commands that the module supports.

btw, one of the firmware images available is LUA. We will try to replicate what’s shown in this blog : http://scargill.wordpress.com/2014/11/20/the-worlds-cheapest-computer-esp8266lua-2/ as well as any other image suggestions - let’s try as many as we can and compare.

I have entered this in the calendar and will open up at 6.30pm.

Great.

Let’s try the next lot of interesting things.

I did the programming adaptor-pcb and have sent it for fabrication. I’m happy to give some out free when they are back from fabrication. They’ll have a power-LED.

1 Like

Today we flashed the LUA firmware and played with it a little.

From
https://github.com/nodemcu
Downloaded the firmware
https://github.com/nodemcu/nodemcu-firmware/blob/master/0.9.2/512k-flash/nodemcu_512k.bin
and saved it as

        nodemcu_512k-20141203.bin

Installed this LUA firmware:

> cd "C:\Users\eyal\Documents\Downloads\arduino\esp8266\firmware"
> Python esptool.py -p COM6 write_flash 0x00000 nodemcu_512k-20141203.bin
Connecting...
Erasing flash...
Writing at 0x0007ec00... (100 %)

Leaving...

Note: this firmware runs at 9600 baud.

Then in a terminal (putty) played with LUA, doing the LED blink thing (note: our GPIO0 is pin index 8!)
and the simple http server.

The examples we followed are from here
https://github.com/nodemcu/nodemcu-firmware

We will schedule a further workshop in a few weeks.

1 Like

Hey thanks Eyal,

Your software skills made the workshop really awesome !

We seem (as a group) to have really progressed in our understanding of how these models work and what they can do.

As recap of what was discussed, the next workshop will aim to cover:

  • More firmware uploading - that was fun.
  • The basics of LUA on the ESP8266
  • Basic control of GPIO in LUA

As we had some new faces last night, we had a quick catch-up session for noobs. We can do that again.

Everybody is welcome to come along to see these mighty modules in action.

Thanks to both @clixx_io and @eyal, this workshop series has worked very well (although, as we didn’t really have a plan, we couldn’t fail).

The next workshop will happen when @clixx_io next comes to town and has some new modules to share. As he says above, we’ll go over what has been learned so far in terms of getting to the point of being able to talk to the device via the different firmware images available.

This area is moving very fast, so updated or completely new firmware is likely to be available by the time we next meet (the LUA-based image we used on Wednesday was still warm from the oven!).

The other thing that seems to be moving at high speed is the number and variety of different ESP8266 modules available from ebay and aliexpress. There are (at least) 12 different versions so far, each with a different form factor, varying numbers of IO pins,with or without a built-in aerial and with or without metal shielding. If you are inclined to buy any of these, be careful to choose one suitable for your intended usage. We know that @clixx_io’s version works for uploading new firmware and doing basic “AT” commands as well as taking the LUA image, acting as a mini web server and manipulating digital IO.

After what I learned at the workshop, I tried a few more things at home.

Connected the LED board to the module:

As we saw at the workshop the initial state of that GPIO pin is high for some reason to start with. We need to initialise that GPIO pin and turn the LED off.

I then started with some LUA scripts:

This one causes the LED to flash every second controlled by the timer.

I then created a tcp/ip socket server that would turn the LED on if I sent data to port 9000 on the device:

Obviously I’ve taken one of the standard LUA examples and semi-modified it but it definitely did work.

I could then send data to the device from the command line to turn the LED on:

The result of sending that data will cause the GPIO pin to turn on.

1 Like

First - Happy New Year everyone.

I thought I should mention two things.

First, there is this NodeMCU (the LUA thing) board that integrates an esp8266-12 and a USB/Serial:
http://hackaday.com/2015/01/01/a-dev-board-for-the-esp-lua-interpreter/
http://nodemcu.com/index_en.html
It goes for $20 on AX:
http://www.aliexpress.com/item/-/32260333698.html

However, cheaper and more basic is this breakout board that allows using more GPIOs with a standard breadboard if the esp-01 is too limited (use with -07, -08, -12):
http://www.aliexpress.com/item/-/1817635851.html
US$2.47 for 5… I ordered a set.

cheers

1 Like

Thanks for the links, @eyal . I have both the dev board and the converter boards on order (and about 20 various esp-7/esp-12 16 pin modules already). Hopefully this will spare the world more of my “dead bug” soldering attempts. :smile:

I have also read that there is a web-based IDE for the lua firmware but haven’t found it online yet.

Well we can do another workshop.

Over the Christmas break I got a bit busy. I discovered that there’s almost a showstopper on these modules.

If you plug a peripheral that drives GPIO-0/2 to GND the module will not boot. In a production environment, boot the computer then assemble the computer - not the generally accepted way.

I spoke with friends and found the workaround for that to make it so that it will boot in typical production environments.

Now I know how to upload LUA programs to it, and drive it remotely without even using a USB Adaptor.

Howabout Wednesday 14th January 6:30pm?

I’m available. Let’s see if @clixx_io is coming down.

I’m coming. I was just seeing if @eyal was availaible or needed a different date.

1 Like

No can do, I am at LCA2015. How about Wed 21st?

Wednesday 21st is good.