Files
micromelon-website/content/resources/flip-bot.mdx
Tim Hadwen 707c49dd3f Build Your Kit page and full Micromelon website
Complete website build including:
- Build Your Kit store page with cart system, sectioned layout
  (Hardware, Software, Attachments, Spare Parts), inline quote
  request form, and sticky sidebar summary
- 16+ pages: Education, Platform, Resources, News, About Us,
  Download, Contact, Rover, Code Editor, Robot Simulator, etc.
- 89+ MDX resource articles and 18 news posts
- Store product images scraped from micromelon.com.au
- Quote request API route with Airtable integration
- Dynamic back links and cover photos on resource pages
- Redesigned downloads page
- Fixed corrupted MDX code blocks
2026-02-28 19:00:42 +10:00

143 lines
3.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Activity: Flip Bot"
date: "2021-06-03"
categories: ["Activities", "All"]
tags: ["Branching", "Iteration", "Accelerometer", "Motors", "Intermediate"]
excerpt: "Learn branching, iteration, and how to use the accelerometer."
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
Branching
Iteration
Functions
Variables
-->
Algorithm Design
-->
Maths
####
Relevant Rover Concepts
Ultrasonic
-->
IR
-->
Colour
Gyroscope
Accelerometer
Motors
LEDs
-->
Buzzer
-->
Activity Demonstration
### Setup
The most common way to flip the rover is having it drive up a flat vertical surface and fall backwards. Perhaps using the back of a laptop screen, a book, or a wall. These are not the only solutions. See what other driving conditions might make the robot flip.
### Heres Our Approach
This solution can be extended to make the rover reset itself and include LEDs
#### Stage 1
Start moving forward to eventually encounter a vertical obstacle.
#### **Stage 2**
Add a repeat block where the condition is a sensor block that checks if the rover is right way up. This will cause the rover to wait until it is not the right way up.
#### **Stage 3**
After the loop that waits for the robot to flip we add a motor block to stop the rover.
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/8c796e2c-5452-45af-a3f9-fbb9eb1ac363/Screenshot+2023-10-31+083156.png)
Example Code
### Related Posts
Resources
[
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1639455538805-9NI7CPKR7IYG6D4RBKAN/high+quality+sumo.png)
](/resources/creating-a-sumo-unit)
[All](/resources?category=All)
[Creating A Sumo Unit For Your Digital Technologies Class](/resources/creating-a-sumo-unit)
[All](/resources?category=All)
How to run a sumo unit in your digital technologies classroom.
[Read More →](/resources/creating-a-sumo-unit)
[All](/resources?category=All)
[
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1637464845856-BBPD7GTIIHHOSJCFORWF/the+ultrasonic+sensor.png)
](/resources/ultrasonic-sensor)
[All](/resources?category=All), [Guides](/resources?category=Guides)
[The Ultrasonic Sensor](/resources/ultrasonic-sensor)
[All](/resources?category=All), [Guides](/resources?category=Guides)
Learn all about the ultrasonic sensor!
[Read More →](/resources/ultrasonic-sensor)
[All](/resources?category=All), [Guides](/resources?category=Guides)
[
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1625616494179-LZHZP5MUA0E0MQKEB7HC/cropped+image+4.png)
](/resources/year-7-digital-tech-at-st-peters)
[All](/resources?category=All), [Customer Stories](/resources?category=Customer+Stories)
[Case Study: Year 7 Digital Tech at St Peters Lutheran College](/resources/year-7-digital-tech-at-st-peters)
[All](/resources?category=All), [Customer Stories](/resources?category=Customer+Stories)
See how Meg Foley at St Peters conducted a challenge for their Year 7s using Micromelon.
[Read More →](/resources/year-7-digital-tech-at-st-peters)
[All](/resources?category=All), [Customer Stories](/resources?category=Customer+Stories)