Kickstarter for funding Micropython port to ESP8266
kickstarter.com
kickstarter.com
I love the ESP as a platform. It's low cost but still pretty impressive. Having micropython running on it just increases its ease of use, but you've also got Arduino and NodeMCU (Lua) so there's a great budding ecosystem around it.
[0]: http://ntoll.org/article/story-micropython-on-microbit
[1]: http://www.espruino.com/MicroBit
[2]: http://www.espruino.com/EspruinoESP8266
After trying to hold interest in an arduino club for young students, leaving that language for something that holds your hand a bit more is quite appealing. That and basically the UK curriculum is python. As we web developer I want to see JS get in here but I think the ships already sailed.
Being a contributor of https://home-assistant.io/, I wanted to do a series of blog posts similar to balloob's on using the ESP for small home automation things ala: https://home-assistant.io/blog/2015/10/11/measure-temperatur...
but exclusively with micropython. Funding this will allow this vision to become a reality.
My journey with MicroPython actually started with my smart home project needs - I wanted to use one of those small inexpensive Linux routers as a central controller. With only 4MB of flash, full Python wouldn't fit there, and USB port would be taken by Bluetooth dongle. I tried, really tried to get in love with Lua, but that didn't work, then I hacked on another small language called Squirrel, but when MicroPython campaign was announced, I really rejoiced. Well, that was more than 2 years, and since then, we had big progress with MicroPython, and I had much less progress with my home automation project ;-).
How I explained it to myself, is that, OK, I'll concentrate on uPy, to make it fairly complete and really cool, and that will enable other folks to make cool projects with it, which I myself will like, will be able to pick up, use, contribute to - instead of writing my own. Reading your message, I get a feeling that it might as well be true, and before I grow old ;-).
So, thanks again for your links, Home Assistant is at the top of my list to look into (and I have couple of dozen projects in it). And well, we'll try to do everything to uphold your hopes for MicroPython on ESP8266!
Plus it provides interactive shell on a micro-controller.
Some hackers might also be interested to know that there is a cellular module called a Telit[1] that can also run some python.
Back when I was in games we ran the whole AI for a PSP game in an single 400kB block and it worked fantastically.
MicroPython can work in 128K of "ROM" (80K for language core, rest for modules/user code). In 400K, you can do a lot with it.
The current MicroPython support for the ESP8266 platform is very basic, albeit good. I would love to see broader hardware support for the ESP8266 on MicroPython.
I guess the real question is which of these project will support both ESP32 and ESP8266.
Full disclosure: I'm a NodeMCU contributor
Regarding hardware support in MicroPython (first hardware protocols, the specific hardware devices), it's coming - Damien did a lot of work on that preparing to the Kickstarter, and some of it already seen in the KS video. Mind that MicroPython runs on many platforms, and providing portable and consistent API is one of our top goals. And that requires good design work, from many people (to cover different usecases and PoVs), and that takes time and committee-stuff ;-). But we now have solid foundation, so further progress is imminent.
All in all, we always welcomed contributors (and have almost 100 of them), and exactly want to reach critical mass of functionality for ESP8266 port, so it made good sense to come by and contribute gazillion of smaller things people want ;-). So, please keep watching our space!
Regarding ESP32 - one of my concern is to avoid typical situation of moving target, when software never works well enough, with constant promises that next generation of hardware resolves it, but vicious cycle only repeats. Otherwise, I guess it's fair to say that all active projects are going to support ESP32 too!
Can you do it in Arduino? Yes, you can. Arduino is kind of subset of C++ to make it more like scripting language, but still compiled (because AVR microcontroller used in the original Arduino couldn't host an advanced scripting language, but people didn't care even back then, and wanted to run it nonetheless: https://github.com/billroy/bitlash). So, just keep that compiler/IDE around (on your tablet? phone?) if you want to tweak it. Is it big problem? Nope, but should give an idea why people look towards scripting languages which allow to have even less problems.
How MicroPython will be better? Well, we seriously consider Python to be more advanced language overall (while more suited for hardware programming). And I'm a long-time esp8266 hacker with bunch of ideas how to get more from the chip, just looking for a good excuse (like, people actually needing it) to implement them.
Compatibility with standard Python makes sense, if not joy. However the world has long ago moved on to async event-driven APIs. (e.g. asyncore, Twisted, libuv, boost::asio, Netty, etc.)
Perhaps they intend to support asyncore?
A typical ESP8266 module is around $5, which is much cheaper than an Arduino (I know you mentioned the "bare" ATmega, but that's going to have to go on some board, whereas the ESP8266 is already a PCB module, at $5).
Which makes more sense depends on your needs; if you're heavily invested in the Arduino ecosystem (primarily add-on boards) it might not be a great fit.
But for a GP board with enough GPIO to get small things done, it's a great board, and just as easy to use. For example, I have a number of lights hooked up to it using SSRs. I use it more as a peripheral chip rather than a main controller, because it's so ridiculously cheap and easy to use.
Where I used to use IR comms to hook together small devices (light/power controllers, sensors) I use these now.
That of course makes some of the rewards make more sense, but I think it feels oddly strange to pitch in only to get binary blobs and no source.
The fact that it's MIT licensed means that if you want to make your own products with it, you'll be able to do it, with minimal hassle for you and your customers.
https://github.com/espruino/Espruino
https://www.kickstarter.com/projects/gfw/espruino-javascript...
It's an option, and obviously we'd like people to use that and hence are likely to talk about it and show how cool it is etc, but you definitely don't need it.
We have HTTP, WebSocket. Soon we'll also expose MQTT and mDNS to the JS layer; with that you can build whatever you want with the tools and services you love and trust.
- https://www.cesanta.com/developer/smartjs#_http - https://www.cesanta.com/developer/smartjs#_websocket
MQTT API is on it's way, it's already implemented by the underlying networking library (https://github.com/cesanta/mongoose)
And I'm not sure if you're yourself from Cesanta, but I definitely heard about them and keep an eye on their progress after they got VC. Actually, I heard about them when Sergey Lyubka switched Mongoose server licensing from MIT to GPL as a result of the company formation. Nothing wrong, that happens.
I actually bring up this matter because it relates very well to the current campaign. We see that MicroPython useful, people like it, it has potential, so we think how to move it forward (the main developer is already full-time on uPy). And this Kickstarter campaign is exactly an attempt at community funding of further development, keeping liberal license, and developing in the open. Because if the main author decides to go for VC, I'm not sure what licensing changes may ensue, and when all the cool features will appear in the open-source version.
BTW thank you for https://github.com/pfalcon/esp-open-sdk, very useful.
In our case, Kickstarter was just the right choice overall - we're aware that there're well known competitors, and we want to see if there's enough community interest to back development and support for a reasonable time (half-year, better a year). Starting a KS campaign requires a lot of preparation, but I guess it's good again, because it allows to sanity-test earlier exciting ideas, to see if you really can pledge to implement them.
So, the first thing we need to do is make the entire system compatible with the Python execution model, ie no callbacks. As part of this it just so happens that sockets become synchronous as well.
Once this is done we have a solid (and conventional, not forced upon us by the vendor) foundation to work from. Then we can build the Python way of doing async IO if needed using the asyncio framework (and perhaps the new async/await keywords).
And for people who want to solve C1M/100/100 problem ("Serve one million clients on a 100MHz device with 100KB of RAM", pun at https://en.wikipedia.org/wiki/C10k_problem), up to going to callback-based API, we may offer that later, but it will be at least based on open and more or less known lwIP API, not on a proprietary vendor shim.
100% it is a downgrade. Every experienced developer knows the async model is more performant, at the cost of complexity. My micropython fork is super quick and super stable, it's just not easy to use for beginners. For the ESP micropython port to succeed they need to create groundswell of people using the more compatible APIs. Until now, with the cost of the board subsidising the development there has not been much motivation to even put even posted bug fixes into the port. Using the kickstarter and maybe more community support will maybe bring the ESP port up to a first class citizen.
Personally, my port is a hell of a lot of fun to work with and async is a total win on this board.
This model is certainly more modern and works way better than a for loop
def hello(): print("hello")
esp.os_timer(callback=hello, period=1000)
But, it's not compatible.