Major site overhaul: resources hub, content migration, new blog posts, forms

- Redesign /resources as sectioned hub with category pages
- Migrate 645 Squarespace CDN images to local /images/content/
- Create 9 new news/blog posts with event photos
- Fix blog post slugs (rename gibberish filenames)
- Rename Design Blog to Design Blogs across site
- Remove education page, replace with Platform in nav
- Redesign rover repair request form with dynamic rover entries
- Add school search combobox to contact, store, and repair forms
- Extract shared KNOWN_SCHOOLS data
- Make /rover-expansion-3d-printing dynamically pull from MDX
- Add related resources sections to product pages
- Fix homepage broken /quote links to /store
- Store page: sample kit cards, inline quote builder, mailing list opt-in
This commit is contained in:
Tim Hadwen
2026-03-01 17:14:05 +10:00
parent 707c49dd3f
commit ae3ae18585
1212 changed files with 2477 additions and 6948 deletions

View File

@@ -1,13 +1,13 @@
---
title: "The Accelerometer"
date: "2021-06-22"
categories: ["All", "Guides"]
categories: ["All", "Sensor Guides"]
tags: []
excerpt: "Learn what the accelerometer is and how to code it."
featuredImage: "/images/resources/accelerometer.gif"
---
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1624308220564-JGA87APUQZ8SP6YUVIL5/diagram.png)
![](/images/content/c5f02a-diagram.png)
The accelerometer is one of the the five sensor types on the Micromelon Rover. The accelerometer is a component built into the Rovers PCB (printed circuit board). Its only about a 2.5mm x 3.0mm wide and 0.83mm tall. That component also includes another sensor, the gyroscope.
@@ -23,9 +23,7 @@ Before we get into the mechanics of an accelerometer, we need to cover some phys
Acceleration is the change in velocity of an object. For example when you go from a walk to a run, you are accelerating by using the forces you generate with your muscles. As you slow down, you decrease your acceleration. All movement has a rate of acceleration. Whenever our rovers are moved, either by a force like gravity or the rotation of their motors, that movement also have a rate of acceleration.
**Forces**
When we push our rover, we are applying a force to it. When that force is unopposed the rover will be in motion. Anything that can apply motion to the Rover and change its position in space is considered a force. We can organize all forces into two categories, **static forces** & **dynamic forces**.
**Forces** When we push our rover, we are applying a force to it. When that force is unopposed the rover will be in motion. Anything that can apply motion to the Rover and change its position in space is considered a force. We can organize all forces into two categories,** static forces**&** dynamic forces**.
**Dynamic Force**
@@ -45,11 +43,11 @@ The accelerometer on the Rover is a MEMS accelerometer. MEMS stands for microele
Depending on how the spring contracts, expands, and tilts, the accelerometer can measure acceleration.
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1624336913633-VY5GQ36LSDO8KPRET58Z/accelerometer+diagram.png)
![](/images/content/5bb4d8-accelerometer-diagram.png)
Simplified Accelerometer Example
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1624489447617-SAJNIG5BZQGZJMHE7X2I/demonstration+evened+out+-+3.gif)
![](/images/content/c2b414-demonstration-evened-out-3.gif)
Lets walk through an example where the outside force is gravity.
@@ -59,19 +57,15 @@ Lets walk through an example where the outside force is gravity.
- When the rover is flipped upside down, the accelerometer is as well. The weight is still pulled down by gravity but now the spring is extending.
**When the spring compresses & extends, the accelerometer can detect there is force being applied to the rover. **
So we have a rough idea of how the accelerometer is able to determine that force is being applied. Lets talk now about how it communicates to us where the force is coming from. ** **
**When the spring compresses & extends, the accelerometer can detect there is force being applied to the rover.** So we have a rough idea of how the accelerometer is able to determine that force is being applied. Lets talk now about how it communicates to us where the force is coming from.** **
**The 3 Axes Of Movement**
With the accelerometer, our Rover can detect its acceleration, but it needs a way to communicate it. It would be a bit confusing if our Rover told us *“hey Im accelerating down but Im upside down so Im moving in this direction but also accelerating to the side as well to my right, your left…”*. This is a bit confusing. We need a simple way for us to understand and communicate the rovers direction of motion. This is what the axes of movement are for.
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1624491832533-FNRJ3MWTB50A5FNHLWWQ/rotating+planes.gif)
![](/images/content/5e899d-rotating-planes.gif)
**The X, Y, and Z axes**
The **X axis **runs from back to front of the rover. The **Y axis** runs across the rover middle from left to right. The **Z axis** runs up and down through the rover.
**The X, Y, and Z axes** The ** X axis** runs from back to front of the rover. The ** Y axis** runs across the rover middle from left to right. The ** Z axis** runs up and down through the rover.
As the rover moves, these axis stay localized to the rover. So as the rover rotates, the axis rotate with it. You can see where the 3 Axes are on the rover and how they move when it rotates.
@@ -79,11 +73,11 @@ As the rover moves, these axis stay localized to the rover. So as the rover rota
Lets look back at our weight and spring example and apply the 3 axis of movement to it. Remember, the 3 axis are localized to the rover. As the Rover rotates, the axis rotate as well.
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1624411779388-PGKSPLKDM78LHL422H03/z+axis+up+right.png)
![](/images/content/bb1784-z-axis-up-right.png)
The force of gravity is applied downwards on the Rover as it sits flat. **The accelerometer detects force of gravity against the Z axis**.** **
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1624411794778-H6PKSWQMH2PZ6U98GCX9/z+axis+down+bad.png)
![](/images/content/55c0c4-z-axis-down-bad.png)
When the rover flips over the force is still applying downwards but to the Rovers underside. **The accelerometer detects force of gravity going with the Z axis.**
@@ -95,19 +89,17 @@ The accelerometer is a device built into the Rover. As forces like gravity, our
Similar to how the Rover may use the accelerometer to help balance itself, humans also have a form of accelerometer we use to balance. Our accelerometer is in our ear, specifically a part of our ear called the inner ear.
**How the Inner Ear Helps Us Balance**
The inner ear has a lot of parts, not all of them are to help us balance. Three parts that do help us balance are the three semicircular canals. These are named the **posterial**, **anterior **& **lateral **canals.
**How the Inner Ear Helps Us Balance** The inner ear has a lot of parts, not all of them are to help us balance. Three parts that do help us balance are the three semicircular canals. These are named the ** posterial**,** anterior **&** lateral** canals.
Inside these canals are tiny hairs and liquid. As we move our head the liquid inside the canals shifts back and forth. The tiny hairs detect the liquid moving and send signals to our brain.
Our Rovers accelerometer is designed to understand movement along 3 axes. Our inner ear does the same, each semicircular canal is responsible for an axis. The Lateral canal is for our Z axis, the Anterior for our Y axis and the Posterior for the X axis.
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1625007193961-15WFOFS3X7HH5K7HL55L/ear+diagram.png)
![](/images/content/ad188e-ear-diagram.png)
Diagram of the ear
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1625008085436-MYXNF8R3CWFUHV7YYOCH/inner+ear+diagram.png)
![](/images/content/1c3563-inner-ear-diagram.png)
Diagram of the inner ear
@@ -117,19 +109,19 @@ Open up the Code Editor, connect to a Micromelon Rover and open up the sensor vi
In the sensor view dialog, the accelerometer values are located in the bottom right table. The first column of the table is the accelerometer values. Move the rover around and take note of how the X, Y and Z values change.
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1623908456123-SFLGD6EJY3YZD9ICDIIR/opening+sensor+view.gif)
![](/images/content/f16a1c-opening-sensor-view.gif)
**Understanding Accelerometer Values**
The values you see in the accelerometer column are g-force values. G-force ( *g )* is a standard unit of measurement for force. 1*g* equals the same amount of force applied by Earths gravity. When a Rover is in free-fall, with no external forces, it will read 0*g *in all axes.
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1624427492326-NO9FNLAPKSQTZFJE7GZ4/demonstrating+g+force+upright.png)
![](/images/content/34cce4-demonstrating-g-force-upright.png)
**Demonstrating G-Force**
Rest the rover up right on a flat surface, you will see both the X and Y value are roughly 0*g*, however the Z value will be roughly 1*g*. The only force applied to the rover is Earths gravity, pushing down on the Z-axis.
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1624427468437-WBU0GXE9Y96H3SEPVA39/demonstrating+g+force+upside+down.png)
![](/images/content/a18d34-demonstrating-g-force-upside-down.png)
If you flip the rover upside down, X and Y will still be roughly 0*g*. The Z axis will be equal to roughly -1*g*. This is because Earths gravity is now going the other way on the Z axis.
@@ -141,23 +133,21 @@ Most of the time while using your rover, you will only see accelerometer reading
Lets write a simple program to change our Rovers LEDs depending on the value of the z axis of our accelerometer.
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1624429103078-T02HNN7M88C03LUNT1ZI/coding+example.gif)
![](/images/content/cc7418-coding-example.gif)
- Start by adding an **IF/ELSE **block.
- Start by adding an **IF/ELSE** block.
- Inside the condition, place a **Read X Axis From Accelerometer **block. You can find this in the **Sensors **category.
- Inside the condition, place a **Read X Axis From Accelerometer** block. You can find this in the ** Sensors** category.
- Change the **X Axis** dropdown to **Z Axis**.
- Change the **X Axis** dropdown to ** Z Axis**.
The python command for reading the Z axis is **IMU.readAccel(2)**
The python command for reading the Z axis is **IMU.readAccel(2)**- Change the second value on the **< condition** block from ** 10 to 0**. This will check if the value is either positive or negative.
- Change the second value on the **< condition** block from **10 to 0**. This will check if the value is either positive or negative.
- Inside the IF/ELSE block true case, place an **Set All LEDs** block. You can find this in the **Lights/Sound** category.
- Inside the IF/ELSE block true case, place an **Set All LEDs** block. You can find this in the ** Lights/Sound** category.
- Inside the IF/Else block false case, place another **Set All LEDs** block but set it to a different colour.
- Place the whole IF/ELSE block in a **While True **loop.
- Place the whole IF/ELSE block in a **While True** loop.
- Press Play!
@@ -166,189 +156,3 @@ While this code is running, we will see the Rover LEDs change to our selected co
### Wrapping Up
Now that were familiar with what the accelerometer is, how it works, and how to program it, its time to start doing some activities. Try these activities that require using the accelerometer.
Resources
[
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1707816060620-E9G2ZYTTX0RIM6DYI839/balance+bot.png)
](/resources/balance-bot)
Jun 4, 2021
[Activity: Balance Bot](/resources/balance-bot)
Jun 4, 2021
Learn iteration, algorithm design, maths, and how to use the Rovers accelerometer and motors.
[Read More →](/resources/balance-bot)
Jun 4, 2021
[
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/40a5024f-93a3-4d8d-8ade-505d96aa6977/Screenshot+2023-10-31+083156.png)
](/resources/windup-rover)
Jun 3, 2021
[Activity: Wind-up Rover](/resources/windup-rover)
Jun 3, 2021
Learn iteration, variables, maths, and how to use the Rovers motors and accelerometer.
[Read More →](/resources/windup-rover)
Jun 3, 2021
[
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1707816181015-J8KMIGESSN8NUSG83XOK/flip+bot.png)
](/resources/flip-bot)
Jun 3, 2021
[Activity: Flip Bot](/resources/flip-bot)
Jun 3, 2021
Learn branching, iteration, and how to use the accelerometer.
[Read More →](/resources/flip-bot)
Jun 3, 2021
[
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1622687189833-RQ5DB6PUES80KPSMWG3L/turnoverrover.png)
](/resources/turn-over-rover)
Jun 3, 2021
[Activity: Turn Over Rover](/resources/turn-over-rover)
Jun 3, 2021
Learn branching, iteration, and how to use the accelerometer and LEDs.
[Read More →](/resources/turn-over-rover)
Jun 3, 2021
### 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)
[
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1637464675848-K9YEOYK65IWRFRX4QJ1R/blog+header+image+.png)
](/resources/robot-simulator)
[All](/resources?category=All), [Getting Started](/resources?category=Getting+Started)
[Getting Started With The Robot Simulator](/resources/robot-simulator)
[All](/resources?category=All), [Getting Started](/resources?category=Getting+Started)
How to get started with the Micromelon Robot Simulator.
[Read More →](/resources/robot-simulator)
[All](/resources?category=All), [Getting Started](/resources?category=Getting+Started)
[
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1626837419969-WBB4D85KQIXSOP750N5M/resized+banner+%281%29.png)
](/resources/getting-started-with-the-micromelon-rover)
[All](/resources?category=All), [Getting Started](/resources?category=Getting+Started)
[Getting Started With The Micromelon Rover](/resources/getting-started-with-the-micromelon-rover)
[All](/resources?category=All), [Getting Started](/resources?category=Getting+Started)
Crash course on basic rover function, how and what to program and starter activities to attempt.
[Read More →](/resources/getting-started-with-the-micromelon-rover)
[All](/resources?category=All), [Getting Started](/resources?category=Getting+Started)
[
![](https://images.squarespace-cdn.com/content/v1/60a43bf842d7b601064a8828/1622691207784-0X6JV7RYRQXZAFRG712S/pisonescape.png)
](/resources/prison-escape)
[Activities](/resources?category=Activities), [All](/resources?category=All)
[Activity: Prison Escape](/resources/prison-escape)
[Activities](/resources?category=Activities), [All](/resources?category=All)
Learn branching and iteration using the colour sensors and motors.
[Read More →](/resources/prison-escape)
[Activities](/resources?category=Activities), [All](/resources?category=All)