-
Notifications
You must be signed in to change notification settings - Fork 1
Minimal example for running PWM with custom frequency #1
Comments
The library can certainly do that too simple job, provided you know how to program and use it. Good Luck, |
Ok no worries, the point was not to get you to write code for me, Cheers |
### Releases v1.2.0 1. Fix `multiple-definitions` linker error. Drop `src_cpp` and `src_h` directories 2. Add support to `MegaCoreX` core, including ATmega4809, ATmega4808, ATmega3209, ATmega3208, ATmega1609, ATmega1608, ATmega809 and ATmega808 3. Improve accuracy by using `float`, instead of `uint32_t` for `dutycycle`. Check [Change Duty Cycle #1](khoih-prog/ESP8266_PWM#1 (comment)) 4. DutyCycle to be optionally updated at the end current PWM period instead of immediately. Check [DutyCycle to be updated at the end current PWM period #2](khoih-prog/ESP8266_PWM#2) 5. Optimize library code by using `reference-passing` instead of `value-passing` 6. Add example [multiFileProject](examples/multiFileProject) to demo for multiple-file project 7. Update examples accordingly
### Releases v1.2.0 1. Fix `multiple-definitions` linker error. Drop `src_cpp` and `src_h` directories 2. Add support to `MegaCoreX` core, including ATmega4809, ATmega4808, ATmega3209, ATmega3208, ATmega1609, ATmega1608, ATmega809 and ATmega808 3. Improve accuracy by using `float`, instead of `uint32_t` for `dutycycle`. Check [Change Duty Cycle #1](khoih-prog/ESP8266_PWM#1 (comment)) 4. DutyCycle to be optionally updated at the end current PWM period instead of immediately. Check [DutyCycle to be updated at the end current PWM period #2](khoih-prog/ESP8266_PWM#2) 5. Optimize library code by using `reference-passing` instead of `value-passing` 6. Add example [multiFileProject](examples/multiFileProject) to demo for multiple-file project 7. Update examples accordingly
### Releases v1.2.0 1. Fix `multiple-definitions` linker error. Drop `src_cpp` and `src_h` directories 2. Add support to `MegaCoreX` core, including ATmega4809, ATmega4808, ATmega3209, ATmega3208, ATmega1609, ATmega1608, ATmega809 and ATmega808 3. Improve accuracy by using `float`, instead of `uint32_t` for `dutycycle`. Check [Change Duty Cycle #1](khoih-prog/ESP8266_PWM#1 (comment)) 4. DutyCycle to be optionally updated at the end current PWM period instead of immediately. Check [DutyCycle to be updated at the end current PWM period #2](khoih-prog/ESP8266_PWM#2) 5. Optimize library code by using `reference-passing` instead of `value-passing` 6. Add example [multiFileProject](examples/multiFileProject) to demo for multiple-file project 7. Update examples accordingly
### Releases v1.2.0 1. Fix `multiple-definitions` linker error. Drop `src_cpp` and `src_h` directories 2. Add support to `MegaCoreX` core, including ATmega4809, ATmega4808, ATmega3209, ATmega3208, ATmega1609, ATmega1608, ATmega809 and ATmega808 3. Improve accuracy by using `float`, instead of `uint32_t` for `dutycycle`. Check [Change Duty Cycle #1](khoih-prog/ESP8266_PWM#1 (comment)) 4. DutyCycle to be optionally updated at the end current PWM period instead of immediately. Check [DutyCycle to be updated at the end current PWM period #2](khoih-prog/ESP8266_PWM#2) 5. Optimize library code by using `reference-passing` instead of `value-passing` 6. Add example [multiFileProject](examples/multiFileProject) to demo for multiple-file project 7. Update examples accordingly
Hi,
I am quite new to arduino and need to run PWM with a custom frequency on a pin in a precisely timed fashion at a slow frequency (30/100Hz) on an arduino nano every in an experimental setup (I work in a neuroscience lab).
I guess this toolbox could help doing so, I am however a bit confused by the provided examples which are relatively complex.
I for instance managed to do something similar on an arduino uno using the Arduino PWM Frequency Library (which is unfortunately not compatible with arduino nano every). Using this library, I was for instance able to run PWM at 100Hz with a duty cycle of 50% on pin 3 using:
Would it be possible to provide a similar minimal example for setting up the frequency/duty cycle and running/stopping PWM on a given pin ? Or did I misunderstand the purpose of this library and should I use a different one ?
Thanks !
rfayat
The text was updated successfully, but these errors were encountered: