raspberrypi:wiringpi:softpwm
This is an old revision of the document!
#include <wiringPi.h> #include <softPwm.h> int main (void) { //wiringPiSetup () ; wiringPiSetupGpio(); //pinMode(2,OUTPUT); //digitalWrite(18,LOW); //pinMode (2, PWM_OUTPUT ) ; softPwmCreate(2, 100, 100); //softPwmCreate (21, 0, 1024) ; for (int i=0;i<100;i++) { //pwmWrite(2, i) ; softPwmWrite (2, i); delay (20) ; //digitalWrite (21, LOW) ; delay (500) ; } return 0 ; }
raspberrypi/wiringpi/softpwm.1485538992.txt.gz · Last modified: by aistis
