What does heading mean?
The direction the robot faces, in degrees, measured clockwise from a fixed reference. Zero is the direction it started facing.
In a lesson
turn_right(30, angle=90)spins the robot a quarter turn clockwise and waits until it is done.turn_left(30, angle=90)goes anticlockwise.heading()is the compass: degrees clockwise from straight up the mat, which is the way the robot starts here, 0 up to 360.
Learn it
- Taught in 1.3 Turning and heading Driving, Robot club
Used in
- F1.8 Data types and casting
- F3.1 String handling
- F3.6 Records
- F3.8 Project: survey the room
- F5.5 Linear search
- F6.4 Debugging logic errors
- F6.6 The IDE
- F10.6 The internet, DNS and the cloud
- 0.3 Doing it again
- 1.4 Sideways
and 99 more lessons.
Do the lesson in the simulator