// how to define the external input pin to be measured? (GPIO pin)
#include “driver/mcpwm.h”
//====================================================================================
void setup(void)
{
Serial.begin(115200);
mcpwm_gpio_init(MCPWM_UNIT_0, MCPWM0A, GPIO_OUT);
mcpwm_capture_enable(MCPWM_UNIT_0,MCPWM_SELECT_CAP0, MCPWM_NEG_EDGE, 0);
}
//==================================================================================
void loop()
{
unsigned int nombre= mcpwm_capture_signal_get_value(MCPWM_UNIT_0,MCPWM_SELECT_CAP0);
Serial.println(nombre);
}
Hi.
I’m not sure I understand your question.
Can you try to better describe your issue?
Regards,
Sara