Advanced Search

Search Results (Searched for: )

  • blazini36
  • blazini36
19 Jan 2025 06:17
Replied by blazini36 on topic Arduino IO Expansion

Arduino IO Expansion

Category: Show Your Stuff

I like the I2C IO expansion Idea. I don't have these chips here yet. As I am working on the next Version of Arduino Connector I would implement it in the newer version as it will improve on all the Issues learned from the current version, as it will also get rid of the #defines etc for the user.
Also I forgot to mention that the new Version already supports the connection to multiple Arduinos simultaneously.

If you would like to peek into it you can see it on Github in the dev branch, but keep in mind currently it doesn't work.
Here is a preview of how the new Yaml configuration looks like: github.com/AlexmagToast/LinuxCNC_Arduino...lob/dev/config2.yaml


 

Yeah I've seen the v2 but never tried it because it's mentioned in the repo that it doesn't currently work.

I got my Teensy 4.1 break out board working and that handles the encoders much better than the Arduino Mega. The Teensy doesn't have that many IO pins so I have an I2C expander right on the break out board in addition to the 4 expanders on the keypad, I've got that working too.

I'm using MCP23017 expanders on these but I've used PCF857x on other boards, they aren't pin compatible but the libraries are similar.

Right now I'm just looking at how Arduino-connector handles connection states. It seems that even the normal outputs don't reset when LinuxCNC is closed so things that were previously on (like LEDs) stay on. The same happens with the I2C outputs so I suppose it's expected.  Not sure if that's the intended behavior but I've trying to figure out how to reset all outputs (pull low) on disconnect. It's a bit hard to debug since there's only 1 serial connection referenced and it's taken over when LinuxCNC connects, but I have another serial port I can direct debug prints to.

Other than that it all seems to work pretty good, I found a blocking delay in the comalive function that was creating a bit of delay. I replaced that with a timer and it works much better. That plus the tweaks mentioned in the git issues, it's pretty responsive now.

Once I get done putzing around, I'll clean up my code a bit and upload it somewhere.
Displaying 19951 - 19951 out of 19951 results.
Time to create page: 0.481 seconds
Powered by Kunena Forum