Pixel Turtle List of Commands

forward(n) or f(n):

Move forward n steps. Steps can be negative numbers.


backward(n) or b(n):

Move backwards n steps. Steps can be negative numbers.


left(n) or l(n):

Turn left n steps. Steps can be negative numbers.


right(n) or r(n):

Turn right n steps. Steps can be negative numbers.


penUp() or pu():

Stop leaving a trail when pixel turtle moves


penDown() or pd():

Make a trail when pixel turtle moves


clear() or c():

Clear the trails on screen


setColor(color) or sc(color):

Set pixel color so it leaves a trail on the set color. Colors are defined by 3 numbers in the format [red, green, blue] representing the amount or red, green and blue in your final color.


setHeadingColor(color) or shc(color):

Set pixel heading color. Heading does not leave a trail. Colors are defined by 3 numbers in the format [red, green, blue] representing the amount or red, green and blue in your final color.


move(x, y) or m(x, y):

Teleport your pixel turtle x steps on the horizontal and y steps on the vertical based on your current pixel turtle positon. The steps can be negative numbers and numbers grow to the right and down.


moveTo(x, y) or mt(x, y):

Teleport your pixel turtle to the column x and line y of your Pixel Kit. The pixel on the top left corner is the row 0 and column 0. The numbers grow to the right and down (the pixel on bottom right is row 7 and column 15).


getX() or gx():

Tells you what column your pixel turtle is.


getY() or gy():

Tells you what row your pixel turtle is.


showHeading() or sh():

Show heading.


hideHeading() or hh():

Hide heading.


showPixel() or sp():

Show pixel turtle.


hidePixel() or hp():

Hide pixel turtle.