// Refactor the LED fading code such that the level of fading can be controlled by an input potentiometer
// (same as the one used in the ADC questions).
#![no_std]
#![no_main]
use esp_backtrace as _;
use esp_println::println;
use esp_hal::{clock::ClockControl, peripherals::Peripherals, prelude::*, Delay};
#[entry]
fn main() -> ! {
let peripherals = Peripherals::take();
let system = peripherals.SYSTEM.split();
let clocks = ClockControl::boot_defaults(system.clock_control).freeze();
let mut delay = Delay::new(&clocks);
println!("Hello world!");
loop {
println!("Loop...");
delay.delay_ms(500u32);
}
}
Loading
esp32-c3-devkitm-1
esp32-c3-devkitm-1