The PINDA 2 has 4 cables.
White is the thermistor. You can connect it to Thermistor 2 on your Duet Wifi board.
Black is the signal for the probe and goes into Z Probe in.
Blue is ground an brown is +5V which you can "steal" from anywhere. I did chose to used the 5V/GRND from the expansion PINs on the board because they are right to each other.
If you use the stock PINDA position you can use my config code:
; Z-Probe PINDA
M574 Z1 S2 ; Set endstops controlled by probe
M558 P5 C"^zprobe.in" I1 H0.7 F1000 T6000 A20 S0.005 ; PINDA
M308 S2 P"e1_temp" A"PINDA" Y"thermistor" T100000 B3950
G31 P1000 X23 Y5 Z0.985 ; PEI Sheet Offset C0.0010 S20 H2
;G31 P1000 X23 Y5 Z1.315 ; Textured Sheet Offset
M557 X24:221 Y10:195 P9 ; Define mesh grid
As for the temperature compensation.
For G31 there are S and C parameter available for that.
From the documentation:
Cnnn Temperature coefficient^2
Snnn Calibration temperature^2
2Optional parameters 'S' (temperature in oC at which the specified Z parameter is correct, default is current temperature) and 'C' (temperature coefficient of Z parameter in mm/oC, default zero) can be set. This is useful for probes that are affected by temperature. In RRF2 the bed temperature reading is used. In RRF3 you must specify which temperature sensor to use in the H parameter.
Unfortunately there is no example or way described how to use those parameters exactly.
What I did was, I chose a location where I expect no warping of the heat bed, removed the sheet and probed directly over the bottom left screw. That is the location the Prusa stock FW does also do it's temperature calibration.
Then I did measure my Z height at 35°C, 40°C, 45°C and 50°C PINDA temperature.
The problem then I had was that the inaccuracy wasn't linear but I think the "Temperature coefficient" parameter assumes that it is.
That is why PRUSA does save a specific Z offest value for the specific temperatures in a table and uses it when the temperature has been reached.
I already posted a possible solution in another thread:
https://forum.duet3d.com/topic/13516/conditional-gcode-and-object-model-variables/64?_=1592403073563
TL:DR
if PINDA_Thermistor <25°C {
G31 P1000 X23 Y5 Z0.995
}
else if PINDA_Thermistor >=25° AND PINDA_Thermistor <30° {
G31 P1000 X23 Y5 Z1.005
}
else if PINDA_Thermistor >=30°C AND PINDA_Thermistor <35° {
G31 P1000 X23 Y5 Z1.020
}
.
. and so on...
else {
G31 P1000 X23 Y5 Z2.0 ; safety height
}
What we need are the variables to make proper use of the thermistor of the PINDA.