Okay so I fixed the endstop logic but am still having troubles with the bltouch. I can get it to home the x and y but when it goes to home the z it says the z probe is already triggered. Here are the lines from my config.g for the bltouch. I've tried setting p as both 5 and 4 just but neither work.
[[language]]
M307 H3 A-1 C-1 D-1
M558 P5 X0 Y0 Z1 H3 F200 T5000
G31 X-20.0 Y20.0 Z0 P25
I am also having an issue with thermal runaways. When heating my hotend, I configured it so it heats slowly but even when it hits its target temperature it continues to heat. The entire time it is heating up, it does so in bursts. I dont know how to configure the pid properly please help.
[[language]]
M305 P0 T100000 B3950 R4700 H0 L0
M305 P1 T100000 B3950 R4700 H0 L0
M305 P2 T100000 B3950 R4700 H0 L0
M301 H1 P0.1 I0.10 D100 T0.10 S1
M301 H2 P0.1 I0.10 D100 T0.10 S1