Advertisement
Guest User

Untitled

a guest
Sep 20th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <wiringPi.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include <stdint.h>
  5.  
  6. int main (void)
  7. {
  8.   printf ("Raspberry Pi wiringPi test program\n") ;
  9.  
  10.   if (wiringPiSetupGpio() == -1)
  11.     exit (1) ;
  12.  
  13.   pinMode(18,PWM_OUTPUT);
  14.   pwmSetClock(2);
  15.   pwmSetRange (10) ;
  16.   pwmWrite (18, 5);
  17.  
  18. for (;;) delay (1000) ;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement