250a Firmware Lab

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

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.



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

  • Create a patch to make sounds based on button and sensor values from the Arduino. You can try to adapt your patches from Lab 1, or come up with a new patch.
  • Try to make a simple musical interaction. Think about music -
    • does it have dynamics?
    • can you turn the sound off?
    • can it be expressive?
250a 2009