Multiswitch
- muntzieman
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 1
09 Jul 2020 15:31 #174099
by muntzieman
Multiswitch was created by muntzieman
Does anyone have a good example of using multiswitch? I'm trying to use one button to toggle through a jog scale of 0, 0.001, 0.01, 0.1 and I can't find a good example.
Please Log in or Create an account to join the conversation.
09 Jul 2020 21:01 #174140
by rodw
Try this. but its a binary switch
forum.linuxcnc.org/show-your-stuff/32029...build?start=20#85279
Replied by rodw on topic Multiswitch
Does anyone have a good example of using multiswitch? I'm trying to use one button to toggle through a jog scale of 0, 0.001, 0.01, 0.1 and I can't find a good example.
Try this. but its a binary switch
forum.linuxcnc.org/show-your-stuff/32029...build?start=20#85279
Please Log in or Create an account to join the conversation.
- muntzieman
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 1
09 Jul 2020 23:58 #174161
by muntzieman
Replied by muntzieman on topic Multiswitch
I appreciate the information but I don't think it will work for my application. I'm using an arduino micro to build a joypad pendant as I outline in this post.
forum.linuxcnc.org/show-your-stuff/39435...joypad-and-hal-input
I've moved quite far along with this project but still a way to go. I've added a LCD screen (python script), rotary encoder and button inputs. Its amazing what you can do with the arduino joystick library.
I was hoping the multiswitch component would allow me to toggle through a jog scale with one button. Right now I have to hold a axis button, a scale button and turn the encoder.
Is the multiswitch component not used or is there a better way to toggle multiple items?
forum.linuxcnc.org/show-your-stuff/39435...joypad-and-hal-input
I've moved quite far along with this project but still a way to go. I've added a LCD screen (python script), rotary encoder and button inputs. Its amazing what you can do with the arduino joystick library.
I was hoping the multiswitch component would allow me to toggle through a jog scale with one button. Right now I have to hold a axis button, a scale button and turn the encoder.
Is the multiswitch component not used or is there a better way to toggle multiple items?
Please Log in or Create an account to join the conversation.
10 Jul 2020 07:24 #174190
by phillc54
Replied by phillc54 on topic Multiswitch
You could do something like:
loadrt multiswitch cfg=3
loadrt mux4
addf multiswitch.0 servo-thread
addf mux4.0 servo-thread
setp mux4.0.in0 0.001
setp mux4.0.in1 0.01
setp mux4.0.in2 0.1
net sel0 multiswitch.0.bit-01 => mux4.0.sel0
net sel1 multiswitch.0.bit-02 => mux4.0.sel1
net scale-button <your_button_pin> => multiswitch.0.up
net scale-out mux4.0.out => <your_scale_input_pin>
Please Log in or Create an account to join the conversation.
- muntzieman
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 1
10 Jul 2020 14:56 #174215
by muntzieman
Replied by muntzieman on topic Multiswitch
This is the example I've been looking for. It worked perfectly, thank you.
Please Log in or Create an account to join the conversation.
Time to create page: 0.065 seconds