Thanks to visit codestin.com
Credit goes to github.com

Skip to content

liugetu/lego-plotter-project-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lego-plotter-project-v2

A plotter robot built with Lego that draws cartoonized faces. If you want to draw things other than faces, you can see the previous version of the project.

Hardware design based on http://jander.me.uk/LEGO/plott3r.html.

Build instructions (PDF / 44MB)

Set up to use Python with the Lego brick

Cartoon Yourself API

I used the Cartoon Yourself API to transform personal photos into cartoon images. It offers a free plan.

Remember to enter your API key in main.py. There, if you wish, you can also change the drawing style where it says "type".

Update: the link is no longer available, but there are plenty of other similar tools out there.

Instructions

First, take a photo of yourself (or you can also use an existing one). Then, execute

python3 main.py

You will have to select a photo in the file browser. It will generate a file coordenadas.txt containing the drawing coordinates, and a window will pop up where you can preview what will be drawn (it will be deformed because it doesn't have the same aspect ratio as the paper, and mirrored (not fixed)):

To send the files to the robot (change the IP address to yours):

scp exec4.py coordenadas.txt stop.py [email protected]:/home/robot/

The default password to access the robot is maker.

To enter the robot and start drawing (I recommend using a different terminal):

ssh [email protected]
python3 exec4.py

To exit this mode, just enter exit.

image In case it doesn't work well and can't stop, or you want to level up the pen:
python3 stop.py

Note: a white paper should be used, otherwise, the color sensor might not work well.

About

A plotter robot built with Lego that draws cartoonized faces

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages