Instructions (Windows) :
‣ Step 1 - Install python: Open up your terminal and run
python --version
If any of the version numbers are greater than 3.6, you're good to go. If not, install the latest version of python.
‣ Step 2 - Install pip: In your terminal, run
pip --version
If it works, then you're all set. Once again, if neither command works, you can install it by running:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
py get-pip.py
‣ Step 3 - Install requirements
pip install numpy pillow matplotlib argparse
‣ Step 4 - Download and extract the files by running:
Invoke-WebRequest -Uri "https://github.com/HeavyFalcon678/LabelMakerCustomImage/archive/refs/heads/master.zip" -OutFile "$env:USERPROFILE\Downloads\LabelMakerCustomImage.zip"
This will download and extract the files from the github repository.
‣ Step 5 - Test it by running:
python Downloads/LabelMakerCustomImage/LabelMakerCustomImage-master/main.py --image_path Downloads/LabelMakerCustomImage/LabelMakerCustomImage-master/images/heavyfalcon.jpg
‣ Step 6 - Open the.ino file created, it will be in your home folder. Copy all the code, and paste it into Arduino IDE. Choose Arduino Nano and your port, then upload the code to your label maker!
HOW TO RUN YOUR OWN FILES:Run the command
python Downloads/LabelMakerCustomImage/LabelMakerCustomImage-master/main.py
with the following flags:
MANDATORY:
--image_path # Path to the image file (supported: .png, .jpg, .jpeg, .webp).
OPTIONAL:
--draw_dark_pixels # Set to True to draw points for dark pixels, or False to draw points for light pixels. Defaults to True.
--num_points_width # The grid size used for processing. The image is processed into a grid of num_points_width x num_points width points. Default is 25.
--num_steps_width # The overall drawing width in stepper motor steps. Default is 1350.
--threshold_factor # The threshold factor used to determine if a pixel is dark or light relative to the image's average brightness. The default value of 1.0 means that a pixel is considered dark if its brightness is above or below the average brightness of the image (depending on the value of --draw_dark_pixels). Default is 1.0.
Comments