Esp32 Pulse Counter Arduino