Touch Screen 8 Step Sequencer

Hello,

I am currently working on an 8 step sequencer with a touchscreen and an LED matrix underneath. I am reading values from the touchscreen fine and everything is mapping well. Using LedControl.h I have been able to make the 'height' of an LED column represent the position of a touch along that column. I also have a speaker connected that I hope to play audio through. My intention is to make the frequency of the note dependent on the position of the touch along a column. Most of the sequencer tutorials I have found are using digital read to read inputs such as buttons (see code below). Can anyone suggest to me an appropriate method of achieving this?

#define N_PINS 2
const byte DigitalInSwitch [N_PINS] = { 2, 3};

for (int i = 0; i < N_PINS; i++) {
if (digitalRead (DigitalInSwitch ) == HIGH)

HA! I was going to do the same thing a month ago, but I couldn't find any good sized LEDs matrix around here so I drop the whole thing out... :wink:

In any event, check the source-code for Beat707.com project, you will find some nice things there to help you out.

Wk