Search found 2 matches
- Wed Nov 13, 2019 9:17 pm
- Forum: ESP-IDF
- Topic: How do I measure a pulse width with microsecond precision?
- Replies: 1
- Views: 8101
How do I measure a pulse width with microsecond precision?
I want to interface a HC-SR04 ultrasonic sensor with ESP32, and to do that, I need to measure the pulse width of the ultrasonic sensor to microsecond precision, and in Arduino there is pulseIn() function which do exactly that. The problem is that this is for a university course and Arduino libraries...
- Thu Oct 31, 2019 8:08 am
- Forum: ESP-IDF
- Topic: [Resolved] How to use ESP32 timer in ESP-IDF?
- Replies: 0
- Views: 8635
[Resolved] How to use ESP32 timer in ESP-IDF?
I'm using DOIT ESP32 dev1 board with PlatformIO IDE and ESP-IDF framework, and I'm trying to blink the on board LED connected to GPIO pin 2 using timer interrupts, but for some reason the LED is stuck on and won't blink. Here is the code: #include <stdio.h> #include "freertos/FreeRTOS.h" #include "f...