One my goals for Whiley in 2015 is to focus more on embedded systems (see here for more). A recent project of ours was compiling Whiley code to run on a QuadCopter and this identified several challenges here. In particular, Whiley does not provide good memory management for such resource constrained environments. My plan is to introduce various features to provide more control to the programmer, such as object lifetimes in Rust, and for testing I want an extremely resource constrained device. As such, I’ve been developing a simple embedded system based around the Amtel ATtiny85 microcontroller. This has only 512bytes for SRAM, the same amount of EEPROM and 8K of Flash.
The console is pretty simple and only contains an 8×8 LED display and a little joystick for input. Initially, I implemented the console on some prototyping board:
Here, you can see the ATtiny85 is the little chip right in the middle between the display and the joystick. The Arduino UNO is there only to provide power for the board. After I got this working, I then designed a PCB in Eagle and it was milled out in our workshop:
As you can see, the board includes it’s own jack with a voltage regulator so it can run off a 9V battery. There’s an LED as well showing power, and that’s really about it!! Here’s a little video showing the console in action with an implementation of Tetris I wrote: