Arduino Forum
>
Products
>
Arduino Esplora
>
Can the slider be used to enter keystrokes?
Print
Go Down
Pages:
[1]
Topic: Can the slider be used to enter keystrokes?
(Read 2035 times)
previous topic
-
next topic
CalvinBrean
Newbie
Posts: 5
Karma: 0
[add]
Can the slider be used to enter keystrokes?
Jan 05, 2014, 06:59 am
Hi Esplorers,
Does anyone know if the slider can be read to send a letter 'A' for example, by moving it from full left to full right and back again? Or is it not precise in that way?
Thank you folks.
KB
Grumpy_Mike
Brattain Member
Posts: 62,939
Karma: 2526
[add]
Solder is electric glue
http://www.thebox.myzen.co.uk
Re: Can the slider be used to enter keystrokes?
#1
Jan 05, 2014, 07:07 am
I don't see why not but why do you want to do such a thing?
Read the slider voltage and when it makes a transition from below 512 to above 512 send the letter. Remember it is the transition you are looking for not the reading now. Therefore you store the last analogue reading in a variable and the if statement says if the current reading is greater than 512 and the last reading was less than 512 then send your letter.
Print
Go Up
Pages:
[1]
Loading...