This bit goes in your config.g
Mine is before the Endstops section
;BLTOUCH CONFIG; Z-Probe
M574 Z1 S2 ; Set endstops controlled by probe
;M558 P9 H5 F120 T6000 ; Set Z probe type to bltouch and the dive height + speeds
M558 P9 H5 F120 T6000 A10 R0.75 S0.02
;G31 P500 X40 Y-13 Z0.340 ; Set Z probe trigger value, offset and trigger height
G31 P25 X40 Y-13 Z0.853 ;453 ;940 ;744 ;817 ;981 ;0.842 ;1.265 ;1.286 ;403 ;377
M557 X40:220 Y15:220 S20 ; Define mesh grid
This is in my bed.g
M561 ; clear any bed transform
G29 ; probe the bed and enable compensation
deployprobe.g
M280 P64 S10
homeall.g
; homeall.g
; called to home all axes
;
; generated by RepRapFirmware Configuration Tool v2 on Mon Apr 08 2019 10:31:02 GMT+0100 (British Summer Time)
G91 ; relative positioning
G1 Z5 F6000 S2 ; lift Z relative to current position
;M98 Pdeployprobe.g ; deploy mechanical Z probe
G1 S1 X-240 Y-240 F1800 ; move quickly to X and Y axis endstops and stop there (first pass)
G1 X5 Y5 F6000 ; go back a few mm
G1 S1 X-240 Y-240 F360 ; move slowly to X and Y axis endstops once more (second pass)
G90 ; absolute positioning
G1 X122 Y122 F6000 ; go to first bed probe point and home Z
G30 ; home Z by probing the bed
homex.g
G91 ; relative positioning
G1 Z5 F6000 S2 ; lift Z relative to current position
G1 S1 X-240 F1800 ; move quickly to X axis endstop and stop there (first pass)
G1 X5 F6000 ; go back a few mm
G1 S1 X-240 F360 ; move slowly to X axis endstop once more (second pass)
G1 Z-5 F6000 S2 ; lower Z again
G90 ; absolute positioning
homey.g
G91 ; relative positioning
G1 Z5 F6000 S2 ; lift Z relative to current position
G1 S1 Y-240 F1800 ; move quickly to Y axis endstop and stop there (first pass)
G1 Y5 F6000 ; go back a few mm
G1 S1 Y-240 F360 ; move slowly to Y axis endstop once more (second pass)
G1 Z-5 F6000 S2 ; lower Z again
G90 ; absolute positioning
homez.g
G91 ; relative positioning
G1 Z5 F6000 S2 ; lift Z relative to current position
G90 ; absolute positioning
G1 X122 Y122 F6000 ; go to first probe point
G30 ; home Z by probing the bed
retractprobe.g
M280 P64 S90
That is about it for setting up the BL Touch.
Please make sure it is wired correctly as per this.
https://duet3d.dozuki.com/Wiki/Connecting_a_Z_probe#Section_BLTouch
My printer was an ender 3 Pro. You will need to measure the offset for the probe.
HTH Paul.