Matrix Keyboard controlling LinuxCNC

More
3 years 3 weeks ago #282700 by COFHAL
I already checked and I think the problem is in the Python file. When verifying the programming of the Arduino on the serial monitor, all the Lpots respond when the position is changed. but when running LNC the Lpots do not respond and are always at zero.

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

More
3 years 2 weeks ago - 3 years 2 weeks ago #283119 by panming
Hello Alex, I'm sorry to just start getting back to our work now.I successfully used the arduino.keypad component in linuxcnc.But arduino.mled shows that it is not writable, what conditions does he need to be writable? 
Last edit: 3 years 2 weeks ago by panming.

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

More
3 years 1 week ago - 3 years 1 week ago #283520 by AlexMagToast
Sorry, i didn't get notified by your replys for some reason.
@COFHAL i think you need to check the python file settings. They need to match the ones in the Arduino code.

@panming you found a bug. You can fix it by changing
c.newpin("mled.{}".format(port), hal.HAL_BIT, hal.HAL_OUT)
to

c.newpin("mled.{}".format(port), hal.HAL_BIT, hal.HAL_IN)

or updating to the latest version on Github.

cheers,
Alex
Last edit: 3 years 1 week ago by AlexMagToast.

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

More
3 years 1 week ago - 3 years 1 week ago #283618 by COFHAL
    

Attachment not found

I've already checked everything and I can't find the problem. I'm attaching my files so you can check if there is an error. I can't find it.

File Attachment:

File Name: arduino-co...10-23.py
File Size:17.42 KB

File Attachment:

File Name: LinuxCNC_A...0-23.txt
File Size:32.33 KB
Last edit: 3 years 1 week ago by COFHAL.

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

More
3 years 1 week ago #283714 by AlexMagToast
hmm, honestly i don't see anything wrong either.
Unfortunately i am traveling rigth now, so i don't have equipment with me to test your code.

Could you please try the DEBUG function in the py file? Set Debug = 1, save your file to usr/bin/arduino-connector and open Terminal. Also connect your Arduino to the pc.
Then run:
halrun
loadusr arduino-connector

Then you should see some messages when you play with the lpotis.
I'm curious, what you see then. I hope you can post some of it here.

greetings from Spain
- Alex

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

More
3 years 1 week ago #283724 by COFHAL
 

File Attachment:

File Name: DEBUGHALRUN.txt
File Size:2.69 KB
When you activate DEBUG and run arduino-connector from halrun, when playing with the lpot they respond without problem. Also when I run LCN from the console I see that the Lpot respond without problem.

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

Time to create page: 0.219 seconds
Powered by Kunena Forum