I’m currently trying to control a servo, more specifically I will send the signal to an Actuinox LAC which will in turn controll a linear actator with potentiometer feedback, using the hServo pins on the Core2 and want to do this programatically.
The user will input a height which I will calculate to get the correct PWM signal.
Now before I dive too deep into this and end up with an overly complicated solution to this, I wanted to ask if you could recommend a way to control the signal going to the hServo pin.
Since you could controll the wheels out of the box is there something siilar for the other pins or do I need to download a library or something similar for this?
Hi,
To control hServo pins you would need to modify the default ROSbot firmware: https://github.com/husarion/rosbot-firmware-new. Basically you have to configure PWM for pin/pins you plan to use and add a ROS interface (topic) to control duty cycle.
However, I’ve planned to add this feature to the default firmware, so if you don’t mind waiting a little bit I will add it in the next update (possibly today or tomorrow). An instruction on how to use this functionality will be added to the project’s README file.