Skip to content

Dart implementation of the Wiring Pi Software PWM library.

License

Notifications You must be signed in to change notification settings

matzesoft/wiring_pi_soft_pwm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wiring Pi Software PWM

Dart implementation of the Wiring Pi Software PWM library.

I mainly created this package for one of my own projects, so I haven't done a lot of testing yet. But I still hope this makes the creation of your flutter-pi app (or whatever you create) easier.

Installing Wiring Pi

Visit this guide to install the Wiring Pi library on your Raspberry Pi. If your are using a Raspberry Pi 4B you might also check this post.

The library (.so file) should be located under /usr/lib/libwiringPi.so.

Using the package

First create the SoftPwmGpio. It takes the the pin of the GPIO. Afterwards call the setup method.

final pwmGpio = SoftPwmGpio(12);
pwmGpio.setup();

The SoftPwmGpio is now setup and ready to use. You can use the write method to set the PWM duty cycle. The method only allows values between 0 and 100.

pwmGpio.write(50);

About

Dart implementation of the Wiring Pi Software PWM library.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages