USB Accelerometer
-
Hello everyone,
a question. I found an interesting project "KUSBA" which allows to connect an accelerometer via USB for Klipper firmware:
https://github.com/xbst/KUSBA?_ga=2.70329625.846608309.1669791961-354117713.1669791961
I am wondering if a Duet3D board and firmware would also support accelerometers connected via USB, which eliminates the problems with SPI. We can call it "DUSBA".
Many thanks for everyone's help in advance!
-
@marcel-kastler I expect not. You'd need an SBC for that and most people run standalone
-
@marcel-kastler You could write your own SBC plugin to collect USB accelerometer data in SBC mode using a custom implementation of
M955
/M956
but we have no plans to support this officially. If you are concerned about SPI connectivity, you could also use a TOOL1LC with embedded accelerometer and capture accelerometer data via CAN provided you have a Duet 3. -
@chrishamm: Many thanks! Yes, I also run my Duet board standalone. I am afraid that I can not code well enough to do this. Let me start connecting an accelerometer in the traditional way! THANKS!
-
I'm currently running a mini with SBC and would live to be able to use the kusba with, although I have no idea where to even start with the plugin
-
@necrorat To get started with the basic structure of plugins, check out the SBC third-party docs. Currently you have two API libraries to write an SBC plugin with:
- .NET using DuetAPIClient
- Python using dsf-python
If you go with .NET, I suggest you have a look at the DuetPiManagementPlugin to see how G-codes like
M955
andM596
could be intercepted. For Python, check out the custom M-code example instead.