Data graphing program that saves to a file

This Processing sketch takes data from the serial port, graphs it, and writes it to a text file with a time stamp if there’s a significant change in any of the incoming values. It expects five values between 0-255 in ASCII, separated by tabs, and ended by a carriage return and newline.

The text file it generates is tab-delimited, and can be read easily in a spreadsheet.

A Wiring/Arduino program to send data to this sketch follows at the end.

Continue reading “Data graphing program that saves to a file”

USBTinyISP

Recently, I’d been trying to re-program some Atmega168’s for use in Arduino modules, and was having no luck using my AVRISP MkII programmer. All appeared to be working, but it kept failing. I even dug into the details of avrdude, and the programmer responded as if it was working but delivered no love.

Fortunately I had on hand a USBTinyISP from Adafruit. Even more fortunately, Limor Fried has written some nice instructions on the programmer and on installing and running avrdude to program with it. What’s nice is that she’s packaged the software well, so you can run it without too much hassle. The only thing I had to learn was how to point avrdude at her custom config file, by using the -C flag, like so:

./avrdude -C avrdude.conf -v -p m168 -e

(etc)

Even nicer, David Mellis is including support for this programmer in Arduino 0010, so that I can burn new bootloader firmware onto the chips using it without needing to touch the command line app.

Even nicer still: her programmer’s cheaper than the AVRISP mkII (of which I have blown up a few). I may blow this one up in time too, but I’ll be able to afford to replace it much easier.

Technorati Tags: ,

Virtual Color Fader for Max/MSP

This Max/MSP patch reads in a serial string like this:

Rnnn
Gnnn
Bnnn

Where nnn is an ASCII-formatted decimal number from 0 to 255. It then converts the values into the RGB colod for the patch’s background.

An Arduino program to send the appropriate data follows.

To use the patch, copy the text and paste it into a new max patch window.

Thanks to David Mellis and Jamie Allen for the collaboration. These patches were written for a one-day Arduino workshop at NIME 07 hosted by the three of us. The Arduino program comes from the Arduino example files, by David Mellis.

Technorati Tags: , ,


Continue reading “Virtual Color Fader for Max/MSP”

Analog to Frequency for Max/MSP

This Max/MSP patch takes a serial string in and converts it to a numeric value, then plays a frequency using the value.

To use the patch, copy the text and paste it into a new max patch window.

Thanks to David Mellis and Jamie Allen for the collaboration. These patches were written for a one-day Arduino workshop at NIME 07 hosted by the three of us. The Arduino program comes from the Arduino example files, by David Mellis.

Technorati Tags: ,


Continue reading “Analog to Frequency for Max/MSP”

Physical Pixel Controller

This Max/MSP patch turns on or off an LED attached to an Arduino. Max and the Arduino communicate serially.

To use the patch, copy the text and paste it into a new max patch window.

Thanks to David Mellis and Jamie Allen for the collaboration. These patches were written for a one-day Arduino workshop at NIME 07 hosted by the three of us. The Arduino program comes from the Arduino example files, by David Mellis.

Technorati Tags: , ,


Continue reading “Physical Pixel Controller”

LED Fader in Max/MSP

This Max/MSP patch sends data out the serial port. The corresponding Arduino program reads the data from Max serially and uses it to set the brightness of an LED on digital pin 9.

To use the patch, copy the text and paste it into a new max patch window.

Thanks to David Mellis and Jamie Allen for the collaboration. These patches were written for a one-day Arduino workshop at NIME 07 hosted by the three of us. The Arduino program comes from the Arduino example files, by David Mellis.

Technorati Tags: , ,


Continue reading “LED Fader in Max/MSP”

Ascii to Number in Max/MSP

This patch receives an ASCII-encoded decimal string that ends with a linefeed and carriage return in the serial port, and converts it to a number. A Wiring/Arduino program to send data to it follows. It’s based on an example by Jamie Allen.

To use the patch, copy the text and paste it into a new max patch window.

Thanks to David Mellis and Jamie Allen for the collaboration. These patches were written for a one-day Arduino workshop at NIME 07 hosted by the three of us. The Arduino program comes from the Arduino example files, by David Mellis.

Continue reading “Ascii to Number in Max/MSP”

Serial Graphing application for Max/MSP

This Max patch takes in serial data and graphs it. It’s useful for seeing the changes in an analog sensor. An Arduino code sample that works with it follows the patch.

To use the patch, copy the text and paste it into a new max patch window.

Thanks to David Mellis and Jamie Allen for the collaboration. These patches were written for a one-day Arduino workshop at NIME 07 hosted by the three of us. The Arduino program comes from the Arduino example files, by David Mellis.

Technorati Tags:


Continue reading “Serial Graphing application for Max/MSP”