Python is a versatile, powerful language but sometimes it’s not the best choice, especially if you’re doing work in embedded systems with limited memory. Sometimes you can get away with MicroPython for these cases, but the best language is likely C or assembly. If you’re really stubborn, like [amirgon], and really want C and Python to play well together, you can make use of his new tool which can bring any C library to MicroPython.
As an example of how this tool is used, a “Pure MicroPython” display driver for ILI9341 on the ESP32, which means that everything was implemented in MicroPython. [amirgon] wanted to see how the Python driver would compare to one that’s already been written in C, and use it to showcase MicroPython binding. This tool also automatically converts structs, unions, enums and arrays to Python objects, and provides a means to work with pointers which is something that Python doesn’t handle in the same way that C requires.
[amirgon] hopes that this tool will encourage the adoption of Micropython by removing the obstacle of missing APIs and libraries in MicroPython. Since most libraries for systems like these are written in C, a way to implement them in Python is certainly powerful. We featured one use case for this a while back, but this is a much more generic fix for this coding obstacle.
Image via [Frank Stajano]
Displaying custom fonts or images on an LCD screen using a microcontroller usually requires quite a bit of work. We’ve used some readily available tools to make this a bit easier for your next project. Our python script will convert BMP files into a header file ready for use with AVR microcontrollers. We’ll walk you through it after the break. Continue reading “How To Generate Font And Picture Header Files”
An anonymous Slashdot reader asked today what was the best digital television to analog converter box. He was looking for one with the best hacking potential. We actually purchased a Zenith DTT900 HD converter box this summer specifically wondering about the hacking potential. We did a teardown and you can find a full gallery on Flickr. Our conclusion was this: there’s not much there. You’re talking about a box that takes a digital RF signal and turns it into a crappier looking analog signal over composite. There isn’t much you can do outside of its designed use. Do you have any ideas what else can be done with it?
Slashdot commenter [timeOday] did mention a Tivax brand box that features a serial port. You can use it to issue remote commands to the box.
Not much has been said about the actual coupons. We’ve got a scan of them embedded below. The $40 coupons are essentially credit cards. We ran ours through a magstripe reader confirming this. Even though the card isn’t stamped with the recipient’s name, it is stored on the magstripe.
Continue reading “Hackit: DTV Converter Boxes?”