Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/clusterm/omega2-pwm
Simple program to control hardware PWM on Omega2
https://github.com/clusterm/omega2-pwm
Last synced: about 1 month ago
JSON representation
Simple program to control hardware PWM on Omega2
- Host: GitHub
- URL: https://github.com/clusterm/omega2-pwm
- Owner: ClusterM
- License: gpl-3.0
- Created: 2017-07-21T21:48:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-02-20T18:56:56.000Z (11 months ago)
- Last Synced: 2024-11-24T19:48:12.439Z (about 2 months ago)
- Language: C
- Size: 17.6 KB
- Stars: 23
- Watchers: 3
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Omega2 PWM
This is simple program to control hardware PWM on Omega2. For some reason Omega2 has not any util to control **hardware** PWM. There is only **fast-gpio** tool, it uses software PWM which is awful for sound generation.## Usage
Channel #0 is pin #18, channel #1 is pin #19. Channels #2 and #3 are available on Omega2S only (UART2 pins).
Before usage you must set GPIO muxing using **omega2-ctrl** tool:
omega2-ctrl gpiomux set pwm0 pwm
oromega2-ctrl gpiomux set pwm1 pwm
Then use this tool:
pwm [duty]
Example to generate 3000Hz on channel #1 with 50% duty:
pwm 1 3000 50