A simple hardware PWM control system for Orange Pi zero 2W using WiringOP and Python.
- Clone the repository
git clone https://github.com/N-rwal/OrangePi-PWM-Control.git
cd OrangePi-PWM-Control
- Install WiringOP (if not already installed)
sudo apt update
sudo apt install wiringpi
Test with: gpio readall
- Build the C library
./build.sh
- Run the Python script
python3 pwm_control.py
The example script will generate a sweeping PWM signal up to 12% at 50 Hz on the wPi pin 21 which is the PMW1 pin.
Suitable for a servo.
Custom Usage
Modify pwm_control.py to set different PWM pins, frequencies, or duty cycles.


