Thanks. It was crashing because of the Serial.printf("voltage %f\n", voltage);
maybe on execution it crashes there. Changed the printf to println and removed 'voltage %f\n' and it worked and gives both the pwm and the voltage. Amazing!
Thanks. It was crashing because of the Serial.printf("voltage %f\n", voltage);
maybe on execution it crashes there. Changed the printf to println and removed 'voltage %f\n' and it worked and gives both the pwm and the voltage. Amazing!