I have questions about jm_servo_multi.spin2
RS_Jim
Posts: 1,764
@JonnyMac
I am planing on using your above object in my project . Do You see any problems If I have 2 servos that I am running with Microseconds info and I set the base as 0 and the count as 2 and run startx. Then the next 6 are angles and I set the base as 3 and the count as 6 and run start , is this going to work OK? I will of course use the correct mode in a write command to each servo. From studying your code it looks OK to me If I adhere to the rules.
Thanks
Jim
Comments
Jim: Can you attach the object you're using? Silly me, I seem to have overwritten the multi-version code with the single-version code in my library.
BTW, I am working on a port of my jm_servo8.spin (P1) that creates a servo cog for up to 8 servos and handles ramping, etc., with slightly better resolution (0.1us). Would that be better for your project? I think the code is done (will test).
Yes Jon,
The new code sounds perfect for my project. I am not at the same location as the file, but will attach and send soon.
Thanks
Jim
@JonnyMac
Back at computer attached is multi servo object.I like the servo cog concept and the ramping is great. I hope that I can intermix Us position and angle as I will need both.
Thanks
Jim
@JonnyMac
jon,
Do you also have a multi motor driver. The only motor driver I have found is jm_dc_motor.spin2, which is a single motor. I guess I could start 2 instances of it for 2 motors.
Jim
I kept the motor driver a singleton because it's cogless. You can use an array of objects, but I have only done that once in 16 years of Propeller programming. JonyJib uses that driver in their P2 based controller and we have to objects: panmotor and tiltmotor.
Give this a try and let me know if you run into anything out-of-sorts.
Will do.