Quantcast
Channel: banana pi single board computer open source project official forum BPI team - Latest posts
Viewing all articles
Browse latest Browse all 43631

BPI-M1+ wiringPi PWM

$
0
0

#include <wiringPi.h>
//
// by MikuQ(i@mikuq.com) 2016-5-26
//
int main(void)
{
  int bright ;
  wiringPiSetup() ;
  pinMode (7, PWM_OUTPUT) ;
  for (;; )
  {
    for (bright = 0 ; bright < 1024 ; bright+=5)
    {
      pwmWrite (7, bright) ;
      delay (1) ;
    }

    for (bright = 1023 ; bright >= 0 ; bright-=5)
    {
      pwmWrite (7, bright) ;
      delay (1) ;
    }
  }
}

only 200Hz


Viewing all articles
Browse latest Browse all 43631

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>