touch scren as a switch?


hello again,
now curious how can go making touch screen have hooked analog pins 0-3 function switch.

the screen sends out midi cc data need have send midi note when touch anywhere , when release finger have note shut off.

i tried few things trying modify code switch going in digital pin couldn't work. thinking there should easier way.

posting code you. simple addition code need. haven't worked touch screen before, don't knwo kind of input or form pin or pins input comes from. assuming if there nothing touching screen pins read 0 can statement this.

code: [select]

if(analogread() > 0)
{
// play note
}
else
{
// play nothing
}


or if not 0 sends out data in range when touched this.

code: [select]

if (analogread() > lowvalue && analogread() < high value)
{
// play note
}
else
{
// play nothing
}


someone should able tell me how far off on this.


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > touch scren as a switch?


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums