Comments (2)
Hi tahanjokunimi,
Thanks for checking out dma_pwm and leaving a question.
The behavior that you describe in the first bullet point indicates an incorrectly set pulse width. I'm guessing that you did not update the config_pwm(int pages, float pulse_width)
function call (found at the beginning of the test script) when changing the frequency to 100 Hz.
The test script sets pulse width to LED_PULSE_WIDTH
. This maps to 10e3 us (or 10 ms) and is suitable for the frequency range 0.05 Hz - 10 Hz. If you would like to set a frequency outside this range, you can either calculate a pulse width or use one of the following presets:
DEFAULT_PULSE_WIDTH
: 100 Hz - 20 kHzSERVO_PULSE_WIDTH
: 50 Hz - 10 kHzMOTOR_PULSE_WIDTH
: 5 kHz - 1 MhzLED_PULSE_WIDTH
: 0.05 Hz - 10 Hz
See raspberry_pi_dma_pwm.pdf page 5 & 6 and "dma_pwm_pulse_width_calculator.xlsx" for a discussion on how to calculate this for yourself.
The behavior described in the second bullet point is something I'm going to look into further so let me get back to you on that.
from dma_pwm.
Hi tahanjokunimi,
I have just pushed a fix for the frequency issue that you discovered. Thank you for bringing it to my attention!
from dma_pwm.
Related Issues (5)
- dma_pwm for other than raspberry pi ? HOT 4
- Conflict with ws281x HOT 2
- Raspi 4 HOT 2
- pi 4B with Ubuntu Desktop 22.04.1 LTS HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dma_pwm.