We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi I am trying to simulate PWM by writing this code to run a servomotor
#!/usr/bin/env php <?php require 'vendor/autoload.php'; use PhpGpio\Gpio; $gpio = new GPIO(); $gpio->output(18,0); while(true) { $gpio->output(18,1); usleep(1500); $gpio->output(18,0); usleep(2000000); }
but the servo is not working, a similar code is written in python on this video and it is working: http://www.youtube.com/watch?v=ddlDgUymbxc&feature=youtu.be
any ideas?
The text was updated successfully, but these errors were encountered:
I suspect you'll find that sysfs isn't fast enough to toggle the pin state that quickly. You're probably better off using the hardware PWM.
sysfs
Sorry, something went wrong.
No branches or pull requests
Hi
I am trying to simulate PWM by writing this code to run a servomotor
but the servo is not working, a similar code is written in python on this video and it is working: http://www.youtube.com/watch?v=ddlDgUymbxc&feature=youtu.be
any ideas?
The text was updated successfully, but these errors were encountered: