* Add Config * Add Cache and remove pre-commit action * [pre-commit.ci lite] apply automatic fixes * Remove freeze * Fix * Update action * Use latest stable Python 3 version * Improve caching * Improve cache tag * Improve bot message * fix(typos): Fix typos * fix(typos): Fix more typos * refactor(udp_server): Convert script from Python 2 to 3 * Fix whitespace * Clang-format fixes * Prettier fixes * Black formatting * Manual fixes * Line endings * Fix flake and make Vale manual * Fix flake and reformat --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
14 lines
279 B
C++
14 lines
279 B
C++
void setup() {
|
|
//setup on pin 18 with frequency 312500 Hz
|
|
sigmaDeltaAttach(18, 312500);
|
|
//set pin 18 to off
|
|
sigmaDeltaWrite(18, 0);
|
|
}
|
|
|
|
void loop() {
|
|
//slowly ramp-up the value
|
|
//will overflow at 256
|
|
static uint8_t i = 0;
|
|
sigmaDeltaWrite(18, i++);
|
|
delay(100);
|
|
}
|