need help with momentary switches and rotary switches
hi,
i going use couple of toggle switches , rotary switch (11 positions), , ask questions how use them, purpose. making keyboard device, signals should interpreted key press.
i did check tutorials how use momentary switch; toggle switch; can't use same logic, since button goes off when release pressure on it; while toggle stay on until turn off again. objective toggle switch on, , have signal being registered once only; instead of being on. when turn off toggle switch, signal processed again. want use toggle switch momentary switch.
same goes rotary switch: has 11 positions, thinking if possible use trigger button press. give idea; have rotary switch behave throttle wheel may find on boat; @ 0 (position 6 example, center of rotary switch), if turn right 1 position; press button increase speed of boat; if go 1 more on right; "increase speed" pressed; if go 1 position, speed decrease.
i thought of keeping variable increase , decrease, based on current position , previous position (so know if previous position 6 , new position 7, need press speed increase, while if position goes down, need press speed decrease). correct?
thanks in advance suggestion may have. first attempt @ using switches beyond standard momentary switch arduino.
i going use couple of toggle switches , rotary switch (11 positions), , ask questions how use them, purpose. making keyboard device, signals should interpreted key press.
i did check tutorials how use momentary switch; toggle switch; can't use same logic, since button goes off when release pressure on it; while toggle stay on until turn off again. objective toggle switch on, , have signal being registered once only; instead of being on. when turn off toggle switch, signal processed again. want use toggle switch momentary switch.
same goes rotary switch: has 11 positions, thinking if possible use trigger button press. give idea; have rotary switch behave throttle wheel may find on boat; @ 0 (position 6 example, center of rotary switch), if turn right 1 position; press button increase speed of boat; if go 1 more on right; "increase speed" pressed; if go 1 position, speed decrease.
i thought of keeping variable increase , decrease, based on current position , previous position (so know if previous position 6 , new position 7, need press speed increase, while if position goes down, need press speed decrease). correct?
thanks in advance suggestion may have. first attempt @ using switches beyond standard momentary switch arduino.
if want toggle switches, need provide more information (manufacturer , model number, or spst/spdt/dpst/dpdt, 2 positions/three positions, spring return, center off, other features).
not sure rotary switch.
you need find , understand state change detection example. knowing when switch has changed rather knowing switch on or off.
not sure rotary switch.
you need find , understand state change detection example. knowing when switch has changed rather knowing switch on or off.
Arduino Forum > Using Arduino > General Electronics > need help with momentary switches and rotary switches
arduino
Comments
Post a Comment