G-Code Artist

Sept. 23, 2022

Topics: 3D Printing, Python


A few months ago, I was inspired by a video from one of my favorite YouTube creators, Stuff Made Here, who made a video wherein he made a robot and programmed it to paint his wall. Long story short, he took a picture, translated that in to machine commands, and the machine used dots drawn by spray paint to create an image on the wall! Super cool.

I do not have a wall that large, resources that great, nor time that extensive so I created my own mini version of that project using my 3d printer and a sharpie. The code uses python and pillow (a python image library) to import an image, scale it to size, and generate g-code to make a 3d printer draw an image using dots from a sharpie. The depth of the stroke of the sharpie determines the dot size.

Check out the code here! After generating the G-Code and placing your paper on your printer bed, you need to position the sharpie over the center and use the G92 command to set that position as (0, 0, 0).

Things still to be figured out:

  • Fine tuning contrast
  • Better paper to reduce ink dots bleeding
  • Better alignment of paper and printer axes
  • Better translation of dot size to sharpie stoke depth

Original image:

Preview image generated by the python program simulating the output:

Scanned image of final output:


Ping Pong Scoreboard

Aug. 13, 2022

Topics: Python


In preparation for the great Kostelnik Family Ping Pong Tournament of 2021, I made a program that would create a scoreboard overlay for a video feed so that everyone at the party would be able to keep watch over the goings-on of the tournament. The program uses a streamdeck to select teams and rounds, flask and flask-socketio to create the HTML overlay, and OBS studio was used to combine the overlay with the video feed.

Features:

  • Customizable teams (both amount and names)
  • Customizable rounds (both amount and names)
  • Possession tracker
  • Button for side switching
  • Uses websockets so no delay between button press and change in overlay

Below is a quick video demonstration:

Code for the project can be found here. Full disclosure, this is my first github repo so there's almost certainly something off or missing. Please reach out with any improvements I could make!