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
This commit is contained in:
Tim Hadwen
2026-02-28 19:00:42 +10:00
parent 5233233662
commit 707c49dd3f
320 changed files with 22333 additions and 107 deletions

View File

@@ -0,0 +1,138 @@
---
title: "Activity: Puppy Bot"
date: "2021-06-03"
categories: ["Activities", "All"]
tags: ["Branching", "Iteration", "Functions", "Motors", "Ultrasonic", "Intermediate"]
excerpt: "Branching and looping with the ultrasonic sensor."
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 cant see anything with the ultrasonic, slowly spin on the spot looking for something to follow.
####
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 distances used in the code can change depending on how much space you have. Just keep in mind the max range of the ultrasonic sensor is about 100cm. If the ultrasonic sensor cant detect anything it will return a reading of 255cm. The below solution can be extended to use functions in each branch to make the rover better at finding and following people.
### Heres Our Approach
#### **Stage 1**
Start with setting up our IF statement with 3 branches. Firstly if the rover detects something within 20cm with the Ultrasonic sensor, stop the rover. Then use an ELSE IF (ELIF) that checks if the rover detects something within 50cm. Lastly we have the ELSE branch for when the ultrasonic sensor doesnt detect anything close.
#### **Stage 2**
Place the appropriate motor blocks for the conditions. When the rover is stationary waiting for its owner to move, stop all motors. When the rover is starting to chase move forward at high speed. When it senses nothing from the ultrasonic just slowly turn on the spot searching.
#### **Stage 3**
We want to repeat this behaviour forever so place everything inside a repeat while true loop.
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/6c51d7ee-9ced-45a5-ab6f-48ec3b39b1d5/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)