|
Re: Raspberry Pi as robot controller
How are you generating the PWM signal to the Jag and servo? Is it one of the following, or something else?
- does the Pi have built-in hardware support for generating PWM signals on the GPIO pins so all you have to do is configure the period for each channel and then provide a pulse width for each channel?
or
- continuously poll a clock and turn GPIO on/off for each of the two PWM channels as appropriate based on the respective joystick inputs
or
- use a fixed-period interrupt with a counter and a state machine to turn GPIO on/off to turn the GPIO on/off
or
- use a fixed-period interrupt (at the desired period of the PWM) which turns the GPIO on and then enables a one-shot interrupt to turn the GPIO off
or something else?
|