Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/csbluechip/flipperzero_plugin_pwm
PWM demo for Speaker, LED, IR Array, and GPIO
https://github.com/csbluechip/flipperzero_plugin_pwm
Last synced: 1 day ago
JSON representation
PWM demo for Speaker, LED, IR Array, and GPIO
- Host: GitHub
- URL: https://github.com/csbluechip/flipperzero_plugin_pwm
- Owner: csBlueChip
- License: mit
- Created: 2022-08-22T03:46:39.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-20T13:05:52.000Z (about 2 years ago)
- Last Synced: 2023-03-02T12:06:11.474Z (over 1 year ago)
- Language: C
- Size: 31.3 KB
- Stars: 11
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WARNING
This application *__currently__* requires a patch to the Flipper exports to make it work as a FAP ...An issue has been raised: https://github.com/flipperdevices/flipperzero-firmware/issues/1747 ...It has been acknowledged on Discord, and expected to be resolved before FAP v1.0 is officially released.
WORKAROUND:
* EITHER: edit `firmware/targets/f7/api_symbols.csv` and:
* for `calloc` change:
* `Function,-,calloc,void*,"size_t, size_t"` to
* `Function,+,calloc,void*,"size_t, size_t"`
* for `LL_TIM_DeInit` change:
* `Function,-,LL_TIM_DeInit,ErrorStatus,TIM_TypeDef*` to
* `Function,+,LL_TIM_DeInit,ErrorStatus,TIM_TypeDef*`
* OR: paste these commands to edit the file inline
* `sed -i 's/\(Function,\)-\(,calloc,.*\)/\1+\2/' firmware/targets/f7/api_symbols.csv`
* `sed -i 's/\(Function,\)-\(,LL_TIM_DeInit,.*\)/\1+\2/' firmware/targets/f7/api_symbols.csv`
* THEN: Update the firmware on the Flipper
* `cd /path/to/flipper/`
* `./fbt flash_usb`
To review the code as a PLUGIN, please see this checkin: https://github.com/csBlueChip/FlipperZero_plugin_PWM/tree/16ab64c8c9a840813aadf60583acc595b79793fb# FlipperZero PWM Demo (FAP)
This will allow you to configure a PWM timer {Frequency, Duty Cycle, Duty Scaling Curve} and attach it to a GPIO Pin.
You can currently select from:
* PB8 - Internal Speaker
* PB9 - Internal IR LED Array
* PB3 - External GPIO PinInternal LED, and Brightness scaling are currently not written.
```
cd ~/path/to/flipperDevKit/
mkdir -p applications_user/bc_pwm_demo
pushd applications_user/bc_pwm_demo
git clone https://github.com/csBlueChip/FlipperZero_plugin_PWM.git ./
popd
./fbt launch_app APPSRC=applications/bc_pwm_demo
```
More details here: https://github.com/csBlueChip/FlipperZero_plugin_howto