Future Board | Programming with KittenBlock: Turtle

 Go back to product documents navigation 

 Go back to Future board documents navigation 

 Go back to Coding on Kittenblock Quickstart 

 

Turtle is a popular tool for learning the basics of programming.

../../_images/kbbanner.png

Turtle Blocks

 

Block

 Introduction

1 turtle color

Set the color of the turtle brush

2 turtle forward

Turtle brush moves forward

3 turtle left 90 degree

Turtle brush turns left

4 turtle right 90 degree

Turtle brush turns right

5 turtle heading 90 degree

Set the orientation angle of the turtle brush

6 turtle go to x y

The turtle brush moves to a specific coordinate position

7 turtle set x 100

The turtle brush moves to the x-coordinate position, while the y-coordinate remains unchanged

8 turtle set y 100

The turtle brush moves to the y-coordinate position, while the x-coordinate remains unchanged

9 turtle circle radius 20 degree 360

Draw circles with the turtle brush (set the radius and angle of the circle)

10 turtle draw dot size 5

Use the turtle brush to draw the origin (the parameter is the set size)

11 turtle begin fill

When drawing a closed figure, and you want to fill it, you need to place this block at the beginning

12 turtle end fill

When drawing a closed figure, and you want to fill it, you need to place this block at the end

13 turtle pen down

The turtle brush can draw after the brush is down

14 turtle pen up

After the turtle brush is lifted, the brush won't draw even if you move the mouse

15 turtle clear

Clear the screen

Note: The fill function may not function as intended as the pixel specifications are below Turtle's requirements.

Sample Program: Basic Lines

../../_images/turtle_code1en.png

Sample Program: 5-Pointed Star

../../_images/turtle_code2en.png

Sample Program: Flower

../../_images/turtle_code3en.png

 

 

If you have any question, please feel free to contact us at Discord, we will always be there to help.

 

KittenBot Team

 

 Go back to product documents navigation 

 Go back to Future board documents navigation 

 Go back to Coding on Kittenblock Quickstart 

Leave a comment

Please note, comments must be approved before they are published