diff --git a/content/resources/activity-making-music-advanced.mdx b/content/resources/activity-making-music-advanced.mdx index a368b14..535355e 100644 --- a/content/resources/activity-making-music-advanced.mdx +++ b/content/resources/activity-making-music-advanced.mdx @@ -1,5 +1,5 @@ --- -title: "Activity: Making Music (Advanced)" +title: "Activity: Making Music III" date: "2024-12-31" categories: ["Activities", "All", "Simulator Activities"] tags: ["Iteration", "Buzzer", "Algorithm Design", "Variables", "Advanced"] @@ -21,7 +21,7 @@ When it comes to reading sheet music for this task, we will be using two pieces ![](/images/content/6babfe-notes.png) -![](/images/content/410fcc-rhythm.jpg) +![](/images/content/384e17-rhythm.jpg) ![](/images/content/996ff5-mary-had-a-little-lamb.png) diff --git a/content/resources/activity-making-music-beginner.mdx b/content/resources/activity-making-music-beginner.mdx index 5919665..c743261 100644 --- a/content/resources/activity-making-music-beginner.mdx +++ b/content/resources/activity-making-music-beginner.mdx @@ -1,5 +1,5 @@ --- -title: "Activity: Making Music (Beginner)" +title: "Activity: Making Music I" date: "2024-12-31" categories: ["Activities", "All", "Simulator Activities"] tags: ["Buzzer", "Beginner", "Variables"] @@ -27,7 +27,7 @@ Songs can be divided into a rhythm, the constant beat the music follows. Shown i Below is an example of ‘Mary Had a Little Lamb’ in sheet music. The letters have already been written below the notes. This is the example we will use for the guide, but feel free to find your own songs or even write your own music! -![](/images/content/df67ce-mary-had-a-little-lamb.png) +![](/images/content/996ff5-mary-had-a-little-lamb.png) ## Code: diff --git a/content/resources/activity-making-music-intermediate.mdx b/content/resources/activity-making-music-intermediate.mdx index 65b1d08..94db903 100644 --- a/content/resources/activity-making-music-intermediate.mdx +++ b/content/resources/activity-making-music-intermediate.mdx @@ -1,5 +1,5 @@ --- -title: "Activity: Making Music (Intermediate)" +title: "Activity: Making Music II" date: "2024-12-30" categories: ["Activities", "All", "Simulator Activities"] tags: ["Intermediate", "Variables", "Buzzer", "Iteration"] @@ -23,7 +23,7 @@ When it comes to reading sheet music for this task, we will be using two pieces ![](/images/content/384e17-rhythm.jpg) -![](/images/content/c40deb-mary-had-a-little-lamb.png) +![](/images/content/996ff5-mary-had-a-little-lamb.png) ## Code: diff --git a/content/resources/balance-bot.mdx b/content/resources/balance-bot.mdx index e343cdf..57262aa 100644 --- a/content/resources/balance-bot.mdx +++ b/content/resources/balance-bot.mdx @@ -3,6 +3,8 @@ title: "Activity: Balance Bot" date: "2021-06-04" categories: ["Activities", "All", "Simulator Activities"] tags: ["Iteration", "Algorithm Design", "Accelerometer", "Motors", "Maths", "Advanced"] +codingSkills: ["Iteration", "Algorithm Design", "Maths"] +roverConcepts: ["Accelerometer", "Motors"] excerpt: "Learn iteration, algorithm design, maths, and how to use the Rover’s accelerometer and motors." featuredImage: "/images/resources/balance-bot.png" --- @@ -10,53 +12,9 @@ featuredImage: "/images/resources/balance-bot.png" Challenge students to program their rover to always try and stabilise itself. When complete, the rover will always turn and drive upwards on any tilted surface. Once the surface the robot is driving on is flat, it should stop moving. This means the robot will balance on a seesaw. Students will need to use data from the accelerometer to control the motors based on the orientation of the rover. -#### - Relevant Coding Skills +### Activity Demonstration - Branching - - --> - - Iteration - - Functions - - Variables - - --> - - Algorithm Design - - Maths - -#### - Relevant Rover Concepts - - Ultrasonic - - --> - - IR - - --> - - Colour - - Gyroscope - - Accelerometer - - Motors - - LEDs - - --> - - Buzzer - - --> - -Activity Demonstration + ### Setup diff --git a/content/resources/colourful-sounds.mdx b/content/resources/colourful-sounds.mdx index 80f5e9b..641e2c6 100644 --- a/content/resources/colourful-sounds.mdx +++ b/content/resources/colourful-sounds.mdx @@ -3,6 +3,8 @@ title: "Activity: Colourful Sounds" date: "2021-06-03" categories: ["Activities", "All"] tags: ["Colour Sensors", "Iteration", "Buzzer", "LEDs", "Maths", "Intermediate"] +codingSkills: ["Iteration", "Maths"] +roverConcepts: ["Colour", "Buzzer", "LEDs"] excerpt: "Learn iteration and how to use the colour sensor, LEDs, and buzzer." featuredImage: "/images/resources/colourful-sounds.png" --- @@ -10,50 +12,6 @@ featuredImage: "/images/resources/colourful-sounds.png" Create a program that allows our robot to translate data from the colour sensors to display on the LEDs and play sounds. When you move your rover over new colours the LEDs will match that surface colour and create sound unique to that colour. -#### - Relevant Coding Skills - - Branching - - --> - - Iteration - - Functions - - Variables - - --> - - Algorithm Design - - --> - - Maths - -#### - Relevant Rover Concepts - - Ultrasonic - - --> - - IR - - --> - - Colour - - Gyroscope - - Accelerometer - - Motors - - LEDs - - Buzzer - ![](/images/content/49a8ec-colourfulsounds.png) Activity Demonstration diff --git a/content/resources/conversation-bot.mdx b/content/resources/conversation-bot.mdx index 3cca0df..f8f80d9 100644 --- a/content/resources/conversation-bot.mdx +++ b/content/resources/conversation-bot.mdx @@ -3,6 +3,8 @@ title: "Activity: Conversation Bot" date: "2021-06-03" categories: ["Activities", "All"] tags: ["Branching", "Iteration", "Buzzer", "LEDs", "Beginner"] +codingSkills: ["Branching", "Iteration"] +roverConcepts: ["Buzzer", "LEDs"] excerpt: "Learn iteration, branching, and how to use the buzzer and LEDs." featuredImage: "/images/resources/conversation-bot.png" --- @@ -10,51 +12,9 @@ featuredImage: "/images/resources/conversation-bot.png" Use the input block to create a conversation between you and your rover. Use variables to save information in the conversation or ask the robot to do different tasks. -#### - Relevant Coding Skills +### Activity Demonstration - Branching - - Iteration - - Functions - - Variables - - --> - - Algorithm Design - - --> - - Maths - -#### - Relevant Rover Concepts - - Ultrasonic - - --> - - IR - - --> - - Colour - - Gyroscope - - Accelerometer - - Motors - - --> - - LEDs - - Buzzer - -Activity Demonstration + ### Setup diff --git a/content/resources/driving-shapes-2.mdx b/content/resources/driving-shapes-2.mdx index ae56508..65ba8b1 100644 --- a/content/resources/driving-shapes-2.mdx +++ b/content/resources/driving-shapes-2.mdx @@ -3,6 +3,8 @@ title: "Activity: Driving Shapes 2" date: "2021-06-03" categories: ["Activities", "All"] tags: ["Iteration", "Variables", "Motors", "Maths", "Intermediate"] +codingSkills: ["Iteration", "Variables", "Maths"] +roverConcepts: ["Motors"] excerpt: "Learn branching, variables maths, and motors." featuredImage: "/images/resources/driving-shapes-2.png" --- @@ -10,53 +12,9 @@ featuredImage: "/images/resources/driving-shapes-2.png" Program the rover to request a number from the user and drive in a shape with that many sides. For more advanced maths make the rover draw the shape with uneven length sides. -#### - Relevant Coding Skills +### Activity Demonstration - Branching - - --> - - Iteration - - Functions - - Variables - - Algorithm Design - - --> - - Maths - -#### - Relevant Rover Concepts - - Ultrasonic - - --> - - IR - - --> - - Colour - - Gyroscope - - Accelerometer - - Motors - - LEDs - - --> - - Buzzer - - --> - -Activity Demonstration + ### Setup diff --git a/content/resources/driving-shapes.mdx b/content/resources/driving-shapes.mdx index a619cd6..f19564e 100644 --- a/content/resources/driving-shapes.mdx +++ b/content/resources/driving-shapes.mdx @@ -3,6 +3,8 @@ title: "Activity: Driving Shapes" date: "2021-06-03" categories: ["Activities", "All", "Simulator Activities"] tags: ["Iteration", "Motors", "Beginner"] +codingSkills: ["Iteration"] +roverConcepts: ["Motors"] excerpt: "Learn iteration and how to control the Rover’s motors." featuredImage: "/images/resources/driving-shapes.png" --- @@ -10,55 +12,9 @@ featuredImage: "/images/resources/driving-shapes.png" Learn to make your rover move and draw shapes with it. Start by making the rover drive in a square, then a triangle. Simplify your code with a loop and create more complex shapes like hexagons and octagons. -#### - Relevant Coding Skills +### Activity Demonstration - Branching - - --> - - Iteration - - Functions - - Variables - - --> - - Algorithm Design - - --> - - Maths - -#### - Relevant Rover Concepts - - Ultrasonic - - --> - - IR - - --> - - Colour - - Gyroscope - - Accelerometer - - Motors - - LEDs - - --> - - Buzzer - - --> - -Activity Demonstration + ### Setup diff --git a/content/resources/flip-bot.mdx b/content/resources/flip-bot.mdx index 833d6ee..43493ad 100644 --- a/content/resources/flip-bot.mdx +++ b/content/resources/flip-bot.mdx @@ -3,6 +3,8 @@ title: "Activity: Flip Bot" date: "2021-06-03" categories: ["Activities", "All"] tags: ["Branching", "Iteration", "Accelerometer", "Motors", "Intermediate"] +codingSkills: ["Branching", "Iteration"] +roverConcepts: ["Accelerometer", "Motors"] excerpt: "Learn branching, iteration, and how to use the accelerometer." featuredImage: "/images/resources/flip-bot.png" --- @@ -10,53 +12,9 @@ featuredImage: "/images/resources/flip-bot.png" Program the rover to flip itself upside down and then stop. There are many solutions to this problem. The rover must flip itself without being touched while running and once it has flipped it should stop. You could try combining this with the Turn Over Rover program to include lights. -#### - Relevant Coding Skills +### Activity Demonstration - Branching - - Iteration - - Functions - - Variables - - --> - - Algorithm Design - - --> - - Maths - -#### - Relevant Rover Concepts - - Ultrasonic - - --> - - IR - - --> - - Colour - - Gyroscope - - Accelerometer - - Motors - - LEDs - - --> - - Buzzer - - --> - -Activity Demonstration + ### Setup diff --git a/content/resources/lane-guidance.mdx b/content/resources/lane-guidance.mdx index a8af79e..2bcf1e1 100644 --- a/content/resources/lane-guidance.mdx +++ b/content/resources/lane-guidance.mdx @@ -3,6 +3,8 @@ title: "Activity: Lane Guidance" date: "2021-06-03" categories: ["Activities", "All"] tags: ["Branching", "Iteration", "Algorithm Design", "Ultrasonic", "IR", "Motors", "Maths", "Advanced"] +codingSkills: ["Branching", "Iteration", "Algorithm Design", "Maths"] +roverConcepts: ["Ultrasonic", "IR", "Motors"] excerpt: "Learn iteration, branching, algorithm design, maths, and how to use the motors, ultrasonic, and IR sensors." featuredImage: "/images/resources/lane-guidance.png" --- @@ -10,47 +12,9 @@ featuredImage: "/images/resources/lane-guidance.png" Program rovers to stay in the middle of a lane marked out by walls. This is a simplification of the lane assist technology in cars. Use the front ultrasonic sensor and both IR sensors on either side of the rover to determine where walls are and drive as smoothly through the middle of the path as you can. Don’t run into the walls! -#### - Relevant Coding Skills +### Activity Demonstration - Branching - - Iteration - - Functions - - Variables - - --> - - Algorithm Design - - Maths - -#### - Relevant Rover Concepts - - Ultrasonic - - IR - - Colour - - Gyroscope - - Accelerometer - - Motors - - LEDs - - --> - - Buzzer - - --> - -Activity Demonstration + ### Setup diff --git a/content/resources/maze-ii.mdx b/content/resources/maze-ii.mdx new file mode 100644 index 0000000..647d9e6 --- /dev/null +++ b/content/resources/maze-ii.mdx @@ -0,0 +1,42 @@ +--- +title: "Activity: Maze II" +date: "2021-06-05" +categories: ["Activities", "All", "Simulator Activities"] +tags: ["Colour Sensors", "Branching", "Iteration", "Algorithm Design", "Ultrasonic", "IR", "Motors", "Intermediate"] +excerpt: "Build on your maze solving skills by using both IR sensors and the ultrasonic sensor together to handle more complex maze layouts." +featuredImage: "/images/resources/maze.png" +--- + +Take your maze solving to the next level. In this intermediate challenge, you'll use both IR sensors alongside the ultrasonic sensor to make smarter decisions at intersections and handle more complex maze layouts. + +![](/images/content/1cf38b-maze.png) + +Activity Demonstration + +### Setup + +Construct mazes with narrower pathways than in Maze I. Aim for 5-10cm clearance on each side of the rover. Include T-intersections and dead ends to force the rover to make more complex decisions. + +### Building On Maze I + +In Maze I we used the ultrasonic sensor to check ahead and one IR sensor to decide which way to turn. This worked for simple mazes but falls apart when the maze has more complex intersections. Now we'll use both IR sensors to check left and right before deciding where to turn. + +#### Stage 1: Check All Directions + +Create variables for the wall distance on each side. Read both the left and right IR sensors as well as the ultrasonic sensor at each step. This gives the rover a complete picture of its surroundings. + +#### Stage 2: Smarter Turning + +With data from all three distance sensors, the rover can now make better decisions at intersections. Instead of always preferring left or right, prioritise based on which direction has more open space. Use nested IF/ELSE IF/ELSE blocks to handle the different combinations. + +#### Stage 3: Add the Colour Sensor + +Use the colour sensor to detect a coloured finish line at the end of the maze. When the rover detects the finish colour, it should stop and celebrate with LEDs or a buzzer sound. + +### Up Next + +Ready for the ultimate maze challenge? In Maze III you'll add the gyroscope for precise turning and implement a wall-following algorithm. + +[Activity: Maze I](/resources/maze) + +[Activity: Maze III](/resources/maze-iii) diff --git a/content/resources/maze-iii.mdx b/content/resources/maze-iii.mdx new file mode 100644 index 0000000..8544154 --- /dev/null +++ b/content/resources/maze-iii.mdx @@ -0,0 +1,46 @@ +--- +title: "Activity: Maze III" +date: "2021-06-06" +categories: ["Activities", "All", "Simulator Activities"] +tags: ["Colour Sensors", "Branching", "Iteration", "Algorithm Design", "Ultrasonic", "IR", "Gyroscope", "Motors", "Functions", "Advanced"] +excerpt: "Master maze solving with precise gyroscope turns, wall-following algorithms, and functions to create an efficient maze navigator." +featuredImage: "/images/resources/maze.png" +--- + +Create an advanced maze solving algorithm that uses the gyroscope for precise 90-degree turns, implements a wall-following strategy, and organises code with functions for a clean, efficient solution. + +![](/images/content/1cf38b-maze.png) + +Activity Demonstration + +### Setup + +Build the most challenging maze you can. Use narrow pathways with only 3-5cm clearance on each side. Include loops, multiple paths, and dead ends. Add coloured sections on the floor for bonus tasks like changing speed or playing different sounds. + +### Building On Maze II + +In Maze II we used all three distance sensors to make better decisions. Now we'll add the gyroscope for precise turning, use functions to organise our code, and implement a proper wall-following algorithm. + +#### Stage 1: Precise Turns With The Gyroscope + +Instead of turning for a set time (which can be inaccurate), use the gyroscope to measure exactly how far the rover has turned. Create a function called `turnRight` that turns the rover exactly 90 degrees by reading the gyroscope and stopping when the target angle is reached. Do the same for `turnLeft`. + +#### Stage 2: Wall-Following Algorithm + +Implement a left-hand or right-hand wall-following strategy. The idea is simple: always keep a wall on one side. If the wall disappears (an opening), turn that direction. If the wall is ahead, turn the other way. This strategy guarantees the rover will eventually find the exit in any simply-connected maze. + +#### Stage 3: Organise With Functions + +Create functions for each behaviour: `moveForward`, `turnLeft`, `turnRight`, `checkWalls`, and `checkFinish`. Your main loop should read cleanly as a series of function calls. This makes the code easier to debug and modify. + +#### Stage 4: Speed Optimisation + +Once your rover can reliably solve the maze, optimise for speed. Move faster in straight sections and slow down when approaching walls or turns. Use the distance sensor readings to adjust speed dynamically. + +### Challenge + +Can you solve the maze as fast as possible? Time your rover and try to beat your personal best. Compare times with classmates to see who has the most efficient algorithm. + +[Activity: Maze I](/resources/maze) + +[Activity: Maze II](/resources/maze-ii) diff --git a/content/resources/maze.mdx b/content/resources/maze.mdx index 34518c8..5d79f43 100644 --- a/content/resources/maze.mdx +++ b/content/resources/maze.mdx @@ -1,80 +1,46 @@ --- -title: "Activity: Maze" +title: "Activity: Maze I" date: "2021-06-04" categories: ["Activities", "All", "Simulator Activities"] tags: ["Colour Sensors", "Branching", "Iteration", "Algorithm Design", "Ultrasonic", "IR", "Motors", "Beginner"] -excerpt: "Learn branching, iteration, algorithm design, and how to use the Rover’s motors, ultrasonic, colour, and IR sensors." +excerpt: "Learn the basics of maze solving using the ultrasonic and IR sensors to detect walls and navigate simple paths." featuredImage: "/images/resources/maze.png" --- -Create a maze that students have to navigate their rover through. Use the rovers two IR sensors and ultrasonic sensor to detect walls and where they can drive. Use the rovers colour sensor to detect the finish. +Navigate your rover through a maze using the ultrasonic sensor to detect walls ahead and the IR sensor to check for walls to the side. This beginner approach introduces the fundamentals of maze solving with simple branching logic. -#### - Relevant Coding Skills +![](/images/content/1cf38b-maze.png) - Branching - - Iteration - - Functions - - Variables - - --> - - Algorithm Design - - Maths - -#### - Relevant Rover Concepts - - Ultrasonic - - IR - - Colour - - Gyroscope - - Accelerometer - - Motors - - LEDs - - --> - - Buzzer - - --> - -![](/images/content/58765d-maze.png) - - Activity Demonstration +Activity Demonstration ### Setup -Construct mazes with any solid material that is tall enough for the rover IR & ultrasonic sensors to detect. We use boxes or wooden blocks to create our walls. The width of maze pathways will change how difficult the maze will be. For a challenging maze create pathways with 5-10cm allowance from each side of rover to the wall. The larger the width the easier. - -To add complexity to mazes create additional tasks for students to complete in the maze. E.g. use coloured floor tiles or tape on your maze floor and task them to find all colour sections in the maze before they can finish or change speed at different colours. +Construct mazes with any solid material that is tall enough for the rover IR & ultrasonic sensors to detect. We use boxes or wooden blocks to create our walls. For this first level, keep pathways wide with at least 15cm clearance on each side of the rover to make it easier for students to get started. ### Here’s Our Approach -Solutions to maze challenges can vary in intricacy depending on rovers sensors utilized and maze complexity. Our basic approach only involves the ultrasonic sensor and the left IR sensor. +This basic approach only involves the ultrasonic sensor and the left IR sensor. #### Stage 1 We start by creating a variable named wall which represents the distance (cm) from the side of our rover to the maze wall when the rover is placed in the middle of a maze path. -#### **Stage 2** +#### Stage 2 -With an IF/ELSE IF/ELSE block we first check if the rover can move forward. If the ultrasonic sensor doesn't detect anything closer than our wall variable it will move forward. If it did not pass this check, it means there is a wall in the way and it now has to decide where to turn. +With an IF/ELSE IF/ELSE block we first check if the rover can move forward. If the ultrasonic sensor doesn’t detect anything closer than our wall variable it will move forward. If it did not pass this check, it means there is a wall in the way and it now has to decide where to turn. -#### **Stage 3** +#### Stage 3 -Our next case, the ELSE IF, will check if the left IR sensor detects a wall. If it doesn't, the way is clear & it will turn left. If it does detect a wall, it will go to the ELSE case and turn right. We then place the whole IF/ELSE IF/ELSE block in a while true loop so it will repeat this behaviour indefinitely. +Our next case, the ELSE IF, will check if the left IR sensor detects a wall. If it doesn’t, the way is clear & it will turn left. If it does detect a wall, it will go to the ELSE case and turn right. We then place the whole IF/ELSE IF/ELSE block in a while true loop so it will repeat this behaviour indefinitely. ![](/images/content/82838c-screenshot-2023-10-31-083156.png) Example Code + +### Up Next + +Ready for a harder maze? In Maze II you’ll use both IR sensors and the ultrasonic sensor together to handle more complex maze layouts. + +[Activity: Maze II](/resources/maze-ii) + +[Activity: Maze III](/resources/maze-iii) diff --git a/content/resources/prison-escape.mdx b/content/resources/prison-escape.mdx index ae7e968..64e32d9 100644 --- a/content/resources/prison-escape.mdx +++ b/content/resources/prison-escape.mdx @@ -3,6 +3,8 @@ title: "Activity: Prison Escape" date: "2021-06-03" categories: ["Activities", "All"] tags: ["Colour Sensors", "Branching", "Iteration", "Motors", "Intermediate"] +codingSkills: ["Branching", "Iteration"] +roverConcepts: ["Colour", "Motors"] excerpt: "Learn branching and iteration using the colour sensors and motors." featuredImage: "/images/resources/prison-escape.png" --- @@ -10,53 +12,9 @@ featuredImage: "/images/resources/prison-escape.png" Use the colour sensors to find and drive through the gap in the box. Rovers start in the middle facing a random direction and must leave through the gap, they cannot drive over the lines. -#### - Relevant Coding Skills +### Activity Demonstration - Branching - - Iteration - - Functions - - Variables - - --> - - Algorithm Design - - --> - - Maths - -#### - Relevant Rover Concepts - - Ultrasonic - - --> - - IR - - --> - - Colour - - Gyroscope - - Accelerometer - - Motors - - LEDs - - --> - - Buzzer - - --> - -Activity Demonstration + ### Setup diff --git a/content/resources/puppy-bot.mdx b/content/resources/puppy-bot.mdx index c3f5a47..2f55ed4 100644 --- a/content/resources/puppy-bot.mdx +++ b/content/resources/puppy-bot.mdx @@ -3,6 +3,8 @@ title: "Activity: Puppy Bot" date: "2021-06-03" categories: ["Activities", "All"] tags: ["Branching", "Iteration", "Functions", "Motors", "Ultrasonic", "Intermediate"] +codingSkills: ["Branching", "Iteration", "Functions"] +roverConcepts: ["Ultrasonic", "Motors"] excerpt: "Branching and looping with the ultrasonic sensor." featuredImage: "/images/resources/puppy-bot.png" --- @@ -10,51 +12,9 @@ featuredImage: "/images/resources/puppy-bot.png" Program the rover to act like a puppy. When the rover detects an object within 50cm using the ultrasonic sensor have the rover charge forward. Once the rover gets within 20cm from the object it stops and waits for it to move. When the puppy bot can’t see anything with the ultrasonic, slowly spin on the spot looking for something to follow. -#### - Relevant Coding Skills +### Activity Demonstration - Branching - - Iteration - - Functions - - Variables - - --> - - Algorithm Design - - --> - - Maths - -#### - Relevant Rover Concepts - - Ultrasonic - - IR - - --> - - Colour - - Gyroscope - - Accelerometer - - Motors - - LEDs - - --> - - Buzzer - - --> - -Activity Demonstration + ### Setup diff --git a/content/resources/random-bug-bot.mdx b/content/resources/random-bug-bot.mdx index 37cb2b8..48024a1 100644 --- a/content/resources/random-bug-bot.mdx +++ b/content/resources/random-bug-bot.mdx @@ -3,6 +3,8 @@ title: "Activity: Random Bug Bot" date: "2021-06-03" categories: ["Activities", "All"] tags: ["Iteration", "Motors", "Maths", "Beginner", "Colour Sensors"] +codingSkills: ["Iteration", "Maths"] +roverConcepts: ["Motors", "Colour"] excerpt: "Learn branching using the motors and maths." featuredImage: "/images/resources/random-bug-bot.png" --- @@ -10,55 +12,9 @@ featuredImage: "/images/resources/random-bug-bot.png" Program the rover to act like a bug and move around randomly looking for food. Using the random number math block generate a speed for each of the motors. This will create a randomly moving bug rover. -#### - Relevant Coding Skills +### Activity Demonstration - Branching - - --> - - Iteration - - Functions - - Variables - - --> - - Algorithm Design - - --> - - Maths - -#### - Relevant Rover Concepts - - Ultrasonic - - --> - - IR - - --> - - Colour - - Gyroscope - - Accelerometer - - Motors - - LEDs - - --> - - Buzzer - - --> - -Activity Demonstration + ### Setup diff --git a/content/resources/roaming-rover.mdx b/content/resources/roaming-rover.mdx index ed6f097..bddb269 100644 --- a/content/resources/roaming-rover.mdx +++ b/content/resources/roaming-rover.mdx @@ -3,6 +3,8 @@ title: "Activity: Roaming Rover" date: "2021-06-03" categories: ["Activities", "All"] tags: ["Iteration", "Ultrasonic", "Motors", "Beginner"] +codingSkills: ["Iteration"] +roverConcepts: ["Ultrasonic", "Motors"] excerpt: "Learn to avoid obstacles with the ultrasonic sensor." featuredImage: "/images/resources/roaming-rover.png" --- @@ -10,53 +12,9 @@ featuredImage: "/images/resources/roaming-rover.png" Program the rover to move around the room using the ultrasonic sensor to avoid running into obstacles. If the rover detects an object, turn away from the object and keep moving forward. -#### - Relevant Coding Skills +### Activity Demonstration - Branching - - --> - - Iteration - - Functions - - Variables - - --> - - Algorithm Design - - --> - - Maths - -#### - Relevant Rover Concepts - - Ultrasonic - - IR - - --> - - Colour - - Gyroscope - - Accelerometer - - Motors - - LEDs - - --> - - Buzzer - - --> - -Activity Demonstration + ### Setup diff --git a/content/resources/running-a-term-of-digital-technologies-classes-in-the-robot-simulator.mdx b/content/resources/running-a-term-of-digital-technologies-classes-in-the-robot-simulator.mdx index a29fbd4..3eb94fe 100644 --- a/content/resources/running-a-term-of-digital-technologies-classes-in-the-robot-simulator.mdx +++ b/content/resources/running-a-term-of-digital-technologies-classes-in-the-robot-simulator.mdx @@ -79,50 +79,6 @@ To make this outline applicable for as many classrooms as possible, we will outl **Line Following** -#### - Relevant Coding Skills - - Branching - - Iteration - - Functions - - Variables - - --> - - Algorithm Design - - Maths - -#### - Relevant Rover Concepts - - Ultrasonic - - --> - - IR - - --> - - Colour - - Gyroscope - - Accelerometer - - Motors - - LEDs - - --> - - Buzzer - - --> - ![](/images/content/d37bd7-linefollowing.png) The line following exercise provides students an opportunity to combine basic **iteration** and ** branching** logic to form a fairly simple ** algorithm**. Line following algorithms will require an understanding of the rover’s colour sensors. Colour sensors generate colour data which can give you an opportunity to explore collection and manipulation of** complex data types** with additional activities for the students centred around understanding and using the colour sensor. @@ -145,46 +101,6 @@ The colour sensor produces complex colour data. While completing this exercise y ### **Maze Solving** -#### - Relevant Coding Skills - - Branching - - Iteration - - Functions - - Variables - - --> - - Algorithm Design - - Maths - -#### - Relevant Rover Concepts - - Ultrasonic - - IR - - Colour - - Gyroscope - - Accelerometer - - Motors - - LEDs - - --> - - Buzzer - - --> - ![](/images/content/89d9d9-maze.gif) Maze challenges provide students an opportunity to combine basic **iteration** and ** branching** logic to form a simple ** algorithm**. Maze solving algorithms will require students to utilise the rover’s Infrared Distance and/or Ultrasonic sensors. These distance sensors provide data on proximity of objects around the rover e.g. detecting maze walls. You can read the [Maze blog post](/resources/maze) which describes what maze solving is and insights in how to complete it. @@ -211,7 +127,7 @@ You can also add a time requirement for solving mazes, which will encourage stud The ultrasonic sensor and Infrared Distance sensors are essential in creating any maze solving algorithm. If you’d like to read a further breakdown of how these sensors work check out our dedicated [Ultrasonic sensor post](/resources/ultrasonic-sensor) and [Infrared sensor post](/resources/ir-sensor). -![](/images/content/75c9e0-ultrasonic-animation.gif) +![](/images/content/65df02-ultrasonic-animation.gif) #### **Learning The Ultrasonic Sensor **[** READ MORE**](/resources/ultrasonic-sensor) @@ -221,52 +137,6 @@ The ultrasonic sensor and Infrared Distance sensors are essential in creating an ### **Balance Challenges** -#### - Relevant Coding Skills - - Branching - - Iteration - - Functions - - Variables - - --> - - Algorithm Design - - Maths - -#### - Relevant Rover Concepts - - Ultrasonic - - --> - - IR - - --> - - Colour - - Gyroscope - - Accelerometer - - Motors - - --> - - LEDs - - --> - - Buzzer - - --> - ![](/images/content/e1c713-balance-board.png) There are two balance exercises in the simulator, **See-Saw** and ** Balance Board**. Both these challenges require** algorithms ** utilising** iteration ** and a good understanding of the** accelerometer,** as well as the data it produces. Depending on algorithm implementation, branching logic may or may not be used. For example, an algorithm that relies heavily on complex mathematics to process the accelerometer data may not need to use branching. You can read the [Balance Bot blog post ](/resources/balance-bot)to get an explanation of balance challenges and insights into how to complete them. diff --git a/content/resources/stop-on-colour-change.mdx b/content/resources/stop-on-colour-change.mdx index 835aec7..ae59af4 100644 --- a/content/resources/stop-on-colour-change.mdx +++ b/content/resources/stop-on-colour-change.mdx @@ -3,61 +3,17 @@ title: "Activity: Stop On Colour Change" date: "2021-06-03" categories: ["Activities", "All"] tags: ["Colour Sensors", "Branching", "Iteration"] +codingSkills: ["Branching", "Iteration"] +roverConcepts: ["Colour"] excerpt: "Learn branching, iteration, and how to use the colour sensors." featuredImage: "/images/resources/stop-on-colour-change.png" --- Program the rover to keep moving forward until it detects a change of floor colour with the colour sensors. Once it detects this colour, stop the rover. -#### - Relevant Coding Skills +### Activity Demonstration - Branching - - --> - - Iteration - - Functions - - Variables - - --> - - Algorithm Design - - --> - - Maths - -#### - Relevant Rover Concepts - - Ultrasonic - - --> - - IR - - --> - - Colour - - Gyroscope - - Accelerometer - - Motors - - LEDs - - --> - - Buzzer - - --> - -Activity Demonstration + ### Setup diff --git a/content/resources/sumo-ii.mdx b/content/resources/sumo-ii.mdx new file mode 100644 index 0000000..4daa0c9 --- /dev/null +++ b/content/resources/sumo-ii.mdx @@ -0,0 +1,40 @@ +--- +title: "Activity: Sumo II" +date: "2021-06-04" +categories: ["Activities", "All", "Simulator Activities"] +tags: ["Colour Sensors", "Branching", "Iteration", "Algorithm Design", "Ultrasonic", "IR", "Motors", "Intermediate"] +excerpt: "Improve your sumo algorithm by adding IR sensors to detect opponents from the sides and implementing smarter search patterns." +featuredImage: "/images/resources/sumo.png" +--- + +Level up your sumo robot. In this intermediate challenge, you'll add the IR distance sensors to detect opponents from multiple directions and create a smarter search pattern to find and engage your opponent faster. + +Activity Demonstration + +### Setup + +Use the same sumo arena setup as Sumo I. A circular arena with clear edge markings, 60-100cm in diameter. + +### Building On Sumo I + +In Sumo I we used the colour sensor to avoid the edge and the ultrasonic sensor to detect opponents ahead. This works, but the rover can only find opponents directly in front of it. By adding the IR sensors we can detect opponents to the left and right as well. + +#### Stage 1: Add IR Sensor Detection + +After checking for the arena edge with the colour sensor, add ELSE IF conditions to check the left and right IR sensors. If an opponent is detected to the left, turn left and charge. If detected to the right, turn right and charge. This gives the rover a much wider detection range. + +#### Stage 2: Smarter Search Pattern + +Instead of just driving forward when no opponent is detected, implement a search pattern. Spin slowly on the spot while checking all three distance sensors. Once an opponent is detected in any direction, turn to face them and charge at full speed. + +#### Stage 3: Edge Recovery + +Improve the edge avoidance behaviour. Instead of just reversing and turning a fixed amount, reverse and then spin to scan for the opponent before moving forward again. This prevents the rover from wasting time after hitting the edge. + +### Up Next + +Ready for advanced sumo? In Sumo III you'll use the gyroscope and accelerometer for precise control and defensive strategies. + +[Activity: Sumo I](/resources/sumo) + +[Activity: Sumo III](/resources/sumo-iii) diff --git a/content/resources/sumo-iii.mdx b/content/resources/sumo-iii.mdx new file mode 100644 index 0000000..f3cf665 --- /dev/null +++ b/content/resources/sumo-iii.mdx @@ -0,0 +1,44 @@ +--- +title: "Activity: Sumo III" +date: "2021-06-05" +categories: ["Activities", "All", "Simulator Activities"] +tags: ["Colour Sensors", "Branching", "Iteration", "Algorithm Design", "Ultrasonic", "IR", "Gyroscope", "Accelerometer", "Motors", "Functions", "Advanced"] +excerpt: "Master sumo with advanced strategies using the gyroscope for precise movement, the accelerometer for defensive tactics, and functions for clean code." +featuredImage: "/images/resources/sumo.png" +--- + +Create the ultimate sumo algorithm. Use every sensor on the rover to build an advanced strategy that combines precise movement with the gyroscope, defensive detection with the accelerometer, and organised code using functions. + +Activity Demonstration + +### Setup + +Use the same sumo arena setup. For an extra challenge, try a smaller arena (40-50cm diameter) to force more aggressive and precise play. + +### Building On Sumo II + +In Sumo II we added IR sensors and a search pattern. Now we'll use the gyroscope for controlled turning, the accelerometer for defensive awareness, and functions to keep our code organised. + +#### Stage 1: Precise Movement With The Gyroscope + +Use the gyroscope to make controlled turns when searching for opponents. Instead of spinning wildly, rotate in measured increments (e.g. 30 degrees at a time) while checking sensors between each turn. This creates a systematic sweep of the arena. + +#### Stage 2: Defensive Tactics With The Accelerometer + +The accelerometer can detect when your rover is being pushed or tipped by an opponent. If a sudden acceleration is detected from behind or the side, the rover knows it's under attack. Program a defensive response: spin to face the attacker and counter-charge. + +#### Stage 3: Organise With Functions + +Create functions for each behaviour: `checkEdge`, `scanForOpponent`, `charge`, `defend`, and `searchPattern`. Your main loop should read as a clear sequence of decisions. This makes it much easier to test and tweak individual strategies. + +#### Stage 4: Adaptive Strategy + +Combine everything into an adaptive algorithm. Start with a search pattern, charge when an opponent is found, defend when being attacked, and always stay away from the edge. The priority order matters: edge avoidance should always come first, then defence, then attack, then search. + +### Challenge + +Battle the AI opponents in the Micromelon Robot Simulator. Can you defeat all three difficulty levels? Try designing a 3D printed attachment to give your rover an extra advantage. + +[Activity: Sumo I](/resources/sumo) + +[Activity: Sumo II](/resources/sumo-ii) diff --git a/content/resources/sumo.mdx b/content/resources/sumo.mdx index f9045b1..ae1ddb2 100644 --- a/content/resources/sumo.mdx +++ b/content/resources/sumo.mdx @@ -1,55 +1,17 @@ --- -title: "Activity: Sumo" +title: "Activity: Sumo I" date: "2021-06-03" categories: ["Activities", "All", "Simulator Activities"] -tags: ["Colour Sensors", "Branching", "Iteration", "Algorithm Design", "Ultrasonic", "IR", "Motors", "Advanced"] -excerpt: "Learn branching, iteration, algorithm design, and how to use the Rover’s motors, colour, ultrasonic, and IR sensors." +tags: ["Colour Sensors", "Branching", "Iteration", "Algorithm Design", "Ultrasonic", "Motors", "Beginner"] +excerpt: "Learn the basics of sumo by programming your rover to stay in the ring and push opponents out using the colour and ultrasonic sensors." featuredImage: "/images/resources/sumo.png" --- -A classic robotics competition challenge. Have your rovers battle in the sumo ring. If a rover is disabled or leaves the ring for any reason it loses the match. There are many possible approaches to staying in the ring while pushing the opponent out. This challenge is a great opportunity to design attachments for your rovers. +A classic robotics competition challenge. Program your rover to stay inside the sumo ring and push opponents out. In this first level, you’ll use the colour sensor to detect the arena edge and the ultrasonic sensor to find your opponent. -#### - Relevant Coding Skills +### Activity Demonstration - Branching - - Iteration - - Functions - - Variables - - --> - - Algorithm Design - - Maths - -#### - Relevant Rover Concepts - - Ultrasonic - - IR - - Colour - - Gyroscope - - Accelerometer - - Motors - - LEDs - - --> - - Buzzer - - --> - -Activity Demonstration + ### Setup @@ -61,20 +23,28 @@ Use a desk as the arena floor and make the arena circle with coloured tape. ### Here’s Our Approach -Note that this is a simple approach that should be improved upon. Try different tactics and include sensors like IR and Accelerometer to better find and push your opponent. +This is a simple approach using just the colour sensor and ultrasonic sensor to get you started. #### Stage 1: Stay Away From The Edge First we will add a repeat while true loop as we want our code to run continuously. We can then use an IF statement to move backward and turn around if the colour sensor detects the edge of the ring. -#### **Stage 2: Move Around The Ring** +#### Stage 2: Move Around The Ring If the robot doesn’t detect the edge it should move in search of the opponent. We can use the ELSE part of the IF statement to move forward. -#### **Stage 3: Push The Opponent** +#### Stage 3: Push The Opponent Staying in the ring is most important. After checking for the edge, we can use an ELSE IF (ELIF) in the IF statement to detect if an opponent is in front with the ultrasonic sensor. If it is close use a motor block to set our motors to full speed to charge the opponent. ![](/images/content/1fb1c4-screenshot-2023-05-24-123918.png) Example Code + +### Up Next + +Ready to improve your sumo algorithm? In Sumo II you’ll add IR sensors to detect opponents from the sides and create smarter search patterns. + +[Activity: Sumo II](/resources/sumo-ii) + +[Activity: Sumo III](/resources/sumo-iii) diff --git a/content/resources/survey-bot.mdx b/content/resources/survey-bot.mdx index 511b8f5..c5bd0ab 100644 --- a/content/resources/survey-bot.mdx +++ b/content/resources/survey-bot.mdx @@ -3,6 +3,8 @@ title: "Activity: Survey Bot" date: "2021-06-03" categories: ["Activities", "All"] tags: ["Iteration", "IR", "Motors", "Maths", "Advanced", "Colour Sensors"] +codingSkills: ["Iteration", "Maths"] +roverConcepts: ["IR", "Motors", "Colour"] excerpt: "Learn iteration while using the IR sensors." featuredImage: "/images/resources/survey-bot.png" --- @@ -10,53 +12,9 @@ featuredImage: "/images/resources/survey-bot.png" Program the rover to perform a distance survey of the area around it. Have the rover turn on the spot and print out the value of one of the IR distance sensors at intervals around the circle. -#### - Relevant Coding Skills +### Activity Demonstration - Branching - - --> - - Iteration - - Functions - - Variables - - --> - - Algorithm Design - - --> - - Maths - -#### - Relevant Rover Concepts - - Ultrasonic - - --> - - IR - - Colour - - Gyroscope - - Accelerometer - - Motors - - LEDs - - --> - - Buzzer - - --> - -Activity Demonstration + ### Setup diff --git a/content/resources/turn-over-rover.mdx b/content/resources/turn-over-rover.mdx index 751b558..1e32c79 100644 --- a/content/resources/turn-over-rover.mdx +++ b/content/resources/turn-over-rover.mdx @@ -3,6 +3,8 @@ title: "Activity: Turn Over Rover" date: "2021-06-03" categories: ["Activities", "All"] tags: ["Branching", "Iteration", "Accelerometer", "LEDs", "Beginner"] +codingSkills: ["Branching", "Iteration"] +roverConcepts: ["Accelerometer", "LEDs"] excerpt: "Learn branching, iteration, and how to use the accelerometer and LEDs." featuredImage: "/images/resources/turn-over-rover.png" --- @@ -10,53 +12,9 @@ featuredImage: "/images/resources/turn-over-rover.png" Program the rover to detect if it is upside down or not. When the rover is the right way up set it's LEDs to green. When the rover is upside down set the LEDs to red. The rover should change the LEDs as soon as it detects a change in orientation, you should not need to press the play button to trigger a change in colour. -#### - Relevant Coding Skills +### Activity Demonstration - Branching - - Iteration - - Functions - - Variables - - --> - - Algorithm Design - - --> - - Maths - -#### - Relevant Rover Concepts - - Ultrasonic - - --> - - IR - - --> - - Colour - - Gyroscope - - Accelerometer - - Motors - - --> - - LEDs - - Buzzer - - --> - -Activity Demonstration + ### Setup diff --git a/content/resources/windup-rover.mdx b/content/resources/windup-rover.mdx index 2774e03..8ce45a6 100644 --- a/content/resources/windup-rover.mdx +++ b/content/resources/windup-rover.mdx @@ -3,6 +3,8 @@ title: "Activity: Wind-up Rover" date: "2021-06-03" categories: ["Activities", "All"] tags: ["Iteration", "Variables", "Accelerometer", "Motors", "Maths", "Intermediate"] +codingSkills: ["Iteration", "Variables", "Maths"] +roverConcepts: ["Accelerometer", "Motors"] excerpt: "Learn iteration, variables, maths, and how to use the Rover’s motors and accelerometer." featuredImage: "/images/resources/windup-rover.jpg" --- @@ -10,53 +12,9 @@ featuredImage: "/images/resources/windup-rover.jpg" Create a classic wind up toy out of our rover. The rover records the number of seconds that it is held upside down and once placed right way up on a surface it will move forward. The longer the rover was held upside down the longer it will move forward and the faster it will go. For more interesting wind up rovers, incorporate the LEDs and Buzzers to also respond and change to the wind up time. -#### - Relevant Coding Skills +### Activity Demonstration - Branching - - --> - - Iteration - - Functions - - Variables - - Algorithm Design - - --> - - Maths - -#### - Relevant Rover Concepts - - Ultrasonic - - --> - - IR - - --> - - Colour - - Gyroscope - - Accelerometer - - Motors - - LEDs - - --> - - Buzzer - - --> - -Activity Demonstration + ### Setup diff --git a/src/app/code-editor/page.tsx b/src/app/code-editor/page.tsx index 07c952e..337316e 100644 --- a/src/app/code-editor/page.tsx +++ b/src/app/code-editor/page.tsx @@ -3,7 +3,6 @@ import Image from "next/image"; import { Container } from "@/components/layout/Container"; import { Button } from "@/components/ui/Button"; import { SectionHeading } from "@/components/ui/SectionHeading"; -import { Card } from "@/components/ui/Card"; import { RelatedResources } from "@/components/ui/RelatedResources"; import { getAllResources } from "@/lib/resources"; @@ -13,57 +12,6 @@ export const metadata: Metadata = { "Software that makes coding easier for students and gives flexibility to teachers. Drag-and-drop blocks, Python, and classroom management tools.", }; -const features = [ - { - title: "Code To Blocks", - description: - "Real time translation between block and text code, easing the learning curve.", - icon: ( - - - - ), - }, - { - title: "For Everyone", - description: - "Switch between coding with blocks, text or both. Set the view for your students.", - icon: ( - - - - ), - }, - { - title: "Access Work Anywhere", - description: - "Students can access their work from any computer with the Micromelon Code Editor installed.", - icon: ( - - - - ), - }, - { - title: "Code Highlighting", - description: - "Watch the robot run code live in both blocks and text for easy debugging.", - icon: ( - - - - ), - }, -]; - -const classroomFeatures = [ - "Disable Student Robots", - "Mute Student Robots", - "Hide Student Screens", - "Share Your Screen with the class", - "View Student Work Any Time", -]; - export default function CodeEditorPage() { const resources = getAllResources(); const relatedResources = resources @@ -78,114 +26,288 @@ export default function CodeEditorPage() { {/* Hero */}
-
-

- Code Editor & Classroom Organizer -

-

- Software that makes coding easier for students and gives - flexibility to teachers. -

+
+
+

+ Code Editor & Classroom Organizer +

+

+ Software that makes coding easier for students and gives + flexibility to teachers. Switch between blocks, text, or both. +

+
+ + +
+
+
+ Micromelon Code Editor showing block-based coding interface +
- {/* Feature Cards */} + {/* Three Coding Modes */}
-
- {features.map((feature) => ( - -
{feature.icon}
-

- {feature.title} -

+ +
+ {/* Block Mode */} +
+
+ Block-based coding view with drag and drop blocks +
+
+

Block Mode

- {feature.description} + Drag and drop code blocks from categorised menus. Great for beginners learning programming concepts without syntax worries.

- - ))} +
+
+ {/* Text Mode */} +
+
+ Text-based Python coding with syntax highlighting and Function Dictionary +
+
+

Text Mode

+

+ Write Python code directly with syntax highlighting, a built-in function dictionary, and a live console for debugging. +

+
+
+ {/* Mixed Mode */} +
+
+ Mixed mode showing blocks and text side by side +
+
+

Mixed Mode

+

+ See blocks and text side-by-side with real-time translation between them. Watch how blocks become Python code as you build. +

+
+
+
+ +
+ + {/* Live Code Highlighting */} +
+ +
+
+

+ Real-Time Code Highlighting +

+

+ Watch the rover execute your code line by line. Both the block and text views highlight in real time so students can see exactly what their code is doing and debug issues quickly. +

+
    +
  • + + Blocks and text highlight simultaneously as code runs +
  • +
  • + + Built-in Function Dictionary for quick reference +
  • +
  • + + Console output for print statements and error messages +
  • +
+
+
+ Code highlighting as the rover executes a program +
{/* Classroom Management */} -
+
+
Micromelon Classroom Management interface
-

- Classroom Management -

-

- The Micromelon Code Editor is designed to make teaching Digital - Technologies as easy as possible. +

+ Full Control of Student Devices +

+

+ Manage your entire class from a single dashboard. Control what students can see and do, share your screen, and monitor progress in real time.

    - {classroomFeatures.map((feature) => ( -
  • - - {feature} -
  • - ))} +
  • + + Disable or mute student robots +
  • +
  • + + Hide student screens for attention +
  • +
  • + + Share your screen with the class +
  • +
  • + + View student work any time +
  • +
  • + + Quick Join Code for easy class setup +
- {/* Privacy */} -
+ {/* Key Features */} +
-
-

- Privacy First -

-

- Privacy comes first - we don't require any personal - information on students. -

+ +
+ {/* Sensor View */} +
+
+ Sensor view showing real-time data from the rover +
+
+

Sensor View

+

+ A live dashboard showing all sensor data from the rover in real time. See colour, IR, ultrasonic, and gyro readings as they change. +

+
+
+ {/* Project Explorer */} +
+
+ Project Explorer showing saved student projects +
+
+

Project Explorer

+

+ Students can save and manage multiple projects. Pick up where you left off from any computer with the Code Editor installed. +

+
+
+ {/* Python Library */} +
+
+ Micromelon Python library used in VS Code +
+
+

Python Library

+

+ Advanced students can move beyond the Code Editor and control their rover from any Python environment, including VS Code and PyCharm, using the Micromelon Python library. +

+
+
+ {/* Login */} +
+
+ Adding students to a class and inviting them via email +
+
+

Login with Microsoft, Google or Create Accounts

+

+ Students can sign in with their school Microsoft or Google account, or teachers can create simple username-only accounts with no personal information required. +

+
+
{/* System Requirements */} -
+
- -
-
- -

- Windows -

-
    -
  • Windows 10 Version 1703 or later
  • -
  • Bluetooth 4.0 LE
  • -
  • Minimum 2GB RAM
  • -
-
- -

macOS

-
    -
  • macOS 10.10 or later
  • -
  • Bluetooth 4.0 LE
  • -
  • Minimum 2GB RAM
  • -
-
-
+
+

+ System Requirements +

+

+ Windows 10 Version 1703 or later · macOS 10.10 or later · Bluetooth 4.0 LE · 2GB RAM +

diff --git a/src/app/python/page.tsx b/src/app/python/page.tsx index 5eccd8d..a9a6e14 100644 --- a/src/app/python/page.tsx +++ b/src/app/python/page.tsx @@ -16,7 +16,7 @@ export default function PythonPage() { const resources = getAllResources(); const relatedResources = resources .filter((r) => r.categories.includes("Advanced Guides")) - .slice(0, 4); + .slice(0, 3); return ( <> diff --git a/src/app/resources/[slug]/page.tsx b/src/app/resources/[slug]/page.tsx index 16e5a70..818e7a8 100644 --- a/src/app/resources/[slug]/page.tsx +++ b/src/app/resources/[slug]/page.tsx @@ -26,6 +26,7 @@ const mdxComponents = { }; const NEWS_CATEGORIES = ["News & Updates", "Customer Stories"]; +const ACTIVITY_CATEGORIES = ["Activities", "Simulator Activities"]; const CATEGORY_SLUGS: Record NEWS_CATEGORIES.includes(cat) ); + const isActivity = resource.categories.some((cat) => + ACTIVITY_CATEGORIES.includes(cat) + ); + + if (isActivity) { + return ( + <> + {/* Activity Hero */} +
+ + +
+
+
+ {resource.categories.map((cat) => ( + + {cat} + + ))} +
+

+ {resource.title} +

+ {(resource.codingSkills.length > 0 || resource.roverConcepts.length > 0) && ( +
+ {resource.codingSkills.length > 0 && ( +
+

+ Coding Skills +

+
+ {resource.codingSkills.map((skill) => ( + + {skill} + + ))} +
+
+ )} + {resource.roverConcepts.length > 0 && ( +
+

+ Rover Concepts +

+
+ {resource.roverConcepts.map((concept) => ( + + {concept} + + ))} +
+
+ )} +
+ )} +
+ {resource.featuredImage && ( +
+ {resource.title} +
+ )} +
+
+
+ + {/* Activity Content */} +
+ +
+ +
+
+ +
+
+
+ + ); + } + + const backHref = isNews ? "/news" : "/resources"; + const backLabel = isNews ? "Back to News" : "Back to Resources"; + const returnLabel = isNews ? "Return to News" : "Return to Resources"; return ( -
- - - - {/* Header */} -
-
- {resource.categories.map((cat) => ( - - {cat} - - ))} -
-

- {resource.title} -

-

- {new Date(resource.date).toLocaleDateString("en-AU", { - year: "numeric", - month: "long", - day: "numeric", - })} -

-
- - {/* Cover Image */} - {resource.featuredImage && ( -
- {resource.title} -
- )} - - {/* MDX Content */} -
- -
- - {/* Return button */} -
- -
-
-
+
+
+
+ {resource.categories.map((cat) => ( + + {cat} + + ))} +
+

+ {resource.title} +

+

+ {new Date(resource.date).toLocaleDateString("en-AU", { + year: "numeric", + month: "long", + day: "numeric", + })} +

+
+ {resource.featuredImage && ( +
+ {resource.title} +
+ )} +
+ +
+ + {/* Content */} +
+ +
+ +
+
+ +
+
+
+ ); } diff --git a/src/app/robot-simulator/page.tsx b/src/app/robot-simulator/page.tsx index 2201712..6c3b766 100644 --- a/src/app/robot-simulator/page.tsx +++ b/src/app/robot-simulator/page.tsx @@ -3,7 +3,6 @@ import Image from "next/image"; import { Container } from "@/components/layout/Container"; import { Button } from "@/components/ui/Button"; import { SectionHeading } from "@/components/ui/SectionHeading"; -import { Card } from "@/components/ui/Card"; import { RelatedResources } from "@/components/ui/RelatedResources"; import { getAllResources } from "@/lib/resources"; @@ -13,54 +12,11 @@ export const metadata: Metadata = { "Filled with virtual exercises, the Simulator is great for homework and running complex challenges. No physical robot needed.", }; -const benefits = [ - { - title: "Imagine Anything", - description: - "An extensive range of unique and challenging exercises included.", - icon: ( - - - - ), - }, - { - title: "No Setup, No Hassle", - description: - "No need to build mazes, set up ramps, or tape down exercise mats.", - icon: ( - - - - ), - }, - { - title: "Unlimited Challenges", - description: - "Computer generated challenges that can create progressively more difficult tasks.", - icon: ( - - - - ), - }, - { - title: "Robot Time All The Time", - description: - "Students can work at home without needing access to a real rover.", - icon: ( - - - - ), - }, -]; - export default function RobotSimulatorPage() { const resources = getAllResources(); const relatedResources = resources .filter((r) => r.categories.includes("Simulator Activities")) - .slice(0, 4); + .slice(0, 3); return ( <> @@ -73,17 +29,25 @@ export default function RobotSimulatorPage() { The Robot Simulator

- Filled with virtual exercises, the Simulator is great for - homework and running complex challenges. + Filled with virtual exercises, the Simulator is great for homework + and running complex challenges. No physical robot needed.

+
+ + +
Micromelon Robot Simulator
@@ -91,27 +55,138 @@ export default function RobotSimulatorPage() {
- {/* Benefits */} + {/* Simulator Demo */}
-
- {benefits.map((benefit) => ( - -
{benefit.icon}
-

- {benefit.title} -

+
+
+

+ A Virtual Rover You Can Program +

+

+ The Simulator gives every student their own rover to experiment + with, no hardware required. Write code in the Micromelon Code + Editor and watch it run in real time on a virtual rover. +

+
    +
  • + + Same code works on real and simulated rovers +
  • +
  • + + No setup needed. No mazes, ramps, or exercise mats +
  • +
  • + + Students can practise at home without a physical rover +
  • +
+
+
+ Simulator demo showing a virtual rover navigating an exercise +
+
+ +
+ + {/* Simulator Features */} +
+ + +
+ {/* Getting Started */} +
+
+ Opening the simulator for the first time and exploring the environment +
+
+

Virtual Exercises

- {benefit.description} + An extensive range of unique and challenging exercises included. Computer-generated challenges create progressively harder tasks.

- - ))} +
+
+ {/* Camera Controls */} +
+
+ Demonstrating camera controls to pan, zoom, and rotate the 3D view +
+
+

Camera Controls

+

+ Pan, zoom, and rotate the 3D view to watch your rover from any angle. Follow your rover as it moves through an exercise. +

+
+
+ {/* Keyboard Controls */} +
+
+ Toggling keyboard controls to manually drive the virtual rover +
+
+

Keyboard Controls

+

+ Drive the virtual rover manually with your keyboard. Great for exploring exercises and understanding the environment before writing code. +

+
+
+ {/* Annotated View */} +
+
+ Annotated simulator view showing sensor data overlays on the rover +
+
+

Simulated Sensors

+

+ The virtual rover has all the same sensors as the real one: colour, IR, ultrasonic, and gyroscope. Read sensor data and use it in your code. +

+
+
{/* Code Editor Connection */} -
+

@@ -119,7 +194,8 @@ export default function RobotSimulatorPage() {

Write the same code for a simulated rover as you would for a real - Micromelon Rover. + Micromelon Rover. Switch between blocks and text, and run your + programs instantly in the Simulator.

@@ -129,30 +205,15 @@ export default function RobotSimulatorPage() {
{/* System Requirements */} -
+
- -
-
- -

- Windows -

-
    -
  • Windows 10 or later
  • -
  • Minimum 4GB RAM
  • -
  • DX10 / DX11 / DX12 capable GPU
  • -
-
- -

macOS

-
    -
  • macOS 10.13 or later
  • -
  • Minimum 4GB RAM
  • -
  • Metal capable GPU
  • -
-
-
+
+

+ System Requirements +

+

+ Windows 10 or later · macOS 10.13 or later · 4GB RAM · DX10+ or Metal capable GPU +

diff --git a/src/app/rover/page.tsx b/src/app/rover/page.tsx index fc6de22..2b1bc71 100644 --- a/src/app/rover/page.tsx +++ b/src/app/rover/page.tsx @@ -101,7 +101,7 @@ export default function RoverPage() { r.categories.includes("Getting Started") || r.categories.includes("Activities") ) - .slice(0, 4); + .slice(0, 3); return ( <> diff --git a/src/lib/resources.ts b/src/lib/resources.ts index 80d862f..44a2089 100644 --- a/src/lib/resources.ts +++ b/src/lib/resources.ts @@ -2,11 +2,17 @@ import fs from "fs"; import path from "path"; import matter from "gray-matter"; +export type Difficulty = "Beginner" | "Intermediate" | "Advanced"; + export interface Resource { slug: string; title: string; date: string; categories: string[]; + tags: string[]; + codingSkills: string[]; + roverConcepts: string[]; + difficulty?: Difficulty; excerpt: string; featuredImage?: string; content: string; @@ -46,11 +52,20 @@ export function getResourceBySlug(slug: string): Resource | null { const fileContents = fs.readFileSync(fullPath, "utf8"); const { data, content } = matter(fileContents); + const tags: string[] = data.tags ?? []; + const difficultyTag = tags.find( + (t) => t === "Beginner" || t === "Intermediate" || t === "Advanced" + ) as Difficulty | undefined; + return { slug, title: data.title ?? slug, date: data.date ?? "", categories: data.categories ?? [], + tags, + codingSkills: data.codingSkills ?? [], + roverConcepts: data.roverConcepts ?? [], + difficulty: difficultyTag, excerpt: data.excerpt ?? "", featuredImage: data.featuredImage, content,