Pages: [1]   Go Down
Author Topic: Touch Screen 8 Step Sequencer  (Read 1322 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
  {
    steps = analogRead(AnalogInFrequency);
    lastPushedStep = i + 1;
    break;
  }
}



Many Thanks

Code copied from http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1272017881/8
Logged

Brazil
Offline Offline
God Member
*****
Karma: 3
Posts: 626
Beat707.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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... ;-)

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

Wk
Logged


Pages: [1]   Go Up
Jump to: