Advertisement
savageautomate

WiringPi Frequency Test Program

Jan 9th, 2013
919
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.42 KB | None | 0 0
  1. /*
  2.  * frequency-test.c:
  3.  *      Simple test program to mearure GPIO update frequency
  4.  */
  5.  
  6. #include <wiringPi.h>
  7.  
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10. #include <stdint.h>
  11.  
  12. int main (void)
  13. {
  14.   printf ("Raspberry Pi Frequency test program\n") ;
  15.  
  16.   if (wiringPiSetup () == -1)
  17.     exit (1) ;
  18.  
  19.   pinMode (1, OUTPUT) ;
  20.  
  21.   for (;;)
  22.   {
  23.     digitalWrite(1,1);
  24.     digitalWrite(1,0);
  25.   }
  26.  
  27.   return 0 ;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement