The Internet of Toys:
ESP8266 and MicroPython

Nick Moore
@mnemote

ESP8266

original image: zeptobars.com

original image: zeptobars.com

original image: acapmag.com.au

Originally came to prominence as a WiFi controller for AVR and similar, but ...

AVR
(Arduino)
ESP8266ARM / Broadcom
(RPi 2)
ATMega328PTensilica Xtensa LX106Cortex A53
8 bit32 bit32 bit
1 core1 core4 core
20 MHz80-160 MHz900 MHz
2KB RAM160KB RAM1GB RAM
32KB FlashDIO/QIO FlashMicroSDHC

original image: adafruit.com

original image: adafruit.com

original image: adafruit.com

NodeMCU

image: seeedstudio.com


Other Boards

MicroPython

micropython.org

Download firmware from https://micropython.org/download#esp8266

esptool

github: themadinventor/esptool

$ git clone https://github.com/themadinventor/esptool.git

or
$ pip install esptool

or
$ apt install esptool

MicroPython REPL

$ cu -l /dev/ttyUSB0 -s 115200
MicroPython v1.8.5-10-g0e69e6b on 2016-10-17; ESP module with ESP8266
Type "help()" for more information.
>>> dir()
['uos', '__name__', 'gc', 'bdev', 'vfs']
>>> print("Hello, World!")
Hello, World!
>>>

MicroPython WebREPL

MicroPython I/O

>>> import machine
>>> import time
>>> pin2 = machine.Pin(2)
>>> pin2.init(machine.Pin.OUT)
>>> while True:
...     pin2.low()
...     time.sleep(0.5)
...     pin2.high()
...     time.sleep(0.5)

What doesn't MicroPython have?

Summary

If you're interested in Microcontrollers / IoT / Robotics:

BuzzConf 2016

Contact

Nick Moore
Mnemote Pty Ltd

Blog Stuff:

Slides:

Content and images © Mnemote Pty Ltd except where otherwise noted