ESP32 microcontroller programming principles for pulse train to VIC