G28 ; home G29 P1 ; start the automatic bed leveling ; wait for bed leveling to finish (should take about 5 minutes) G29 S1 ; save the mesh information into slot 1 G29 S0 ; save in slot 0 as well as Cura use slot 0 per default M500 ; save EEPROM M851 ; print the current setting M851 Z0 ; set offset to zero G28 ; home again G1 Z0 ; move the nozzle to height 0 ; measure the distance between the nozzle and the bed with some feeler gauge ; or stack several piece of paper and measure the thickness M851 Z-1.6 ; enter the measure distance, in this example, the head is 1.6mm above the printer bed M500 ; store the new configuration G28 ; home again G1 Z0 ; move the nozzle to height 0 - Then mesure again, if it's not right yet, restart at step M851 Z-1.6 (increase the value to bring the head closer to the bed)