@felmue Super, now it works! Thanks, Hans
@felmue , I tried your proposal with Arduino IDE and my M5Stack Paper:
but get an error :
invalid conversion from 'int' to 'gpio_num_t' [-fpermissive]
Whats going wrong?