A Teensy -> Python Interface Manualmatic MPG/pendant

More
24 Jan 2022 16:26 #232977 by fletch
OK, OK, I'm getting there! One final (?) Arduino Library to handle the touch screen offset entry and so the displayed button labels displayed will now respond when touched. Available now on github and should be in the Arduino Library Manager VSN.

Which means we can now have this:


And this:


Oh yes, and we have icons!

It's getting there but it is proving challenging to keep it within the capability Arduino IDE (and me). May have to move to PlatformIO at some point - but not yet.
 
Attachments:
The following user(s) said Thank You: tommylight, Pro_El

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

More
24 Jan 2022 16:57 #232980 by tommylight
Very nice, thank you.
The following user(s) said Thank You: fletch

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

More
26 Jan 2022 16:30 #233193 by sagreen
This is awesome! I've been looking for a while for something like this. I had just started creating my own libraries and source using Platform.IO and stumbled across this. Any interest in a joint development?

Thank you!
Scott...

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

More
26 Jan 2022 17:11 #233197 by fletch
Hi Scott, good to hear from you - had you asked me about a joint development between Christmas and New Year, I would have jumped at the chance but it's now Almost DoneTM - or at least I'm so very close to publishing the first release . However, once that happens, a code review (and review of my LinuxCNC understanding) would be *greatly* appreciated. Neither C++ or Python are my first languages and I only started playing with LinuxCNC and the end of last year... I took a very conscious decision to try to do all the Teensy coding within the Arduino IDE, as I believe it's likely to have the greatest user base  - that may well still bite me on the bum, so a move to PlatformIO is not off the cards yet.

This current phase already does all the 'normal' manual & auto control stuff - the next phase of 'understanding' is to try to make it also be a pseudo  'power feed' - ie move at a consistent speed along one axis while also retaining the ability to manually move the other two. If you can work out (or at least explain to me!) a way to do that... well, we'd be cooking on gas.

And then there's the MDI screen (peck drilling etc).

I have started a github repository here which currently has the 3D models for the proof-of-concept cradle. Hope to get the schematic up there in the next day or so (I've changed if to get an extra(!) switch in, so I have to rewire my prototype & make sure all the pins do the right things...

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

More
26 Jan 2022 17:23 #233198 by fletch
I forgot to ask - have you published your version? It would be good (for me, at least) to compare notes (ie for me to see how it's done properly...).

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

More
26 Jan 2022 18:09 - 26 Jan 2022 18:27 #233204 by sagreen

I forgot to ask - have you published your version? It would be good (for me, at least) to compare notes (ie for me to see how it's done properly...).

 

I've only started today, and found your page today :) I have the library installed and reading encoder ticks now. I do plan to hook it up to PathPilot today and get a feel for how to control it. What serial type are you using for the Teensy? Are all of your events turned into keypresses?

p.s. 3d printing your models now.

Thanks!
Scott...
Last edit: 26 Jan 2022 18:27 by sagreen.

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

More
26 Jan 2022 19:16 #233212 by fletch
Oh wow, you're keen! No pressure then...

I'm using the LinuxCNC Pyton Interface, so no keystrokes. Commands and payload (if required) are sent via Serial using a very simple (read: efficient) protocol - this allows both the interface and the pendant to maintain state fast enough for a user interface. 115200 baud on a Pi, so plenty of bandwidth.

In principle, the pendant is not restricted to talking just to LinuxCNC (although that is obviously the dialect it uses) so could interface to Tormach if you wrote an interface that translated to/from Serial over USB to whatever interface the machine has (Python, C, or whatever) and assuming Tormach would let you run it. I'm assuming you have a Tormach...?

I did briefly consider using G code as the interface protocol...

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

More
26 Jan 2022 19:47 #233216 by sagreen

Oh wow, you're keen! No pressure then...


Long story, but no I dont not have a Tormach machine. I have multiple machines that were previously running Mach3 that I have converted to PathPilot. So, I have quite a bit of experience at this point working with the .hal, .ini, and .py files that were created by Tormach to create the PP UI. C++ is my primary programming language. 

Scott...
 

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

More
26 Jan 2022 20:17 #233223 by fletch
I hadn't even heard of PathPilot before you mentioned it! Sooo much too learn!
And I'll definitely be looking forward to your feedback on my C++ & Python code.... I think...

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

More
27 Jan 2022 16:49 - 27 Jan 2022 16:49 #233283 by fletch
I have uploaded the schematic used by the code base and a small Arduino sketch to test the wiring is as expected: github.com/Stutchbury/Manualmatic-Pendan...main/Hardware/wiring
 
Last edit: 27 Jan 2022 16:49 by fletch.

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

Time to create page: 0.219 seconds
Powered by Kunena Forum