PID call always returns zero.

I’m trying to use PID control to control AC outputs of up to 220 volts. I found a youtube video where a fellow used pwm and a Mosfet circuit to control the voltage powering a light bulb. I built the circuit
and it will work fine. I wanted to control the power output, however, based on a setpoint of light in the room and I wanted to do it with PID control. The code below basically comes from another Youtube video by logMaker 360. When I run the test, however, the output from the myPID.Compute(); is always zero. Do you have any idea what might be causing this? Is the PID_v1.h no longer active for example? I’ve struggled with this for some time. Please help if you can.

 * This sketch starts with this video:
 * written by Moz for YouTube channel logMaker 360
 * on 4-12-2017.  I've changed the input to be A0 and the control output to be digital pin 9.


double Setpoint;  // This is the desired value
double Input;  // This will be the input from the photoresistor
double Output;  // This is the output from the PID controller that drives the load, we will use an LED initially
const int photores = A0;  // Photo resistor is wired to pin A0
const int led = 9;  // This will be the output pin to have the pwm output

//PID initial parameters from Moz are 0,10,0 for the LED control
double Kp = 0, Ki = 1, Kd = 0;

//create PID instance
PID myPID(&Input,&Output,&Setpoint,Kp,Ki,Kd,DIRECT);

void setup() {
  // put your setup code here, to run once:
  //Hardcode the brightness value, DrBobEEPE will later put this on a pot
  Setpoint = 75;
  //Turn the PID on
  //Adjust PID Values

void loop() {
  // put your main code here, to run repeatedly:
  //Read the value from the light sensor.  Analog input: 0 t0 1024 and this should be mapped to 0 to 255 as it is used for our PWM function
  Input = map(analogRead(photores),0,1024,0,255);  // photoresistor is on pin A0
  //Calculate PID output
  Input = 78;
  //Write the output (process control output) as calculated by the PID function
  analogWrite(led,Output);  //LED for Moz is set to digital pin 9. This is a pwm pin.
  //Serial data for plotting
  Serial.print(" ");
  Serial.print(" ");
  delay (1000);

You set Kp to zero, that's the one parameter that must never be zero.

I set Kp to 0.1 and Ki to 0.1 and still get an output of zero from the call to the PID.

Ah, you've not changed the output limits, so they are 0..255.

As your input is already greater than the set point its trying to output negative values, which
are clipped to zero by the output limits.

I think you have something there. Will check it out. Thanks.