CubeCell LoRa+reading PWM from sensor

When asking for help with a board you should at least provide information about your hardware.
While the topic title mentions CubeCell there is no mentioning what CubeCell board/harware you are using.

CubeCell is a product family consisting of different hardware products, not one single product.
See Heltec CubeCell - part 2