Page 1
img_7888
Standard

My trip to Germany and back

When I last drove to Munich and back, in order to visit my family and girlfriend, I decided to do something especially geeky: track my driving progress. The reason behind me tracking myself was two folded. For one I wanted to see if I could write a full app, front- and back-end to track myself across Europe, but mostly I wanted to keep my folks in the loop of where I am. Usually this was done by repetitively calling or, when having a break, posting or texting many to notify them of my progress. But this is neither live, precise, nor is it a pretty solution. Over a few posts (still to come) I will show you how I:

  • designed the iOS app (in Swift with MVC paradigm),
  • made a horribly insecure web server to track the (sometimes out of order) data, and
  • displayed the entire journey (in correct order) on a Google Map on my webpage.

But for now, here are the tracking results and me waffling about my journey.

Continue Reading →

more
more
night-coding
Aside

Fix to MicroPython's Memory Allocation Problem on ESP8266

I've been trying to write code that allows me to display text on my ST7735 display. The font module I found is around 4kB of source code that needs to be loaded by Python, compiled into byte code and executed by the Python Virtual Machine, or VM (for more details refers here). This process works somewhat like Java's VM approach, but on devices with limited memory, i.e. the ESP8266, can become troublesome. Loading, compiling and storing the byte code takes up precious memory, which may not always be allocatable; thus throwing an MemoryError: memory allocation failed, allocating XXX bytes.. In this little post I want to show you how you can pre-compile modules for the ESP8266, so you will avoid wasting space. And if that option is too cumbersome for you, I also present a little hack to increase the ESP's heap memory, but that's more of a bodge-job for lazy people: i.e. me :p

Continue Reading →

more
web-repl-header
Aside

ESP8266 file transfer - the post I forgot...

In all my excitement about getting MicroPython running on the ESP8266, and then to get it talking to a ST7735 driven TFT LC display, I completely forgot to explain how I get the code saved on the little chip. It is very possible to write all the code in the terminal using picocom, minicom or screen. Yet this approach is very tedious, prone to errors, and if you do mistype something you'll have to start from scratch. Luckily, the MicroPython image allocates some space for a local file system (around two frecking Mega-Byte on the ESP if I'm not mistaken!), and you can write files to it and read them back using the built in webrepl module.

Continue Reading →

more
img_6592
Standard

TFT display for ESP8266 - shapes

Programming is awesome! Having gotten to grips with the ESP8266 on the HUZZAH board from Adafruid made me appreciate this even more. Back in my "wild" embedded-C days I was under the impression that programming a microchip was only for the hardcore geeks (myself included) and really difficult to grasp. How wrong I was! The object orientated platform MicroPython makes this little ESP an amazing platform for learning to code and getting immediate results. Only one thing is missing is a screen: or is it?

Continue Reading →

more