Change $1=255 $21=0
In PicSender, press the ? button. you should see an output similar to this one:
The numbers immediately following the" Pin:" are the state of the homing switches. The order is ZYX.
With all zeros then no homing switch is triggered.
Does it show any switch triggered?
If you have Pin:100 that means the Z axis homing switch is tripped.
Hold the Z axis homing switch closed and press the ? button again and see if grbl sees the switch as tripped.
Do this for the X and Y axis switch as well.
Does grbl recognize a switch change on all axes?
Does the alignment of the Z axis switch look like this?