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*_