The original image (left) is downsized to the proper dimensions, grayscaled, and paletted, resulting in a simpler image (right).
Function | Arguments | Description | Calls | Gcode Command(s) |
---|---|---|---|---|
check_for_ok ( ) | None | Waits for "ok\r" from firmware | None | None |
home ( ) | None | Returns the end effector to (0, 0) | check_for_ok | G28 |
z_up ( ) | None | Moves end effector to "up" position | check_for_ok | G01 Z950 |
z_down ( ) | None | Moves end effector to "down" position | check_for_ok | G01 Z1400 |
refresh_feeder ( ) | None | Moves feeder in, then back out to refresh tray | check_for_ok | M411 / M410 |
go_to (x_dest, y_dest) | - x: steps to take in x direction - y: steps to take in y direction |
Moves end effector to given position | check_for_ok | G01 X[x] Y[y] |
change_succ (v_state) | - v_state: 0 to turn the vacuum off, 1 to turn it on | Turns the vaccum on or off | check_for_ok | M400 / M401 |
retrieve (color) | - color: Skittle to retrieve (yellow, orange, red, purple) | Retrieves Skittle of a certain color | go_to, z_down, z_up, change_succ | None |
complete_pixel (pixel_x, pixel_y) | - pixel_x: steps to take in x direction - pixel_y: steps to take in y direction |
Moves Skittle to its destination on the bed | go_to, z_down, z_up, change_succ | None |
create_image (image_path) | - image_path: path to image to make (str) | Iterates through all pixels, retrieves the proper color Skittle, places it on the bed, then returns to (0, 0) | home, retrieve, complete_pixel, refresh_feeder | None |
created with
Website Builder Software .