Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move example on uArm swift pro? #37

Open
Meladoo opened this issue May 4, 2018 · 5 comments
Open

Move example on uArm swift pro? #37

Meladoo opened this issue May 4, 2018 · 5 comments

Comments

@Meladoo
Copy link

Meladoo commented May 4, 2018

Hello there,
Do you know how can I perform a similar code to your move example on the uArm Swift Pro? I need to move the swift pro but can not manage.

@dcorboy
Copy link
Collaborator

dcorboy commented May 7, 2018

Are you trying to port the movement code itself, as a library to be used by uArm Swift Pro?

The Metal code is not very portable and some of the math is based specifically on the geometry of the Metal. If I were doing the port, I would copy the code over and then begin translating the parts that are specific to Metal over to Swift Pro versions.

@Meladoo
Copy link
Author

Meladoo commented May 7, 2018

Yes, I tried that. The problem is I am struggling to find the swift pro version methods/commands that will accommodate with this code. (espically service.setButtonService and moveto which seems to be removed)
Thanks anyway.

@dcorboy
Copy link
Collaborator

dcorboy commented May 7, 2018 via email

@Meladoo
Copy link
Author

Meladoo commented May 7, 2018

Quick look into the library and I found the servos code.
These are the links:

https://github.com/uArm-Developer/SwiftProForArduino/blob/develop/lib/Marlin/uArmServo.h
https://github.com/uArm-Developer/SwiftProForArduino/blob/develop/lib/Marlin/uArmServo.cpp

Sorry that I am not an Arduino expert, but will I be able to move the swift pro by putting the servo command in place of the moveTo ?

@dcorboy
Copy link
Collaborator

dcorboy commented May 7, 2018

Yes, those files (and others) would allow you to recreate something like the uArm Metal functionality using Swift Pro.

However, it is a bigger task than you may think. Metal has the notion of a 'calibration' that Swift Pro does not seem to use. This, and some other details suggest that you'll need to really examine how the current Swift Pro servo code (Marvin) is working before you start writing directly to servos (they can EASILY be burned out with bad programming, I've done it! :)

I don't know if the Swift Pro has the same arm geometry as Metal. If not, all the mathematics of computing position from servo angle (and vice versa) will change.

Finally, since I also assume that the Arduino and pinouts change between the models, all of those changes would need to be done as well.

That said, it would be a great thing for Swift Pro experimenters to have (which is why I did it for Metal). And most of the cool stuff is more portable and wouldn't need modification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants