Zach Seibold

How to Make (almost) Anything

Interface and Application Programming

This week, the assignment was to write an application that interfaces with an input and/or output device. I decided to make a simple graphical user interface in Processing to control a board of 20 charlieplexed LEDs. This project required a couple different components:

1. A GUI in Processing that contained an array of selectable objects. When an object is selected, it would write its index over serial.

2. A program in Arduino that would listen for serial communication, then set the appropriate pins to input + output to turn on one of the charlieplexed LEDs. I hoped to do this using the Charlieplex library built for Arduino, but ran into some issues that are outlined below.

3. A modified version of the hello.array.44 board equipped with serial communication.

I got a number of the pieces working, but haven't yet gotten them all working together...


My working hello.array.44 board.

I had made a hello.array.44 board before the holiday. It works (almost) perfectly with Neil’s c code, other than the fact that the LEDs are pretty dim during the last line of the test loop (led_cycle(100,1);)I’m not sure if this is a timing issue or a power supply issue? I’ve also tried to send code created using the Charlieplex library. Note that to make it compatible with Arduino version 1.0+, you need to change the following in Charlieplex.h: #include to #include . Unfortunately, I’m getting some strange results. When trying to cycle through LED’s as done in Neil’s c code, the lights will turn on and off in a seemingly random (though repeating) pattern. Not sure what the issue is there
Project 12a
I had pretty minimal experience in Processing before this week, so used Algorithms for Visual Design Using the Processing Language and Processing: A Programming Handbook for Visual Designers and Artists for reference. My code borrows heavily from a sketch in chapter 8 of the Terzidis book. The major addition is that whenever an object is selected, its index is printed to the screen and sent over serial.
You can find my code here.
<Project 12b
The next step was to get my board to communicate via serial. I was able to get one of my boards from an earlier week to communicate via serial through Arduino using the software serial library. I only got as far as running some test code:
You can find my test code here.