Created
November 25, 2016 20:34
-
-
Save johnty/a102c0ee31d535683631d77d028755e6 to your computer and use it in GitHub Desktop.
pigs servo test code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MAX=1700 | |
| MID=1500 | |
| MIN=1200 | |
| sudo pigpiod | |
| pigs pfs 18 50 # set pwm freq to 50 hz on BCM18 | |
| pigs servo 18 $MID # set servo pulsewidth to MID us on BCM18 | |
| sleep 1 | |
| pigs servo 18 $MIN # set servo pulsewidth to MIN on BCM18 | |
| sleep 1 | |
| pigs s 18 $MID | |
| sleep 1 | |
| pigs s 18 $MAX | |
| sleep 1 | |
| pigs s 18 $MID | |
| sudo pkill pigpiod |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment