sample-simplepio
sample-simplepio copied to clipboard
how to control more than 2 servos?
how to control more than 2 servos?because there were only two pwm(pwm0 and pwm1)
If you require additional peripherals, you can find a peripheral to expand the number of available PWM outputs. Additionally, you could interface with a motor driver, which specifically is meant to drive a set of motors.
Can we use the GPIO port to simulate PWM output in Android Things.Like this:
void servo_pulse(int myangle) { int PulseWidth; PulseWidth = (myangle * 11) + 500; digitalWrite(ServoPin, HIGH); delayMicroseconds(PulseWidth); digitalWrite(ServoPin, LOW); delay(20 - PulseWidth / 1000); return; }
I can't make the thread to sleep 0.5ms in Android Things.
The GPIO control in Android Things doesn't have the level of precision that you may want for high frequency PWM.