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,140 @@
---
title: "Activity: Colourful Sounds"
date: "2021-06-03"
categories: ["Activities", "All"]
tags: ["Colour Sensors", "Iteration", "Buzzer", "LEDs", "Maths", "Intermediate"]
excerpt: "Learn iteration and how to use the colour sensor, LEDs, and buzzer."
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
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1622691478946-R1HY13KLGAY8T9YJUTX5/colourfulsounds.png)
Activity Demonstration
### Setup
This exercise requires access to many different coloured surfaces or cards. Lay them out in different orders on the floor and have the rover drive across them to play different tunes. To make this music sound good you will have to do some more complex calculations from the hue value to frequency. Try looking up the frequencies of musical notes.
### Heres Our Approach
#### Stage 1
We want to set all our LEDs to the colour our sensor is detecting. The Set LED blocks use an RGB value. The blocks we use to get colour sensor values do not return values in RGB. This means we need a way to translate the value from our colour sensor to an RGB value. One of the values we can get from our colour sensor block is hue, we can use a hue to colour block from the colour category and place that in our Set all LEDs block.
**Stage 2**
The hue colour sensor block returns a single number. We can program our rovers buzzer to play sound at a specific frequency (in Hz), which is just a number of vibrations per second. We can place the hue value we get from our colour sensor directly inside our Play Sound block. We multiply this with a math block to make the sound more pronounced. See if you can add to this calculation to make better music.
#### **Stage 3**
We want to repeat this behaviour indefinitely so once its running we can pickup and move move our robot over new colours around us and it will play sound.
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1622691451073-Q4DJXIV8XQ9HKA09RZH1/colourfulsounds-answer.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)