Live data from Hacker News

ESP8266: A $5 microcontroller with wi-fi that runs Python

makezine.com

21–30 of 81 posts

Re: ESP8266: A $5 microcontroller with wi-fi that runs Python

#21

I have actually done a fair bit of dev work on this chip (a custom C++ IDE), it is a neat little device, with the emphasis on little. That is both a plus and a minus. Plus, it is cheap, minus, it is little, not a lot of processing power there. (forget Python if you are doing anything serious). The way I worked around it is put all the processing in the cloud and basically the vpn passes straight through it. Interesti…

Have you even tried MicroPython on it? Granted, you need to consider performance -- where you need it, and where you don't. But is is quite easy in MicroPython to create a C-extension module for performance critical components, and have the luxury of a Python REPL loop for debugging high-level logic.

The demos look impressive, I urge everyone to back this project:

https://www.kickstarter.com/projects/214379695/micropython-o...

Re: ESP8266: A $5 microcontroller with wi-fi that runs Python

#22
I feel like the title is a misnomer given the article is called "ESP8266: This $5 Microcontroller with Wi-Fi is now Arduino-Compatible," and on that front it's really easy to get started with these [0]! ESP8266 boards abound on AliExpress, the easiest of which to get started with are NodeMCU variants. One example with seemingly good documentation is the Wemos D1 Mini [1] that comes with a USB-to-serial chip onboard. Here's another decent reference I found to getting started with them [2].

[0] GitHub repo for plugging into the Arduino IDE: https://github.com/esp8266/Arduino

[1] http://www.wemos.cc/wiki/doku.php?id=en:d1_mini

[2] http://www.averagemanvsraspberrypi.com/2015/11/esp8266-node-...

Re: ESP8266: A $5 microcontroller with wi-fi that runs Python

#23
By the way, I have to warn people who are thinking about trying this chip (as I have done in other comments):

The bare chip won't be very useful to you, unless you want to design your own PCB. Instead, I would recommend a breakout board. There are two major types:

Something like the WeMos D1 Mini (http://www.aliexpress.com/item/D1-mini-Mini-NodeMcu-4M-bytes...) or NodeMCU (http://www.ebay.com/itm/NodeMCU-LUA-WIFI-Internet-Developmen...), which are very full-featured and include onboard USB programmers and fancy things like that, but are a bit bulky. The NodeMCU I linked is solid, the WeMos is also great as it's much smaller and only includes the useful pins.

The alternative is a bare breakout board, which is the minimum that you need to make the ESP breadboard-friendly and so you don't have to solder a bunch of resistors on the chip. This is best when you want to work at a lower level, and have the minimum hardware required for the ESP to work on the board, with everything else going in your circuit.

There are breakout boards on ebay like this one (http://www.ebay.com/itm/1Set-ESP8266-WiFi-Module-Breakout-Bo...). STAY AWAY FROM THESE. They don't include all the necessary components, so the ESP won't work reliably without extra pullups, and they take up the entire breadboard space.

Because I was burnt by these, I designed my own and made it open-source:

https://github.com/skorokithakis/tiny-ESP8266-breakout

It's easier to work with, leaves room on the breadboard and includes all necessary resistors/caps and an optional voltage regulator. It's also very small. There's a dirtypcbs link on the github repo so you can just order 40 of these for $14 if you like, or you can just download the KiCad schematics (KiCad is awesome and open-source) and get it fabricated at your favorite PCB house.

Back to our regularly scheduled programming. Feel free to copy/paste this comment whenever there's an ESP discussion, I think it's a good primer for people who don't have ESP experience.

Re: ESP8266: A $5 microcontroller with wi-fi that runs Python

#24

The ESP also runs Lua (by way of NodeMCU), JavaScript (Smart.js, Espruino and JerryScript), Lisp ( https://github.com/yesco/esp-lisp ) and even a form of BASIC ( http://www.esp8266basic.com/language-reference.html ). I'm sure more are out there - seems like something new pops up every few days.

Yup, NodeMCU is really easy. I used it to make a Philipps Hue clone. https://github.com/christophesmet/ledsgetIton It's surprisingly easy connect to a WiFi and get a TCP server running

FWIW - There was a related project front page a few weeks back talking about this: https://news.ycombinator.com/item?id=10899798

Re: ESP8266: A $5 microcontroller with wi-fi that runs Python

#26

I have actually done a fair bit of dev work on this chip (a custom C++ IDE), it is a neat little device, with the emphasis on little. That is both a plus and a minus. Plus, it is cheap, minus, it is little, not a lot of processing power there. (forget Python if you are doing anything serious). The way I worked around it is put all the processing in the cloud and basically the vpn passes straight through it. Interesti…

Have you even tried MicroPython on it? Granted, you need to consider performance -- where you need it, and where you don't. But is is quite easy in MicroPython to create a C-extension module for performance critical components, and have the luxury of a Python REPL loop for debugging high-level logic.

Interesting idea. The client wanted C, but that could make dev work easier perhaps.

Re: ESP8266: A $5 microcontroller with wi-fi that runs Python

#27

By the way, I have to warn people who are thinking about trying this chip (as I have done in other comments): The bare chip won't be very useful to you, unless you want to design your own PCB. Instead, I would recommend a breakout board. There are two major types: Something like the WeMos D1 Mini ( http://www.aliexpress.com/item/D1-mini-Mini-NodeMcu-4M-bytes... ) or NodeMCU ( http://www.ebay.com/itm/NodeMCU-LUA-WIFI-…

So I agree that the WeMos Mini is definitely what you should buy, but the bare chips aren't that bad to work with. I've done quite a few and I usually just solder wires to each pad on the chip and then solder the other end(s) to a breadboard (something like this http://www.instructables.com/id/Getting-Started-with-the-ESP... ).

You also have to pull up CH_PD and pull down GPIO15, plus usually include a voltage regulator and/or smoothing cap, which adds enough hassle that WeMos is definitely worthwhile, but it's not really that bad if you only have the bare modules.

Re: ESP8266: A $5 microcontroller with wi-fi that runs Python

#29
post #3

cool chip! I can't find the SRAM size, anybody has an idea? https://nurdspace.nl/images/e/e0/ESP8266_Specifications_Engl... EDIT: 2015 article, maybe put that in the title?

Very little, around 60kB free if writing programs in C language.

That's loads. Seriously, it's a huge amount. Most other comparable microcontrollers have about 2kB.

Interestingly, it looks like this is a von Neumann device! Which means that code and data live in the same address space. Memory map here:

http://www.esp8266.com/wiki/doku.php?id=esp8266_memory_map

Looks like it's got a whopping great 512kB internal SPI ROM device too, and indications are that it's reprogrammable.

You could totally run a unix on this; I've ported Alan Cox's Fuzix to the MSP430, which is substantially lower specced. Without an MMU you probably wouldn't get preemptive task-swapping, but Fuzix runs beautifully in cooperative multitasking mode. You even get the real Bourne shell (written by Bourne) and pipes.

http://cowlark.com/2015-10-27-fuzix

Post reply on HN