GLOBAL SITE AUSTRALIAN SITE

Printing your own shapes

To print your own shapes you are going to have to program the pen control Edison to move the pen and send signals to the paper control Edison to move the paper.

Moving the pen draws a horizontal line and moving the paper draws a vertical line.

More complex shapes can be drawn by adding pen and paper movements. You can also control the length of the lines. However, as there is no way to lift the pen all shapes will be made from a continuous line.

 

Draw a horizontal line (move pen)

This is a loop from the above program that moves the pen to draw a horizontal line.

lego printer pen move program

How it works

The set memory icon puts the value 10 into the variable named ‘pen’. The program then enters a loop. The loop is set to end when the value in the variable ‘pen’ is equal to zero. As the value in ‘pen’ is not zero the loop starts.

The first icon in the loop is the single drive icon and sets the direction that the pen moves. This moves the pen for 0.01 of a second, which is set by the event wait icon and the next single drive icon. The minus count icon subtracts 1 from ‘pen’ and the loop again tests whether ‘pen’ equals zero. This loop will repeat 10 times until ‘pen’ is equal to zero. The program will then move on.

The value that is put into ‘pen’ before the loop starts determines how long the line will be. In this program the pen moves 10 times. Each movement of the pen is about 2.5mm (0.1 inches), so our line is about 2.5cm (1 inch) long.

The direction of the pen is set by whether the single drive icon is set to Backwards or Forwards.

Draw a vertical line (move paper)

This is a loop from the above program that moves the paper to draw a vertical line.

lego printer paper move program

How it works

The set memory icon places the value 10 into the variable called ‘feed’. The program then enters a loop, providing that ‘feed’ is not equal to zero. As 10 has just been placed into ‘feed’ then the program will loop.

The first icon in the loop is the transmit data icon. This icon sends the data held in the variable called ‘forward’ (1) via infrared. This is received by the paper feed Edison and the paper feeds forward. The wait icon pauses the program for 0.2 seconds. This allows the infrared data enough time to finish transmitting. The minus count icon subtracts one from the ‘feed’ variable. After the program has looped 10 times ‘feed’ will equal zero and the program will leave the loop.

The value that is put into ‘feed’ before the loop starts determines how long the line will be. In this program the paper moves 10 times. Each movement of the paper is about 2.5mm (0.1 inches), so our line is about 2.5cm (1 inch) long.

The direction of the paper feed is set by whether the variable ‘forward’ (1) or the variable ‘backward’ (2) is transmitted.

<a onclick = "window.location.href='../printer-program/'" class="su-button su-button-style-flat su-button-wide" style="color:#ffffff;background-color:#ff7000;border-color:#cccccc;border-radius:9px;-moz-border-radius:9px;-webkit-border-radius:9px" target="_blank"><span style="color:#ffffff;padding:8px 24px;font-size:18px;line-height:27px;border-color:#ffffff;border-radius:9px;-moz-border-radius:9px;-webkit-border-radius:9px;text-shadow:none;-moz-text-shadow:none;-webkit-text-shadow:none;cursor:pointer"><< Program</span></a>
  • Keep up with Edison

    Sign up for our newsletter to get all things Edison delivered straight to your inbox.

  • This field is for validation purposes and should be left unchanged.

Heads up

The Australian Federal Parliament has passed a law that extends goods and services tax (GST) to low value imports of physical goods imported by consumers from 1 July 2018.

This means that all customers purchasing Edison robots and accessories with an Australian shipping address must now pay GST. The GST will be automatically added to your purchase and show as a line item on your invoice.

We've detected that you are in Australia, so we wanted to let you know that we have changed your settings to view our Australian site, which displays GST inclusive pricing.

You can change back to the GLOBAL SITE at any time using the link in the top left of the page.

OK got it!    Take me to the GLOBAL SITE instead

Pin It on Pinterest

Share This