Assignment 1: We Got The Beat

In this very simple project, you are going to make your PowerShot behave like a digital metronome.

A Really Short Project Using CHDK Lua Scripting

You might not have realized it, but CHDK cameras can make sounds. It's not a very flexible set of sounds, but it's enough for a metronome. In Lua, it's simply play_sound(n) where n specifies which built-in sound to play.

It is also fairly easy to paint a different color object onto the display. So, for example, you could have a pulsing colored disc appear on the display.

Once activated, your Lua script, beat.lua, will behave a lot like this online metronome, with similar adjustments. It should both play a sound and pulse a disc on the display. The adjustments are made via two parameters to your script that can be set by the script user:

You can add other parameters if you wish.

Stuff To Know About

Obviously, the first step is loading CHDK into your camera. You don't need to build CHDK from sources in order to run your own Lua scripts.

You probably have never used Lua before. It's ugly, but fairly powerful. The CHDK version is only missing a few features, most notably floating-point arithmetic, from the full Lua language and has many additional CHDK-specific functions. There are a number of Lua scripts that you can and should use as references for how to do what you need to do. Be aware that most scripts are not written in Lua, but uBASIC -- they will not be so helpful, and many are old and/or specific to particular camera models.

To make things easier, I've created a reference card for CHDK Lua which you can get from here.

Due Dates, Submission Procedure, & Such

You will be submitting source code (for your Lua script, beat.lua), a make file (which does nothing much for this project), and a very short implementor's notes document, formatted roughly as described here, that discusses any issues in implementation or problems with functionality.

For full consideration, your project should be submitted no later than before class October 17, 2017. Submit your .tar or .tgz file here:

Your account is .
Your password is

Which type of student are you?
Undergraduate registered for EE599
Graduate registered for EE699


http://aggregate.org/CACS/ Cameras as Computing Systems