250a Firmware Lab

From CCRMA Wiki
Revision as of 12:31, 5 October 2009 by Wendyju (Talk | contribs) (Encoder input)

Jump to: navigation, search

Lab 3: Firmware Programming
Due on Wednesday, October 14th at 5PM

For this lab you need your MaxKit, and Max/MSP or PD on a computer.

The Autonomous Arduino

One of the major motivations for learning how to program firmware for the AVR is the opportunity to have the Arduino hardware do things without being connected to a computer. In this segment of the lab, we work on setting up the Arduino hardware so that it can work in autonomous mode.

Powering your Arduino via Battery

Compiling and uploading firmware code in the Arduino Program

For this class, we assume that you will be adapting existing working code for your own applications. While this is certainly easier than writing firmware from scratch, it does require understanding how existing code functions. Please upload the following firmware programs to your Arduino controller and see how they function:

* Flash
* Button
* Dimmer

Adapting firmware code

Use bits from the sample Arduino programs to create your own firmware code to create a flashing Metronome that uses a continuous sensor to control the speed of a flashing led.

Custom Communication

Another reason that you might want to program the Arduino microcontroller even if you are connected to a laptop or desktop computer is to enable greater control over the communications from the Arduino. In this segment of the laboratory, we learn a wider variety of ways to send data from the Arduino hardware to the computer than we have previously used.

Serial communication with the Arduino software

You might have noticed in the previous lab segment that it can be very hard to know what is going wrong when the Arduino hardware is in autonomous mode. Here, we demonstrate how to send serial communications between the Arduino hardware and the Arduino software.


OSC messages with MAX/Msp or PD

Low-latency sensing

One final reason that you would want direct control over the Arduino firmware is that you might have very low-latency sensing needs.

Encoder input

250a 2009