diff --git a/CMakeLists.txt b/CMakeLists.txt index f9d47f6..292c585 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,7 @@ add_executable(Modele_RPiPico target_link_libraries(Modele_RPiPico hardware_uart + hardware_pwm pico_stdlib pico_multicore ) diff --git a/main.c b/main.c index ce2833b..890f148 100644 --- a/main.c +++ b/main.c @@ -4,11 +4,21 @@ * SPDX-License-Identifier: BSD-3-Clause */ #include "pico/stdlib.h" +#include "hardware/pwm.h" #include void main(void) { stdio_init_all(); + + gpio_set_function(25, GPIO_FUNC_PWM); + pwm_set_enabled(4, true); + pwm_set_chan_level(4, PWM_CHAN_B, 30000); + + + + + while(1){ printf("Exemple\n"); sleep_ms(1000);