Category Archives: FussyLogic

STM32F4-based Logic Analyser

I’ve been meaning to try this project out for a while… It’s a basic logic analyser built on the STM32F4DISCOVERY board. The STM32F4 runs at 168MHz, so we’ve got a fair bit of bandwidth available. Nothing like a real logic analyser, but the project page reports 20MHz. For most of the microcontroller-based work I do,… Read More »

eLua and STM32F4 II

Last time we built eLua for the STM32F4DISCOVERY board, and ran an interactive Lua session on it. This time I’d like to look more at how you might integrate it into an application of your own. You might have noticed the ls command last time, when we asked for help at the eLua shell prompt.… Read More »

eLua and STM32F4

I am sufficiently taken with Lua that I went looking for interesting Lua projects. I came across eLua. eLua is a project to build a version of Lua that can be used in embedded projects. There is certainly potential there for making life easier. Often in embedded projects, the vast majority of the work is… Read More »


I’ve recently written a couple of projects that run as a python-based daemon. I want them to run as long-lived projects on a VPS, with automatic restart should they fail. I thought I was going to have to go through the tedium of writing init.d scripts for each. Then I stumbled upon supervisord, which is… Read More »

Lua and C++

I’ve not yet had a project that’s needed an embedded scripting language. When I do, I think I’ll reach for Lua. $ apt-get install lua5.2 liblua5.2-dev Command line lua: $ lua Lua 5.2.2 Copyright (C) 1994-2013, PUC-Rio > print("Hello, World") Hello, World Embedded lua: #include <lua5.2/lua.hpp> int main() { // Create a Lua virtual… Read More »

Python Unit Testing

I discussed C++ unit testing last time; I thought this time I’d make a quick mention of unit testing in Python with the unittest module (which uses a very similar structure to CppUnit – mostly because they are both based on JUnit). The introspective abilities of dynamic languages like Python make unit test frameworks really… Read More »

Fizz Buzz Testing

Unit testing is the name we give to the idea of writing code that tests our application code automatically. Essentially, its job is to exercise each piece of your application in isolation, and ensure that any data dependent bugs you might introduce accidentally, never make it into production releases. Personally, I also find it makes… Read More »

Pointer Implications (C++11)

While C++98 had smart pointers of a sort; they weren’t good enough for use. The language lacked the key feature that makes smart pointers work: move semantics. C++11 has introduced that language feature, and hence has solid smart pointers. The addition of smart pointers gives us some further options for passing references to objects when… Read More »

Pointer Implications (C++)

Last time we covered pointer arguments, and that article was applicable to C and C++. C++ introduced true pass-by-reference semantics. f( O & ) f( const O & ) f(O &) Previously we were careful to note that passing a pointer to a function was still only pass-by-value. The pointer was copied, and then the… Read More »

Pointer Implications (C)

Consider the declarations of various pointer-to-an-O-accepting functions: f( O * ) f( const O * ) f( O * const ) f( const O * const ) What is the author of f() telling us about what the function will do with the O we reference in each of these cases? This, and subsequent articles,… Read More »