- Posts: 18
- Thank you received: 0
Setting a float value with push/momentary button
- Epicenter02
- Topic Author
- Offline
- New Member
-
Less
More
3 years 6 months ago #270099
by Epicenter02
Setting a float value with push/momentary button was created by Epicenter02
Hello, Everyone
Ive been working on this machine for quite some time, but got stuck a little. Im trying to use 4 push buttons to set increments 1/ 0.1 / 0.01. And a button to clear the increments. The idea is when a button is pushed, the increment is set to a specific value, when the button is released, the value should still be set. If i press a different button, the old value should be overwritten by the new one and set. I have no idea how to do this, because at the moment when a button is pressed the value gets set, however upon release the value disappears...
Ive been working on this machine for quite some time, but got stuck a little. Im trying to use 4 push buttons to set increments 1/ 0.1 / 0.01. And a button to clear the increments. The idea is when a button is pushed, the increment is set to a specific value, when the button is released, the value should still be set. If i press a different button, the old value should be overwritten by the new one and set. I have no idea how to do this, because at the moment when a button is pressed the value gets set, however upon release the value disappears...
Please Log in to join the conversation.
3 years 6 months ago #270110
by spumco
Replied by spumco on topic Setting a float value with push/momentary button
Please Log in to join the conversation.
3 years 6 months ago #270136
by MaHa
Replied by MaHa on topic Setting a float value with push/momentary button
From my archive with stuff i have ever done,mostly for testing, this modified userspace component needs only be connected to the buttons and then get the increments
Please Log in to join the conversation.
- Epicenter02
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 18
- Thank you received: 0
3 years 5 months ago #270613
by Epicenter02
Replied by Epicenter02 on topic Setting a float value with push/momentary button
Hello,
took a few days off work..
Ive tried to use this, the file is located in usr/bin/
Owner:root
Access: Read & Write
Group: root
Access: Read Only
Others: Read Only
And marked to run as a program, but when i try to start axis i get:
execv(incr_bttn.py): Permission Denied
And exits without becoming ready..
Any ideas?
took a few days off work..
Ive tried to use this, the file is located in usr/bin/
Owner:root
Access: Read & Write
Group: root
Access: Read Only
Others: Read Only
And marked to run as a program, but when i try to start axis i get:
execv(incr_bttn.py): Permission Denied
And exits without becoming ready..
Any ideas?
Please Log in to join the conversation.
- Epicenter02
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 18
- Thank you received: 0
3 years 5 months ago #270631
by Epicenter02
Replied by Epicenter02 on topic Setting a float value with push/momentary button
Ive got the script working, there were some permission stuff going on but at the moment axis not recognizing "sudo halcompile" telling me "unknown command 'sudo' "
Please Log in to join the conversation.
3 years 5 months ago #270634
by rodw
Replied by rodw on topic Setting a float value with push/momentary button
Sounds like your user is not in the sudoers group. If you have a root account and know it's password, log in with that or us su command and then and add the user to sudoers. Google it it's easy!
If you don't have root access, you will need to start again and DON'T add a root password.
If you don't have root access, you will need to start again and DON'T add a root password.
Please Log in to join the conversation.
- Epicenter02
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 18
- Thank you received: 0
3 years 5 months ago #270638
by Epicenter02
Replied by Epicenter02 on topic Setting a float value with push/momentary button
After getting the permissions right and running it through terminal, the file was compiled successfully and the pins were created. Ive got the buttons linked to the script and it works flawlessly.
Thank you everyone
Thank you everyone
Please Log in to join the conversation.
Time to create page: 0.125 seconds
