Category: Programming

  • Controlling the Raspberry Pi camera from C

    I wanted to be able to stop and start the camera driven by events instead of just calling raspivid to record for a preset time. My code is really just a simple wrapper around raspivid using the SIGUSR1 option to stop the video under program control rather than after a preset time. The example main() […]

  • Flash Rubik Cube Simulator

    Above is a snapshot image.  Here’s the real thing. It works for any size of cube from 2 x 2 x 2 up to 11 x 11 x 11.  Actually, 11 is an arbitrary limit – the same code would work for any size of cube.  Use the little + and – buttons up in the top […]

  • The Minimum Attack Problem

    Place five queens on a chess board so that every square on the board is attacked.  It’s an old and famous problem; there are lots of solutions and it’s pretty easy to find one.  Try it for yourself and see! Now try using just three queens and two rooks.  Not so easy this time; the […]