You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

34 lines
542 B

  1. #include <stdio.h>
  2. #include <errno.h>
  3. #include <string.h>
  4. #include <wiringPi.h>
  5. #include <softServo.h>
  6. int main ()
  7. {
  8. if (wiringPiSetup () == -1)
  9. {
  10. fprintf (stdout, "oops: %s\n", strerror (errno)) ;
  11. return 1 ;
  12. }
  13. softServoSetup (0, 1, 2, 3, 4, 5, 6, 7) ;
  14. softServoWrite (0, 0) ;
  15. /*
  16. softServoWrite (1, 1000) ;
  17. softServoWrite (2, 1100) ;
  18. softServoWrite (3, 1200) ;
  19. softServoWrite (4, 1300) ;
  20. softServoWrite (5, 1400) ;
  21. softServoWrite (6, 1500) ;
  22. softServoWrite (7, 2200) ;
  23. */
  24. for (;;)
  25. delay (10) ;
  26. }