Setting a float value with push/momentary button

More
28 Apr 2023 07:47 #270099 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...

Please Log in or Create an account to join the conversation.

More
28 Apr 2023 11:39 #270110 by spumco

Please Log in or Create an account to join the conversation.

More
28 Apr 2023 21:47 #270136 by MaHa
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
Attachments:
The following user(s) said Thank You: Epicenter02

Please Log in or Create an account to join the conversation.

More
04 May 2023 08:23 #270613 by Epicenter02
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?

Please Log in or Create an account to join the conversation.

More
04 May 2023 11:03 - 04 May 2023 11:07 #270631 by Epicenter02
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' "
Last edit: 04 May 2023 11:07 by Epicenter02.

Please Log in or Create an account to join the conversation.

More
04 May 2023 11:45 #270634 by rodw
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.

Please Log in or Create an account to join the conversation.

More
04 May 2023 13:04 - 04 May 2023 13:04 #270638 by Epicenter02
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 :)
Last edit: 04 May 2023 13:04 by Epicenter02.
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

Time to create page: 0.311 seconds
Powered by Kunena Forum