Imagecraft PWM servos
x5aint
Posts: 4
Hi,
I was wondering if Imagecraft for the propeller has built-in C functions that can be used to control the speed of a DC motor or a servo. I am used to coding a micro-controller that goes by the name of DRAGON-12Plus(MC9S12DG256)HCS12. For example if I want to set the speed and PWM for 10 ms period I would use the following C functions for the DRAGON12Plus:
So I was wondering if someone can point me towards the right direction on how to to this with propeller using imagcraft (C-language). Do I use the following?:
Thanks
x5aint :skull:
I was wondering if Imagecraft for the propeller has built-in C functions that can be used to control the speed of a DC motor or a servo. I am used to coding a micro-controller that goes by the name of DRAGON-12Plus(MC9S12DG256)HCS12. For example if I want to set the speed and PWM for 10 ms period I would use the following C functions for the DRAGON12Plus:
motor0_init() //PWM with 10 ms period motor0(int speed) //Set speed of motor0 (0-255)and to controller a servo
servo54_init()// initialize PWM with 20 ms period set_servo76(int width) //set servo position (3300 - 5700)
So I was wondering if someone can point me towards the right direction on how to to this with propeller using imagcraft (C-language). Do I use the following?:
void clkset(int mode, int frequency)
Thanks
x5aint :skull: