diff --git a/src/led/external-led.md b/src/led/external-led.md index b3e198e..18b39dc 100644 --- a/src/led/external-led.md +++ b/src/led/external-led.md @@ -25,3 +25,27 @@ In the code, all you have to do is change the GPIO number from 2 to 5. let led = peripherals.GPIO5; ``` +## High speed channel +There's no fun in just changing one line. Let's use high-speed channel this time. To do that, we have to pass `HighSpeed` struct and update the clock source to use the `HSClockSource` enum. + +```rust +let ledc = Ledc::new(peripherals.LEDC); + +let mut hstimer0 = ledc.timer::(timer::Number::Timer0); +hstimer0 + .configure(timer::config::Config { + duty: timer::config::Duty::Duty5Bit, + clock_source: timer::HSClockSource::APBClk, + frequency: 24.kHz(), + }) + .unwrap(); +``` + + +## Clone the existing project +You can also clone (or refer) project I created and navigate to the `led-highfader` folder. + +```sh +git clone https://github.com/ImplFerris/esp32-projects +cd esp32-projects/led-highfader +``` diff --git a/src/projects.md b/src/projects.md new file mode 100644 index 0000000..83afe0c --- /dev/null +++ b/src/projects.md @@ -0,0 +1,8 @@ +# Curated List of Projects Written in Rust for ESP32 + +Here is a curated list of projects I found online that are interesting and related to ESP32 and Rust. If you have some interesting projects to showcase, please send a PR :) + +- [Solar Inverter](https://github.com/Orange-Murker/solar_inverter): Grid-Tie Solar Inverter with MPPT + + +