ESP32s and Python and more

An edifying weekend saw me looking at a whole load of ESP32 based boards – The WiPy 2.0, the Sparkfun ESP32 Thing and the Huzzah32… and in turn a whole set of MicroPython variants… MicroPython is a shrunk down Python 3 for embedded devices and it can fit in some pretty small spaces – there’s a version for the MicroBit even. Anyway, I wanted to find out if I could do a particular projects proof of concept using MicroPython. Let battle commence…

First up was – Pycom’s MicroPython for the WiPy 2.0 is well packaged and relatively complete; it includes RTC support and enough other drivers that I was able to build my proof of concept device. The VS Code integration was neatly done and so much more useful than previous attempts… But the board is literally just the processor. Supply power on the pins and bring your own USB or use their expansion boards. That was already bumping the costs up…. before I went further prototyping (as the rig was already syncing clocks, reading RFID cards and posting to REST endpoints) I thought I’d have a look around.

Next up was Adafruit’s Huzzah32 Feather.

It’s a lovely little Feather board – I do like the Feather form factor and with the new Express boards bringing CircuitPython into play things look interesting. CircuitPython is Adafruit’s fork which tries to simplify the whole thing with embedded hardware where lots of physical features turn into code for particular boards and stop things being portable. Great idea. Turns out the Huzzah32 doesn’t have a CircuitPython port yet though… CircuitPython is an interesting fork but it needs a target board with a bit of WiFi. The Huzzah32 does have the USB and LiPoly support so theoretically it could run MicroPython… let’s try straight MicroPython on an ESP32…

Specifically, lets go back to MicroPython and run from the fork for ESP32. This was to run on the Sparkfun ESP32 Thing, which is a super practical hacking board at a decent price and complete with USB and LiPo battery support. It’s not a small board, but it’s easy to shoehorn in. Then there’s the current MicroPython for ESP32 – like pretty much every API for the ESP32 it’s a work in progress, but this work in progress hurt hardest when I found no RTC clock support in MicroPython at the moment.

The weird part is… writing the Python code was pretty plain sailing for this embedded environment, so I’m guessing it can only get better.

Meanwhile for the proof of concept project…. Heading back to the Arduino framework was no less fruitful. Again, missing RTC support lead the problem set. So I’m back on the WiPy 2.0 to finish the PoC and wondering if I really want to get all C++y to use the Espressif native tool chain. At least there’s be no lack of drivers…

But, and I didn’t think I’d say this…. but I cant wait for Python to harden up in the embedded space.

Developer Catchup: Docker 1.1.0, Rust 0.11.0, Python 2.7.8 and Dropbox Go Libraries

developercatchupDocker 1.1.0: The first post 1.0 update for Docker is in and Docker 1.1.0 now has a .dockerignore mechanism for ignoring file changes, containers that now pause when a commit it happening (rather than messing them up), container log tailing, the ability to feed tar archives to docker build and other changes which should make life a bit easier and more predictable.

Rust 0.11.0: The latest Rust announcement for version 0.11.0 is about smoothing out the type system to allow for dynamically sized types and refactoring the standard libraries to allow for that. It means that language embedded elements like ~ and @ have become library types called Box and Gc that should make the language easier to understand. It all brings Rust 1.0 closer – by the end of the year is the current hope.

Python Updates: The start of July saw a Python update for various security issues – Python 2.7.8 updated the OpenSSL library, fixed mimetypes and UNC paths regressions and blocked an arbitrary code execution hole in CGIHTTPServer. There were also a number of core and library fixes detailed in the release notes. There was no corresponding update for Python 3.x though the CGIHTTPServer issue is scheduled to be fixed in Python 3.4.2 according to the in progress changelog.

Dropbox Go: Dropbox, a big Python user, has also been working with Go and has been moving its infrastructure to Go based code. In the process, they’ve written a lot of libraries to support that work and now they are open sourcing those Go libraries with a 3 clause BSD license. There’s code for caching, an improved error interface, a programmatic SQL statement builder, a memcahce client library, connection management and a space efficient hash library. And they will be doing it the right way – they’ve committed to using the public versions of the libraries inhouse (rather than maintain their own branch). You’ll find the documentation for all the libraries over at

Codescaling Catchup

CodescalingCatchupRegular readers may have noticed a bit of a slow down in postings as I’ve been rearranging the scheduling of things here at Codescaling to allow for other commitments. Hopefully, I’ll be doing a regular Sunday catchup of what would have been snippets and during the week I should, all going well, be looking at a particular thing, be it software or hardware, thats in scope that week. As some may know, I’m curating HackWimbledon and may cover some of the hands on stuff there. But enough of plans… What’s on the catchup this week…

I’ve been doing some work with Eclipse Orion, a web-centric IDE with some interesting attributes, so I was interested to see news of forthcoming language support enhancements coming in Orion 6.0. Lots of interesting bits like syntax highlighting that brings in Arduino files, new documentation generators, the ability to use all the tooling while the JavaScript is embedded in HTML, better tunable JavaScript validation with new rules and so on… worth checking out.

Google landed Go 1.3 this week and it does seem to feel quicker and slicker (I’m getting on with Go code myself and noticed the difference). The experimental support for DragonFly BSD, Plan 9 and Solaris is intriguing… Go on Plan 9 feels like a giant philosophical loop being closed. Also interesting is discussion of Go for Android from one of the Go team… it seems to be on course to start emerging in Go 1.4.

Big news in Python land where the PyPy team landed the first stable release of PyPy3. PyPy is a very compliant Python interpreter with a tracing JIT compiler built in. It had been stable only on Python 2.x but now there’s PyPy3 (libraries are at Python 3.2.5 level, unicode support from Python 3.3). At some point the Python 2.x->3.x transition logjam will be broken and this will be a big help.

Coin cells didn’t immediately strike one as a space for useful research but I was proved wrong on reading How much energy can you really get from a coin cell?, where different makes and models of cell were compared using an ARM controller which systematically loaded each battery. I’m more curious about this now as I just took delivery of PunchThrough’s Light Blue Beans, Arduino style controllers with Bluetooth and powered by a coin cell, but more about those in a future Codescaling post – till then check out the Surf Report Notifier.

The OpenSSL/Heartbleed fallout continues with Google’s latest move, BoringSSL, a bidirectional fork (the codebase’s separate but patches continue to flow in both directions – it needs a term, so bidifork) of the OpenSSL code. Google seem to be using bididforks to allow them to stay plugged into communities but retain control of their destiny; Webkit and Blink seems to be the first bidifork. Whether they work, we don’t know, but I suspect that its an area ripe for research and even formally recognising as an middle course for open source projects between fighting and forking.

On the Todo list – have a look at the Maynard/Wayland desktop on the Raspberry Pi, check out the OEM BeagleBoard Blacks, browse through the undocumented Swift standard library and now it’s a 1.0, checkout the WordPress REST API.

TypeScript 1.0, IPython 2.0.0 and Rust 0.10 – Snippets


TypeScript hits 1.0: Microsoft’s take on reworking JavaScript, TypeScript, has hit version 1.0 and is now accepting pull requests on the open source compiler (though it’s bug fixes only for now.). Meanwhile, Microsoft have embarked on an open source fest with the creation of the dotNet Foundation, now home to a .NET compiler, micro frameworks, Couchbase for .Net, various SDKs, ASP.NET modules and other stuff. And to top it all off there’s WinJS, a set of UI controls and scaffolding for making Windows applications. Microsoft may be changing, but how effective that change will be is the big question. In the meantime, TypeScript gets to fight it out in the crowded playground that is JavaScript complements/replacements with Dart, CoffeeScript and, lets not forget the next generation of JavaScript, ES6.

IPython 2.0.0: The interactive Python environment IPython, has been updated to version 2.0 and adds interactive widgets, directory naviagation, persistent URLs, a modal UI and security model to its idea of Notebooks as a container for projects. Under the hood, the codebase is now native for Python 2.7 and 3.3 which are also the minimum required versions. There’s lots more changes listed in the release notes or you can just go install it and get into the tutorial which gets you going with the rather clever world of Python powered notebooks.

Rust 0.10 oxidises: Away from the controversies at Mozilla, the Rust developers have rolled out a new Rust release, version 0.10, which continues the steady development of the systems programming language. Changes include the libextra package being broken down (‘misc’/’extras’ libraries are always a bad sign so good to see it go), cross package (crates in Rust terminology) syntax extensions, better smart pointers and I/O handling. As things kick up a notch towards a final version, there’s now a RFC process for changes and nightly releases of binary installers. It’s all still alpha but progress is good – it was recently reported that Servo, the web engine being built on Rust, has passed the Acid 2 test.

Python 3.4 lands, Bootstrap flattened, USB2go-on-a-phone and Doge2048 – Snippets

Python 3.4 is here: After many months of development, no changes to the language but lots of enhancements in the CPython implentation and standard library improvements, Python 3.4 has arrived. Before you dash off to the Python 3.4 download page, reflect for a moment that now Python now has pip as its bundled installer and should always be available or that there’s an OO API to filesystems (pathlib), a new async I/O API, support for enumeration types, fresh pickle and more and then go to the What’s new in Python 3.4 page to deeply meditate on all these and all the other changes. So far, it looks like a good solid update.

Bootflat: Like Bootstrap but wish the UI was flatter? Check out Bootflat and its flat UI reworking of Bootstrap 3.1. It’s on my list for making the UI stand out (or not, what with it being flat…)

USB2Go: Want to make Arduino-like gadgets that plug into your Android phone directly? USB2Go’s Kickkstarter may be of interest. A tiny Cortex-M3 ARM based board is at the heart of this project which hopes to deliver both the boards, Arduino shield adapters and more in October.

Doge vs 2048: Number matching games that slide are in since the appearance of Threes, then Fives, then came 2048 or let an AI play 2048 for you and finally… as memes do, it collides with another meme and we get Doge2048.

Python upped, Persona non grata, Markdown marked and more – Snippets

Python 3.3.5 released: The latest update to Python 3.3 fixes two regressions, in zipimport and executing scripts and alleviates a potential denial of service. Mac users should pay specific attention as this 3.3.5 version now fully support OS X 10.9 fixing a bug which could cause “previous versions of Python to crash when typing in interactive mode”.

Persona (non grata): Mozilla’s Persona is being “transferred to community ownership”. As yet another project is cut adrift from Mozilla in a fuzzy, vaguely friendly way, its worth making a note that you shouldn’t bet on Mozilla projects for the long term, unless they are called Firefox or run on a phone. Mozilla’s habit of creating projects which don’t fulfill one of their needs seems to have created this problem but at least on the plus side, they are not decommissioning it so they aren’t pulling a Google Reader. Which is good given folks like use Persona for login.

Markdown editing for the web: Markdown is everywhere there days and whats been missing is a good editor for Markdown formatted plain text which can be embedded in the browser as a replacement for the WYSYWIGto-no-particular-format editors. And here it could well be in the form of EpicEditor, complete with import, export, in-place preview, full screen (with 50/50 edit/preview), custom parsers, extensions, event hooks and theming and more and all invokable from a single line of JavaScript.

Loose bits: Ivan Ristic shows you how to roll your own Apple ‘goto fail’ TLS bug test server though the process is worth noting for future SSL/TLS tests – Or, post GNUtls’s ‘goto cleanup’ fail, you can get your head down and help audit GNUtls with this handy list of “places to look” where unchecked data comes into the library – Or you can kick back with the 6809, a great CPU, and now being emulated in JavaScript.

ElasticSearch 1.0, TokuMX 1.4, Plan 9 GPLv2’d and Python 3.4RC1 – Snippets


ElasticSearch 1.0 springs out: The search-oriented NoSQL database, built upon Lucene, ElasticSearch has hit version 1.0. It’s a big release with a lot of changes and a lot of new features – an API for selective snapshot/restore, federated search, aggregation, distributed percolation and software “circuit breakers” to stop some more dangerous actions from overwhelming the system. An interesting post from on ElasticSearch sums up the pros and cons (like no authentication or authorisation) places ElasticSearch in the domain of “secondary store” to be used alongside a primary database.

TokuMX 1.4: Tokutek’s “MongoDB-with-Toku-engine”, TokuMX, has hit version 1.4 and is addressing the performance of sharding and replication. Toku’s engine is reputed to be very good for particular use cases and it’s interesting to see alternative storage engines under the MongoDB infrastructure.

Plan 9 goes GPL2: It’s been a long time under a open source (but unblessed-by-the-FSF) licence, but the venerable and inspiring Plan 9 has not been relicensed (mostly) under the GPLv2. In an announcement. It can be downloaded from the Akaros project (or cloned from the GitHub repo) which seems to be breeding Inferno/Plan 9 with their own many-core large-smp research.

Python 3.4 on final approach: Out of beta and hitting release candidate a few days ago, Python 3.4 is now imminent. It’s expected to land just over a month from now on March 16. Check back to our coverage of the last beta for more details of what’s coming.