Search found 3 matches
- Thu Nov 08, 2018 3:41 pm
- Forum: ESP32 Arduino
- Topic: controlling pwm output with a timer interrupt
- Replies: 5
- Views: 14041
Re: controlling pwm output with a timer interrupt
I will try to switch to esp-timer in the future. I found a quick solution. I am changing duty value with timer interrupt (called duty_timer :D ) Main loop checks all the time if duty_timer has changed or not. I know it is not the best way. But does it sound terrible? Here is code #include <Wire.h> #...
- Thu Nov 08, 2018 3:22 am
- Forum: ESP32 Arduino
- Topic: controlling pwm output with a timer interrupt
- Replies: 5
- Views: 14041
Re: controlling pwm output with a timer interrupt
@ESP_Sprite
Thanks for your response. I realized that i posted on wrong topic. It should be in ESP32 Arduino topic
Anyway, i am using Arduino IDE. Can i use high resolution timer functions in Arduino IDE?
Thanks for your response. I realized that i posted on wrong topic. It should be in ESP32 Arduino topic
Anyway, i am using Arduino IDE. Can i use high resolution timer functions in Arduino IDE?
- Thu Nov 08, 2018 2:20 am
- Forum: ESP32 Arduino
- Topic: controlling pwm output with a timer interrupt
- Replies: 5
- Views: 14041
controlling pwm output with a timer interrupt
Hi all, I am new on forum and also in ESP32. I am using "ledcWrite" command to generate constant frequency, variable duty square wave output.It works fine. I also need to control this pwm with a timer. For example pwm should be enable for 1 second then disable for 1 second. When pwm control function...