Pages: [1]   Go Down
Author Topic: [SOLVED]Bunch of momentariesdata send ONLY on 2nd pushes need array shift-reg  (Read 520 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's what I need to do:

- have  4 momentry buttons hooked to digital inputs upon hitting the 2nd one the data is sent.
ADDITIONALLY:
- need reset button that allows me to start again if i hit the 1st button
and then decide i'd like to choose a different pair's 1st button. ie. starting over choosing a pair of buttons.
« Last Edit: December 21, 2013, 10:52:49 pm by ioflex » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 650
Posts: 50838
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
-  if it's easily possible?
Yes. Set a value when the first switch is pressed, corresponding to the switch number (initial value should be 0).

Set another value when the second switch is pressed.

On each pass through loop, see if value1 and value2 are greater than 0. If so, send some data (value1 * 10 + value2 will say what to send). Reset both values to 0.

The reset switch you add (not the one on the Arduino) will reset both values to 0, to.

Quote
- if it needs more than a basic arduino, and any arduino? older ok?
It doesn't. Any Arduino will do.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

PaulS ... Wow!

hey, I've seen quite a few of your posts over the last few days of reading.
you sure have helped me as well!

[One Big Question: use digital pins for analog switch inputs?]

I'd like to use the 6 analog inputs for footpedals? And I'd like to use the
digital pins for the analog momentary switches?

Also trying to deduce if it would be better to use a mega 'cause it has 16 analog inputs?
« Last Edit: December 21, 2013, 10:50:52 pm by ioflex » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 650
Posts: 50838
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
[One Big Question: use digital pins for analog switch inputs?]
No. Analog pins are for reading analog data. Digital pins are for reading digital data. A momentary contact switch is a digital device. With the exception of some bouncing, they are either on or off.

Quote
I'd like to use the 6 analog inputs for footpedals.
Are these analog devices? That is, are they like potentiometers that have a varying output, or are they like light switches - on or off?

Quote
And I'd like to use the digital pins for the analog momentary switches
Momentary contact switches are not analog. They are either on or off.

Quote
Also trying to deduce if it would be better to use a mega 'cause it has 16 analog inputs?
No. See above.

Logged

Pages: [1]   Go Up
Jump to: