Let the snake run
This challenge has been written by Ágota Klacsákné Tóth and is part of the EU CODE WEEK CHALLENGES.

Duration
30 minutes
Experience
Beginner
Target Audience
- Primary School students (6 to 12 years)
- Lower Secondary School students (12 to 16 years)
Purpose
- To code the snake's movement on their own micro:bit.
- To set the correct placing and timing for the joint animation.
Recommended Materials
- micro:bits (for every student if possible)
- laptop or computer for makecode.microbit.org editor
Let the snake run
Primary School students (6 to 12 years)
Lower Secondary School students (12 to 16 years)
Description
Students must write codes to navigate the snake through micro:bits next to each other. It has to be done in a way that it looks like the snake is running from one micro:bit to the other.
Instructions
- Design a track that goes through several micro:bits next to each other (e.g., forming a 2x2 square).
- Write codes as a snake moves along a track.
- Work on your own device then put them together and run the code.
- Consider the timing and placement: If the snake goes out of one micro:bit, it will appear on the next micro:bit.
- Further challenges: With micro:bit v2, play music until the snake leaves your device.
- Design the snake by changing the brightness of the LEDs.
- Try longer, or more snakes.
Share the link to your work in your Instagram Bio: tap the Edit Profile button on your Instagram and add the link to your work in the Website field. After that, create a new post, add a screenshot of your work, write “Link in Bio”, add the hashtag #EUCodeWeekChallenge and mention @CodeWeekEU.
Example


