Complete the code to start manual bed leveling on a 3D printer.
G28 ; Home all axes
G29 [1] ; Start manual bed levelingThe command G29 P1 starts manual bed leveling on many 3D printers, prompting the user to adjust the bed at specific points.
Complete the code to run automatic bed leveling on a 3D printer.
G28 ; Home all axes
[1] ; Run automatic bed levelingThe command G29 runs automatic bed leveling, where the printer probes multiple points on the bed to adjust leveling automatically.
Fix the error in the manual leveling command to correctly start the process.
G28 ; Home all axes
G29 [1] ; Start manual bed levelingThe correct parameter to start manual bed leveling is P1. Using P0 or others will not initiate manual leveling.
Fill both blanks to create a dictionary comprehension that maps bed points to their Z-offsets during leveling.
bed_offsets = { [1]: probe_data[[2]] for [1] in points if probe_data[[2]] != 0 }The dictionary comprehension uses point as the key and accesses probe_data[point] as the value to map bed points to their Z-offsets.
Fill all three blanks to create a dictionary comprehension that stores adjusted Z values for points with positive offsets.
adjusted_offsets = { [1]: [2] - [3] for [1], [2] in probe_points.items() if [2] > 0 }The comprehension iterates over probe_points items, using point as key and offset as value, subtracting bed_level_offset for positive offsets.