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.
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.
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.