Monthly Archives: September 2013

PostgreSQL and Row IDs

From a blog post [PostgreSQL] allows for treating INSERT and UPDATE statements as table references, when used with the RETURNING clause. This is quite fancy, even if not very useful in everyday SQL. “not useful”? Madness I tell you I respectfully disagree. I only discovered RETURNING in the last year; and it’s incredibly useful in […]

Posted in FussyLogic | Tagged , , | Leave a comment

ChibiOS/RT

ChibiOS is an open source RTOS for embedded systems. It’s comparable with FreeRTOS; but for my money is a nicer project. Comes with a hardware abstraction layer – i.e. device drivers (kind of). That means we target the ChibiOS API rather than a particular platform. A lot of manufacturers supply a device layer specific to their […]

Posted in FussyLogic | Tagged , , , | Leave a comment

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, […]

Posted in FussyLogic | Tagged , , | Leave a comment

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. […]

Posted in FussyLogic | Tagged , , , | Leave a comment

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 […]

Posted in FussyLogic | Tagged , , , | Leave a comment

Supervisord

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 […]

Posted in FussyLogic | Tagged , , | Leave a comment

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 Lua.org, PUC-Rio > print("Hello, World") Hello, World Embedded lua: #include <lua5.2/lua.hpp> int main() { // Create a Lua virtual […]

Posted in FussyLogic | Tagged , , | Leave a comment