rename micro:bit to @boardname@
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
|
||||
### ~avatar
|
||||
|
||||
Build your own micro:bit piano using bananas!
|
||||
Build your own @boardname@ piano using bananas!
|
||||
|
||||
### ~
|
||||
|
||||
@ -14,7 +14,7 @@ Build your own micro:bit piano using bananas!
|
||||
|
||||
## Materials
|
||||
|
||||
* micro:bit, battery holder and 2 AAA batteries
|
||||
* @boardname@, battery holder and 2 AAA batteries
|
||||
* Bananas
|
||||
* Orange
|
||||
* Crocodile clips
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
## Materials
|
||||
|
||||
* micro:bit, battery holder and 2 AAA batteries
|
||||
* @boardname@, battery holder and 2 AAA batteries
|
||||
* Bananas
|
||||
* Orange
|
||||
* Crocodile clips
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||

|
||||
|
||||
Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin on the micro:bit.
|
||||
Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin on the @boardname@.
|
||||
|
||||
### Step 2
|
||||
|
||||
@ -21,7 +21,7 @@ Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin
|
||||
|
||||

|
||||
|
||||
Using the 2nd crocodile clip, connect the end of the crocodile clip onto the 0 pin on the micro:bit.
|
||||
Using the 2nd crocodile clip, connect the end of the crocodile clip onto the 0 pin on the @boardname@.
|
||||
|
||||
### Step 3
|
||||
|
||||
@ -55,7 +55,7 @@ Using the 3rd crocodile clip, connect the unattached end of the crocodile clip o
|
||||
|
||||

|
||||
|
||||
Using the 4th crocodile clip, connect the end of the crocodile clip onto pin 1 on the micro:bit.
|
||||
Using the 4th crocodile clip, connect the end of the crocodile clip onto pin 1 on the @boardname@.
|
||||
|
||||
### Step 8
|
||||
|
||||
@ -71,7 +71,7 @@ Your banana keyboard is ready!
|
||||
|
||||
### Step 10
|
||||
|
||||
Connect your micro:bit to your computer using your USB cable and run this script:
|
||||
Connect your @boardname@ to your computer using your USB cable and run this script:
|
||||
```blocks
|
||||
input.onPinPressed(TouchPin.P1, () => {
|
||||
music.playTone(music.noteFrequency(Note.C), music.beat(BeatFraction.Quarter));
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||

|
||||
|
||||
Display the direction that the micro:bit is facing using the compass
|
||||
Display the direction that the @boardname@ is facing using the compass
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Welcome! This guided tutorial will show you how to program a script that displays the direction the micro:bit is pointing. Let's get started!
|
||||
Welcome! This guided tutorial will show you how to program a script that displays the direction the @boardname@ is pointing. Let's get started!
|
||||
|
||||
### ~
|
||||
|
||||
@ -24,7 +24,7 @@ basic.forever(() => {
|
||||
|
||||
## Step 2
|
||||
|
||||
Store the reading of the micro:bit in a variable called `degrees`.
|
||||
Store the reading of the @boardname@ in a variable called `degrees`.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
@ -34,7 +34,7 @@ basic.forever(() => {
|
||||
|
||||
## Step 3
|
||||
|
||||
If `degrees` is less than `45`, then the compass heading is mostly pointing toward North. Display `N` on the micro:bit.
|
||||
If `degrees` is less than `45`, then the compass heading is mostly pointing toward North. Display `N` on the @boardname@.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
@ -47,7 +47,7 @@ basic.forever(() => {
|
||||
|
||||
## Step 4
|
||||
|
||||
If `degrees` is less than 135, the micro:bit is mostly pointing East. Display `E` on the micro:bit.
|
||||
If `degrees` is less than 135, the @boardname@ is mostly pointing East. Display `E` on the @boardname@.
|
||||
|
||||
|
||||
```blocks
|
||||
@ -64,7 +64,7 @@ basic.forever(() => {
|
||||
|
||||
## Step 5
|
||||
|
||||
If `degrees` is less than 225, the micro:bit is mostly pointing South. Display `S` on the micro:bit.
|
||||
If `degrees` is less than 225, the @boardname@ is mostly pointing South. Display `S` on the @boardname@.
|
||||
|
||||
|
||||
```blocks
|
||||
@ -84,7 +84,7 @@ basic.forever(() => {
|
||||
|
||||
## Step 6
|
||||
|
||||
If none of these conditions returned true, then the micro:bit must be pointing West. Display `W` on the micro:bit.
|
||||
If none of these conditions returned true, then the @boardname@ must be pointing West. Display `W` on the @boardname@.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
|
@ -2,14 +2,14 @@
|
||||
|
||||

|
||||
|
||||
### @description A beginner-intermediate maker activity, building a guitar with the micro:bit
|
||||
### @description A beginner-intermediate maker activity, building a guitar with the @boardname@
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Make a micro:bit guitar with this guided tutorial!
|
||||
Make a @boardname@ guitar with this guided tutorial!
|
||||
|
||||
### ~
|
||||
*playing micro:bit guitar*
|
||||
*playing @boardname@ guitar*
|
||||
https://youtu.be/GYmdTFvxz80
|
||||
|
||||
## Duration
|
||||
@ -23,7 +23,7 @@ https://youtu.be/GYmdTFvxz80
|
||||
* Markers and/or paint
|
||||
* Aluminum Foil
|
||||
* Scissors that can cut cardboard
|
||||
* 1 micro:bit, battery holder and 2 AAA batteries
|
||||
* 1 @boardname@, battery holder and 2 AAA batteries
|
||||
* 4-5 Crocodile clips
|
||||
* Headphones
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Accelerometer Beat control
|
||||
|
||||
### @description micro:bit guitar: using accelerometer to control tempo
|
||||
### @description @boardname@ guitar: using accelerometer to control tempo
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
@ -33,18 +33,18 @@ Math.abs(1)
|
||||
|
||||
## Accelerometer, gravity and tilting!
|
||||
|
||||
The micro:bit contains an **accelerometer** sensor that is able to measure forces applied to the board.
|
||||
The @boardname@ contains an **accelerometer** sensor that is able to measure forces applied to the board.
|
||||
On earth, we are subject to the **gravity force** which pulls us to the ground!
|
||||
|
||||
https://youtu.be/0SULoTKmkhI
|
||||
|
||||
When the micro:bit is flat on a table, with the screen pointing up, the gravity force is aligned
|
||||
with the **Z** axis of the micro:bit.
|
||||
When the @boardname@ is flat on a table, with the screen pointing up, the gravity force is aligned
|
||||
with the **Z** axis of the @boardname@.
|
||||
|
||||

|
||||

|
||||
|
||||
If you tilt it up and down, the force will align with the **Y** axis -- this is how we can detect tilting!!!
|
||||
If the force along **Y** grows, the micro:bit is tilting more and more vertically!
|
||||
If the force along **Y** grows, the @boardname@ is tilting more and more vertically!
|
||||
|
||||
## Measuring Acceleration along different coordinates (X, Y, Z axis)
|
||||
|
||||
@ -59,7 +59,7 @@ basic.forever(() => {
|
||||
```
|
||||
**Create the code** that measures the change in the Y axis acceleration as a graph on the LEDs
|
||||
|
||||
**Dowload the code** to the micro:bit
|
||||
**Dowload the code** to the @boardname@
|
||||
|
||||
**Test the movements that move the graph from 1 to 5 bars on the LEDs**
|
||||
|
||||
@ -74,7 +74,7 @@ Try graphing the acceleration along the **X** and **Z** axis. Can you explain th
|
||||
### ~
|
||||
|
||||
### Step 2: Mapping acceleration to Beat
|
||||
**micro:bit sensors produce signal values between 0 to 1023. The *[map block](/reference/pins/map)* converts the signal to a desired range.**
|
||||
**@boardname@ sensors produce signal values between 0 to 1023. The *[map block](/reference/pins/map)* converts the signal to a desired range.**
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
music.setTempo(pins.map(Math.abs(input.acceleration(Dimension.Y)),
|
||||
@ -86,7 +86,7 @@ basic.forever(() => {
|
||||
|
||||
**Create the code** that *Maps* Y axis acceleration as *tempo*
|
||||
|
||||
**Download the code** to the micro:bit on the guitar
|
||||
**Download the code** to the @boardname@ on the guitar
|
||||
|
||||
**Test the movements that speed and slow the tempo**
|
||||
|
||||
@ -106,7 +106,7 @@ basic.forever(() => {
|
||||
```
|
||||
**Combine the code above with the light sensor tone control code from the previous activity**
|
||||
|
||||
**Download the code** to the micro:bit on the guitar
|
||||
**Download the code** to the @boardname@ on the guitar
|
||||
|
||||
### Now play the guitar adjusting tone and tempo using the light sensor and accelerometer!
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Buttons, Display & Sound
|
||||
### @description micro:bit guitar: using buttons with display and sound
|
||||
### @description @boardname@ guitar: using buttons with display and sound
|
||||
|
||||
### ~avatar avatar
|
||||
Use Button Events to control LED Display and play Sound
|
||||
@ -14,9 +14,9 @@ Use Button Events to control LED Display and play Sound
|
||||
|
||||
## Materials
|
||||
|
||||
A micro:bit, battery pack and 2 x AAA batteries
|
||||
A @boardname@, battery pack and 2 x AAA batteries
|
||||
|
||||

|
||||

|
||||
|
||||
2 to 4 crocodile clips
|
||||
|
||||
@ -56,9 +56,9 @@ Open [pxt.microbit.org](https://pxt.microbit.org) in your web browser
|
||||
From **Basics**, drag a **show LEDs** block into the coding area
|
||||
* Create a face with LEDs
|
||||
|
||||

|
||||
Connect your micro:bit to your computer via USB and click **`Download`**.
|
||||
Follow the instructions to move the code to your micro:bit.
|
||||

|
||||
Connect your @boardname@ to your computer via USB and click **`Download`**.
|
||||
Follow the instructions to move the code to your @boardname@.
|
||||
|
||||
## Step 2: Add Smiley LED Button Events
|
||||
```blocks
|
||||
@ -88,7 +88,7 @@ From **Input**, drag an **on button 'A' pressed** block into the coding area
|
||||
|
||||
* Create a 'B' button block with a different LED face
|
||||
|
||||
* Download the code to your micro:bit and try the A & B buttons
|
||||
* Download the code to your @boardname@ and try the A & B buttons
|
||||
|
||||
|
||||
## Step 3: Add Headphone Speakers using Crocodile clips
|
||||
@ -100,16 +100,16 @@ Connect **GND** to the **base of the headphone jack** using a second crocodile c
|
||||
|
||||
Connect **pin 0** to the **tip of the headphone jack** with a crocodile clip
|
||||
|
||||
*attaching batteries and micro:bit*
|
||||
*attaching batteries and @boardname@*
|
||||
https://youtu.be/zwRTmpKIaVU
|
||||
Attach the micro:bit & battery-pack to the guitar body
|
||||
Attach the @boardname@ & battery-pack to the guitar body
|
||||
|
||||
*connecting headphone speaker*
|
||||
https://youtu.be/ewyEW_U5G9M
|
||||
Connect the headphones with crocodile clips
|
||||
|
||||
### ~hint
|
||||
## The micro:bit can play music
|
||||
## The @boardname@ can play music
|
||||
|
||||
The **play tone** block allows a range letter note tones from **C** to **B5**.
|
||||
Songs are played using sequences notes. Like the beginning of a birthday song (C, C, D, C, F, E).
|
||||
@ -160,7 +160,7 @@ From **Music**, drag **play tone *C* for *1* beat** block under the **show leds*
|
||||
|
||||
**Repeat** for **Button B** event
|
||||
|
||||
**Download the code** to the micro:bit
|
||||
**Download the code** to the @boardname@
|
||||
|
||||
**Try the A & B buttons** with headphones and power connected
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Light Sensor Tone control
|
||||
|
||||
### @description micro:bit guitar: using light sensor to control tone
|
||||
### @description @boardname@ guitar: using light sensor to control tone
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
@ -20,9 +20,9 @@ Use the Light Sensor to the control tone for this [Theremin](https://en.wikipedi
|
||||
*playing tones with light sensor*
|
||||
https://youtu.be/2cKg9pokVC4
|
||||
|
||||
## The micro:bit LEDs Light Sensors
|
||||
## The @boardname@ LEDs Light Sensors
|
||||
|
||||
- the micro:bit can detect external light level intensity reaching the LEDs
|
||||
- the @boardname@ can detect external light level intensity reaching the LEDs
|
||||
- the light level block reports a reading of values 0 (*dark*) to 255 (*bright*)
|
||||
- a **Forever Loop** is required to continually measure the current light level and control the tone
|
||||
|
||||
@ -65,7 +65,7 @@ Experiment to see the effect on graph height when the **plot bar graph** value *
|
||||
### Frequency
|
||||
**Frequency** measured in Hz which are cycles per second or vibrations per second
|
||||
* A healthy human ear can detect frequencies in the range of 20Hz to 20,000Hz.
|
||||
* The micro:bit + headphones reliably produce detectable output ~50Hz - 6,000Hz.
|
||||
* The @boardname@ + headphones reliably produce detectable output ~50Hz - 6,000Hz.
|
||||
|
||||
**261Hz** represents a C note
|
||||
```blocks
|
||||
@ -89,7 +89,7 @@ Create a **play tone** block using a **Math** section, **multiplication** block
|
||||
### Next
|
||||
**Add** a **B** button block that multiplies the **261** tone by a number other than 2 to set tone
|
||||
|
||||
**Download the code to the micro:bit**
|
||||
**Download the code to the @boardname@**
|
||||
|
||||
**Test the sound for multiples of the 261Hz *C* frequency**
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
# Making the Guitar Body
|
||||
### @description Maker Project for Guitar Body for micro:bit
|
||||
### @description Maker Project for Guitar Body for @boardname@
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Make the Guitar Body for your micro:bit Guitar
|
||||
Make the Guitar Body for your @boardname@ Guitar
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Pin Press Switch
|
||||
|
||||
### @description micro:bit guitar: use pin press to toggle guitar play on/off
|
||||
### @description @boardname@ guitar: use pin press to toggle guitar play on/off
|
||||
|
||||
### ~avatar avatar
|
||||
Use pin press to switch guitar play on/off
|
||||
@ -55,15 +55,15 @@ input.onPinPressed(TouchPin.P2, () => {
|
||||
```
|
||||
**Create the pin-press code**
|
||||
|
||||
**Download the code** on the micro:bit
|
||||
**Download the code** on the @boardname@
|
||||
|
||||
https://youtu.be/PAIU-vHqyGU
|
||||
|
||||
**Hold the micro:bit touching The GND pin with one hand**
|
||||
**Hold the @boardname@ touching The GND pin with one hand**
|
||||
**with the other hand alternately touch the 0, 1 and 2 pins**
|
||||
|
||||
### ~hint
|
||||
**The electric signal traveled from pins, between your hands to `GND` and the micro:bit detected the electric signal!**
|
||||
**The electric signal traveled from pins, between your hands to `GND` and the @boardname@ detected the electric signal!**
|
||||
### ~
|
||||
|
||||
## Step 2: Installing conductive foil on the guitar
|
||||
@ -78,7 +78,7 @@ https://youtu.be/YkymZGNmkrE
|
||||
**Connect the foil to `pin 1` using a crocodile clip**
|
||||
|
||||
## Step 3: Add a switch to turn the guitar ON and OFF
|
||||
**Using the `on` global variable we can switch the message on the micro:bit**
|
||||
**Using the `on` global variable we can switch the message on the @boardname@**
|
||||
**between ON and OFF**
|
||||
```blocks
|
||||
let on = false
|
||||
@ -99,7 +99,7 @@ input.onPinPressed(TouchPin.P1, () => {
|
||||
```
|
||||
**Create the ON/OFF switch code**
|
||||
|
||||
**Download the code on the micro:bit**
|
||||
**Download the code on the @boardname@**
|
||||
|
||||
**Test by touching `P1` to toggle the LED message between ON and OFF**
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
### ~avatar
|
||||
|
||||
Build your own music player micro:bit from headphones.
|
||||
Build your own music player @boardname@ from headphones.
|
||||
|
||||
### ~
|
||||
|
||||
@ -15,7 +15,7 @@ Build your own music player micro:bit from headphones.
|
||||
|
||||
## Materials
|
||||
|
||||
* micro:bit, battery holder and 2 AAA batteries
|
||||
* @boardname@, battery holder and 2 AAA batteries
|
||||
* Headphones
|
||||
* Crocodile clips
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Did you know you could attach your headhpones to the micro:bit to generate sounds?
|
||||
Did you know you could attach your headhpones to the @boardname@ to generate sounds?
|
||||
|
||||
### ~
|
||||
|
||||
@ -16,7 +16,7 @@ Did you know you could attach your headhpones to the micro:bit to generate sound
|
||||
|
||||

|
||||
|
||||
Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin on the micro:bit.
|
||||
Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin on the @boardname@.
|
||||
|
||||
### Step 2
|
||||
|
||||
@ -24,13 +24,13 @@ Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin
|
||||
|
||||

|
||||
|
||||
Using the 2nd crocodile clip, connect the end of the crocodile clip onto the 0 pin on the micro:bit.
|
||||
Using the 2nd crocodile clip, connect the end of the crocodile clip onto the 0 pin on the @boardname@.
|
||||
|
||||
### Step 3
|
||||
|
||||

|
||||
|
||||
Using the 1st crocodile clip, connect the second end of the crocodile clip onto based of the headphone jack. The base of your headphone jack is considered the ground so it is connected to the GND of the micro:bit.
|
||||
Using the 1st crocodile clip, connect the second end of the crocodile clip onto based of the headphone jack. The base of your headphone jack is considered the ground so it is connected to the GND of the @boardname@.
|
||||
|
||||
### Step 4
|
||||
|
||||
@ -38,7 +38,7 @@ Using the 1st crocodile clip, connect the second end of the crocodile clip onto
|
||||
|
||||

|
||||
|
||||
Using the 2nd crocodile clip, connect the second end of the crocodile clip onto the tip of the headphone jack. The tip of your headphone jack feeds into the right speaker on the headphone. You connect from the micro:bit pin 0 to the tip of the right side of your headphone. Use the tip of the headphone jack to play sounds.
|
||||
Using the 2nd crocodile clip, connect the second end of the crocodile clip onto the tip of the headphone jack. The tip of your headphone jack feeds into the right speaker on the headphone. You connect from the @boardname@ pin 0 to the tip of the right side of your headphone. Use the tip of the headphone jack to play sounds.
|
||||
|
||||
### Step 5
|
||||
|
||||
|
@ -67,4 +67,4 @@ input.onButtonPressed(Button.A, () => {
|
||||
});
|
||||
```
|
||||
|
||||
* click **Download** and run your code on the micro:bit.
|
||||
* click **Download** and run your code on the @boardname@.
|
||||
|
@ -1,23 +1,23 @@
|
||||
# magic button trick
|
||||
|
||||
Perform a magic trick where you appear to make the **A** and **B** button of your micro:bit swap over just by moving a sticky label.
|
||||
Perform a magic trick where you appear to make the **A** and **B** button of your @boardname@ swap over just by moving a sticky label.
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Welcome! This activity will teach you how to use the micro:bit's compass to detect a nearby magnet
|
||||
Welcome! This activity will teach you how to use the @boardname@'s compass to detect a nearby magnet
|
||||
|
||||
### ~
|
||||
This is a simple magic trick you can perform to amaze your friends, where by moving the sticky labels on your micro:bit's **A** and **B** button you appear to make the buttons really switch over. To see the trick performed watch the video below.
|
||||
This is a simple magic trick you can perform to amaze your friends, where by moving the sticky labels on your @boardname@'s **A** and **B** button you appear to make the buttons really switch over. To see the trick performed watch the video below.
|
||||
|
||||
https://youtu.be/-9KvmPopov8
|
||||
|
||||
## How the trick works
|
||||
|
||||
Unfortunately, the only magic here is in the code. This trick uses a magnet, hidden in your hand, to tell the micro:bit to swap over the buttons so that when the magnet is near the microbit the **A** button starts working like the **B** button and the **B** button starts working like the **A** button.
|
||||
Unfortunately, the only magic here is in the code. This trick uses a magnet, hidden in your hand, to tell the @boardname@ to swap over the buttons so that when the magnet is near the microbit the **A** button starts working like the **B** button and the **B** button starts working like the **A** button.
|
||||
|
||||
## What you need
|
||||
|
||||
The only things you need for this trick are your micro:bit and any magnet that is small enough to fit in your hand, even a fridge magnet will work.
|
||||
The only things you need for this trick are your @boardname@ and any magnet that is small enough to fit in your hand, even a fridge magnet will work.
|
||||
|
||||

|
||||
|
||||
@ -37,7 +37,7 @@ input.onButtonPressed(Button.B, () => {
|
||||
|
||||
## Step 2: measuring magnetic force
|
||||
|
||||
We will use the micro:bit's compass to detect the magnet. Compass's tell us what direction we are pointing by detecting the Earth's magnetic field but they can also detect any other magnet nearby. We will use that to check if our magnet is next to the micro:bit by using the [magnetic force](/reference/input/magnetic-force) block found in the input menu's 'more' section. As we only want to measure the strength we change the drop down to select 'strength':
|
||||
We will use the @boardname@'s compass to detect the magnet. Compass's tell us what direction we are pointing by detecting the Earth's magnetic field but they can also detect any other magnet nearby. We will use that to check if our magnet is next to the @boardname@ by using the [magnetic force](/reference/input/magnetic-force) block found in the input menu's 'more' section. As we only want to measure the strength we change the drop down to select 'strength':
|
||||
|
||||
```blocks
|
||||
input.magneticForce(Dimension.Strength)
|
||||
@ -56,7 +56,7 @@ let isSwitched = Math.abs(input.magneticForce(Dimension.Strength)) > 100
|
||||
```
|
||||
## Step 4: running our 'magnet nearby' check all the time
|
||||
|
||||
At the moment our code to detect the magnet being nearby will only run once so we need to put it into a [forever](/reference/basic/forever) block so that it keeps getting run again and again checking for the magnet to come near to the micro:bit. We should also make sure 'isSwitched' is false when our program starts.
|
||||
At the moment our code to detect the magnet being nearby will only run once so we need to put it into a [forever](/reference/basic/forever) block so that it keeps getting run again and again checking for the magnet to come near to the @boardname@. We should also make sure 'isSwitched' is false when our program starts.
|
||||
|
||||
```blocks
|
||||
let isSwitched = false;
|
||||
@ -94,8 +94,8 @@ input.onButtonPressed(Button.B, () => {
|
||||
```
|
||||
|
||||
## step 5: practice your performance
|
||||
Now you just need to program your own micro:bit and practice the trick a few times before performing to friends. Try asking your friends to click the buttons after you have switched the labels and the trick won't work for them as they don't have a hidden magnet in their hand.
|
||||
Now you just need to program your own @boardname@ and practice the trick a few times before performing to friends. Try asking your friends to click the buttons after you have switched the labels and the trick won't work for them as they don't have a hidden magnet in their hand.
|
||||
|
||||
|
||||
## about the authors
|
||||
This project was contributed by Brian and Jasmine Norman, aka [@MicroMonstersUK](https://twitter.com/MicroMonstersUK). You can chekout their [micro:bit tutorials chanel on youtube](https://www.youtube.com/channel/UCK2DviDexh_Er2QYZerZyZQ) for more projects.
|
||||
This project was contributed by Brian and Jasmine Norman, aka [@MicroMonstersUK](https://twitter.com/MicroMonstersUK). You can chekout their [@boardname@ tutorials chanel on youtube](https://www.youtube.com/channel/UCK2DviDexh_Er2QYZerZyZQ) for more projects.
|
@ -2,11 +2,11 @@
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Welcome! The activity will teach you how to use the acceleration of the 1st micro:bit and to visualize the acceleration on the 2nd micro:bit.
|
||||
Welcome! The activity will teach you how to use the acceleration of the 1st @boardname@ and to visualize the acceleration on the 2nd @boardname@.
|
||||
Let's get started!
|
||||
|
||||
### ~
|
||||
Let's measure `acceleration (mg)` and then `send number`. `Acceleration` is measured in **milli-gravities**, so a value of -1000 is equivalent to -1g or -9.81m/s^2. We will be able to get the acceleration value (g-force), in the specified "x" dimension. `Send number` will broadcast a number data packet to other micro:bits connected via radio.
|
||||
Let's measure `acceleration (mg)` and then `send number`. `Acceleration` is measured in **milli-gravities**, so a value of -1000 is equivalent to -1g or -9.81m/s^2. We will be able to get the acceleration value (g-force), in the specified "x" dimension. `Send number` will broadcast a number data packet to other @boardname@s connected via radio.
|
||||
|
||||
```blocks
|
||||
radio.sendNumber(input.acceleration(Dimension.X));
|
||||
@ -33,7 +33,7 @@ radio.onDataPacketReceived(() => {
|
||||
})
|
||||
```
|
||||
### ~
|
||||
Finally, we want to chart the acceleration. So we must first implement `plot bar graph`. `Plot Bar Graph` will display a vertical bar graph based on the value and high value. In order to transfer the receive the number from the 1st micro:bit, we must implement `receive number` to constantly display a vertical bar graph based on the value. Remember, the value will equal to the micro:bit's acceleration in the "x" direction.
|
||||
Finally, we want to chart the acceleration. So we must first implement `plot bar graph`. `Plot Bar Graph` will display a vertical bar graph based on the value and high value. In order to transfer the receive the number from the 1st @boardname@, we must implement `receive number` to constantly display a vertical bar graph based on the value. Remember, the value will equal to the @boardname@'s acceleration in the "x" direction.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
@ -45,15 +45,15 @@ radio.onDataPacketReceived(({ receivedNumber }) => {
|
||||
|
||||
```
|
||||
### ~
|
||||
Notice that moving the micro:bit the farthest direction in the x direction will be -1023 on the charting beneath the simulator. The second observation will be that the LEDs will be full brightness on the 2nd micro:bit. There is a single LED turned on with the 1st micro:bit. Additionally, the graphs will reflect 0 acceleation for the 1st micro:bit. In this scenario, if you are adjusting the acceleration in the simualator, you are also changing your chart that will be produced.
|
||||
Notice that moving the @boardname@ the farthest direction in the x direction will be -1023 on the charting beneath the simulator. The second observation will be that the LEDs will be full brightness on the 2nd @boardname@. There is a single LED turned on with the 1st @boardname@. Additionally, the graphs will reflect 0 acceleation for the 1st @boardname@. In this scenario, if you are adjusting the acceleration in the simualator, you are also changing your chart that will be produced.
|
||||
|
||||

|
||||
|
||||
### ~
|
||||
NOTE: The colors of the charts reflect the color of the micro:bit simulator. In this instance, the micro:bits are blue and green. So the colors of the line graphs reflect the colors of the micro:bit
|
||||
NOTE: The colors of the charts reflect the color of the @boardname@ simulator. In this instance, the @boardname@s are blue and green. So the colors of the line graphs reflect the colors of the @boardname@
|
||||
|
||||
### ~
|
||||
After running this simulation several seconds by moving the micro:bit side to side in the x direction, you are ready to graph or chart the accceleration of the micro:bit. We want a printout of our acceleration on Excel. We will graph the fluctuating acceleration of the simulation experiment.
|
||||
After running this simulation several seconds by moving the @boardname@ side to side in the x direction, you are ready to graph or chart the accceleration of the @boardname@. We want a printout of our acceleration on Excel. We will graph the fluctuating acceleration of the simulation experiment.
|
||||
|
||||

|
||||
|
||||
@ -83,10 +83,10 @@ Use the Recommended Charts command on the Insert tab to quickly create a chart t
|
||||
### ~
|
||||
Have fun reviewing your simulation and analyze the acceleration by chart the Excel data using Excel.
|
||||
|
||||
* Connect the first micro:bit to your computer using your USB cable and run the charting script on it.
|
||||
* Connect the second micro:bit to your computer using your USB cable and run the charting script on it.
|
||||
* The first person and second person take turns tilting the micro:bit in the "x" direction while the other player charts the data on the micro:bit!
|
||||
* Review and analyze the actual micro:bit device acceleration data on Excel
|
||||
* Connect the first @boardname@ to your computer using your USB cable and run the charting script on it.
|
||||
* Connect the second @boardname@ to your computer using your USB cable and run the charting script on it.
|
||||
* The first person and second person take turns tilting the @boardname@ in the "x" direction while the other player charts the data on the @boardname@!
|
||||
* Review and analyze the actual @boardname@ device acceleration data on Excel
|
||||
* Display acceleration with y or z using plot bar graph by changing acceleration from "x" to "y" or "z"
|
||||
|
||||
```package
|
||||
|
@ -1,10 +1,10 @@
|
||||
# radio
|
||||
|
||||
Measure the acceleration on the micro:bit in the "x" direction.
|
||||
Measure the acceleration on the @boardname@ in the "x" direction.
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Welcome! This activity will teach how to use the micro:bit to chart the acceleration in the "x" direction. Let's get started!
|
||||
Welcome! This activity will teach how to use the @boardname@ to chart the acceleration in the "x" direction. Let's get started!
|
||||
|
||||
|
||||
### ~
|
||||
@ -16,7 +16,7 @@ input.acceleration(Dimension.X)
|
||||
```
|
||||
|
||||
### ~
|
||||
Use the plot bar chart to visualize the acceleration on the LED screen of the micro:bit in the specified range. You implement plot Bar Graph to display a vertical bar graph based on the "value" and "high" value. Then you must insert acceleration in the X dimension to measure the acceleration.
|
||||
Use the plot bar chart to visualize the acceleration on the LED screen of the @boardname@ in the specified range. You implement plot Bar Graph to display a vertical bar graph based on the "value" and "high" value. Then you must insert acceleration in the X dimension to measure the acceleration.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
@ -26,27 +26,27 @@ basic.forever(() => {
|
||||
```
|
||||
|
||||
### ~
|
||||
Notice that moving the micro:bit in the simulator from left to right (x direction) changes the values beneath the micro:bit in a range from 1023 to -1023 as measured in milli-gravities. By hovering over the micro:bit from left to right, you can observe changing values beneath the micro:bit simulator. Also, the LEDs shown on the Bar Graph fluctates based on the movement of the micro:bit simulator in the x direction. The line underneath the micro:bit simulator reflect the acceleration in the x direction.
|
||||
Notice that moving the @boardname@ in the simulator from left to right (x direction) changes the values beneath the @boardname@ in a range from 1023 to -1023 as measured in milli-gravities. By hovering over the @boardname@ from left to right, you can observe changing values beneath the @boardname@ simulator. Also, the LEDs shown on the Bar Graph fluctates based on the movement of the @boardname@ simulator in the x direction. The line underneath the @boardname@ simulator reflect the acceleration in the x direction.
|
||||
|
||||
NOTE: The colors of the charts reflect the color of the micro:bit simulator. In this instance, the micro:bit is yellow. So the color of the data line reflects the color of the micro:bit
|
||||
NOTE: The colors of the charts reflect the color of the @boardname@ simulator. In this instance, the @boardname@ is yellow. So the color of the data line reflects the color of the @boardname@
|
||||
|
||||

|
||||
|
||||
### ~
|
||||
|
||||
Vigorously move the micro:bit in the micro:bit simulatator by moving the micro:bit image from side to side. Every time the micro:bit moves in the x direction in the simulator, you are generating data points that can be reviewed in Excel. The more attempts to move the micro:bit from side to side, the more data being saved in Excel. After you have vigarously moved the micro:bit simulator from side to side for a sufficient amount of time, you are ready to graph or chart the accceleration of the micro:bit. We want a printout of our acceleration on Excel that can be graphed in Excel.
|
||||
Vigorously move the @boardname@ in the @boardname@ simulatator by moving the @boardname@ image from side to side. Every time the @boardname@ moves in the x direction in the simulator, you are generating data points that can be reviewed in Excel. The more attempts to move the @boardname@ from side to side, the more data being saved in Excel. After you have vigarously moved the @boardname@ simulator from side to side for a sufficient amount of time, you are ready to graph or chart the accceleration of the @boardname@. We want a printout of our acceleration on Excel that can be graphed in Excel.
|
||||
|
||||
### ~
|
||||
|
||||
We want to chart the data collected by using a tool in Excel.
|
||||
|
||||
The final part of this experiment is opening and reviewing the data in the Excel CSV file. Simply click on the line beneath the simulator. A CSV file will be generated to display the data points collected by moving the micro:bit in the X direction. Then click or tap on the data Excel file that was downloaded to your local ``Downloads`` Folder.
|
||||
The final part of this experiment is opening and reviewing the data in the Excel CSV file. Simply click on the line beneath the simulator. A CSV file will be generated to display the data points collected by moving the @boardname@ in the X direction. Then click or tap on the data Excel file that was downloaded to your local ``Downloads`` Folder.
|
||||
|
||||
|
||||
### ~
|
||||
|
||||
|
||||
First, click or tap on the first two columns (A, B) to include the time of the data being collected; b) the results of acceleration data on the micro:bit
|
||||
First, click or tap on the first two columns (A, B) to include the time of the data being collected; b) the results of acceleration data on the @boardname@
|
||||
|
||||

|
||||
|
||||
|
@ -36,7 +36,7 @@ input.onGesture(Gesture.Shake, () => {
|
||||
})
|
||||
```
|
||||
In this project, you will build a Rock Paper Scissors game with the @boardname@.
|
||||
You can play the game with a friend who has it on a micro:bit.
|
||||
You can play the game with a friend who has it on a @boardname@.
|
||||
You can also play it with friends who are just using their hands.
|
||||
|
||||
### ~
|
||||
@ -48,8 +48,8 @@ You can also play it with friends who are just using their hands.
|
||||
|
||||
## Step 1: Getting started
|
||||
|
||||
We want the micro:bit to choose rock, paper, or scissors when you shake it.
|
||||
Try creating an ``on shake`` block so when you shake the micro:bit, it will run part of a program.
|
||||
We want the @boardname@ to choose rock, paper, or scissors when you shake it.
|
||||
Try creating an ``on shake`` block so when you shake the @boardname@, it will run part of a program.
|
||||
|
||||
```blocks
|
||||
input.onGesture(Gesture.Shake, () => {
|
||||
@ -57,7 +57,7 @@ input.onGesture(Gesture.Shake, () => {
|
||||
})
|
||||
```
|
||||
|
||||
Next, when you shake the micro:bit, it should pick a random number from `0` to `2`
|
||||
Next, when you shake the @boardname@, it should pick a random number from `0` to `2`
|
||||
and store it in the variable `weapon`. (This variable is named `weapon` because
|
||||
rock, paper, and scissors are the weapons you use to battle your friends!)
|
||||
|
||||
@ -110,7 +110,7 @@ input.onGesture(Gesture.Shake, () => {
|
||||
|
||||
## Step 3: A random rock
|
||||
|
||||
Now we are going to add a new picture for the micro:bit to show
|
||||
Now we are going to add a new picture for the @boardname@ to show
|
||||
when another random number comes up.
|
||||
|
||||
Make the ``else if`` part check if the variable `weapon` is `1`.
|
||||
@ -192,7 +192,7 @@ Your game is ready! Have fun!
|
||||
|
||||
Here is a way you can make your Rock Paper Scissors game better.
|
||||
When button ``A`` is pressed,
|
||||
the micro:bit will add `1` to your score.
|
||||
the @boardname@ will add `1` to your score.
|
||||
|
||||
Open the ``Game`` drawer, and then add the block ``change score by 1`` to your program,
|
||||
like this:
|
||||
@ -206,7 +206,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
## Step 6: Prove you're the greatest!
|
||||
|
||||
After your micro:bit can add `1` to the score, show how many wins you have.
|
||||
After your @boardname@ can add `1` to the score, show how many wins you have.
|
||||
|
||||
```blocks
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
@ -217,7 +217,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
```
|
||||
## Step 7: Staying honest
|
||||
|
||||
Success! Your micro:bit can track wins!
|
||||
Success! Your @boardname@ can track wins!
|
||||
But what about losses?
|
||||
Use the ``Game`` drawer to subtract `1` from your score when you press button `B`.
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
### ~avatar
|
||||
|
||||
Build a telegraph between two micro:bits to communicate with your friends!
|
||||
Build a telegraph between two @boardname@s to communicate with your friends!
|
||||
|
||||
### ~
|
||||
|
||||
@ -12,7 +12,7 @@ Build a telegraph between two micro:bits to communicate with your friends!
|
||||
|
||||
## Materials
|
||||
|
||||
* micro:bit, battery holder and 2 AAA batteries
|
||||
* @boardname@, battery holder and 2 AAA batteries
|
||||
* Crocodile clips
|
||||
|
||||
## Activities
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
### ~avatar
|
||||
|
||||
Let's build a telegraph between two micro:bits.
|
||||
Let's build a telegraph between two @boardname@s.
|
||||
|
||||
### ~
|
||||
|
||||
@ -10,7 +10,7 @@ Let's build a telegraph between two micro:bits.
|
||||
|
||||
## Materials
|
||||
|
||||
* micro:bit, battery holder and 2 AAA batteries
|
||||
* @boardname@, battery holder and 2 AAA batteries
|
||||
* Crocodile clips
|
||||
|
||||
## Steps
|
||||
@ -19,49 +19,49 @@ Let's build a telegraph between two micro:bits.
|
||||
|
||||

|
||||
|
||||
Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin on the micro:bit.
|
||||
Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin on the @boardname@.
|
||||
|
||||
### Step 2
|
||||
|
||||

|
||||
|
||||
Using the 2nd crocodile clip, connect the end of the crocodile clip onto the 3V pin on the micro:bit.
|
||||
Using the 2nd crocodile clip, connect the end of the crocodile clip onto the 3V pin on the @boardname@.
|
||||
|
||||
### Step 3
|
||||
|
||||

|
||||
|
||||
Using the 3rd crocodile clip, connect the end of the crocodile clip onto pin 1 of the micro:bit.
|
||||
Using the 3rd crocodile clip, connect the end of the crocodile clip onto pin 1 of the @boardname@.
|
||||
|
||||
### Step 4
|
||||
|
||||

|
||||
|
||||
Using the 4th crocodile clip, connect the end of the crocodile clip onto pin 2 of the micro:bit.
|
||||
Using the 4th crocodile clip, connect the end of the crocodile clip onto pin 2 of the @boardname@.
|
||||
|
||||
### Step 5
|
||||
|
||||

|
||||
|
||||
Using the 1st crocodile clip, connect the unattached end of the crocodile clip onto the GND on the 2nd micro:bit.
|
||||
Using the 1st crocodile clip, connect the unattached end of the crocodile clip onto the GND on the 2nd @boardname@.
|
||||
|
||||
### Step 6
|
||||
|
||||

|
||||
|
||||
Using the 2nd crocodile clip, connect the unattached end of the crocodile clip onto the 3V pin on the 2nd micro:bit.
|
||||
Using the 2nd crocodile clip, connect the unattached end of the crocodile clip onto the 3V pin on the 2nd @boardname@.
|
||||
|
||||
### Step 7
|
||||
|
||||

|
||||
|
||||
Using the 3rd crocodile clip, connect the unattached end of the crocodile clip onto pin 2 of the 2nd micro:bit.
|
||||
Using the 3rd crocodile clip, connect the unattached end of the crocodile clip onto pin 2 of the 2nd @boardname@.
|
||||
|
||||
### Step 8
|
||||
|
||||

|
||||
|
||||
Using the 4th crocodile clip, connect the unattached end of the crocodile clip onto pin 1 of the 2nd micro:bit
|
||||
Using the 4th crocodile clip, connect the unattached end of the crocodile clip onto pin 1 of the 2nd @boardname@
|
||||
|
||||
### Step 9
|
||||
|
||||
|
@ -90,6 +90,6 @@ Your telegraph is ready!
|
||||
|
||||
### Step 7
|
||||
|
||||
* Connect the first micro:bit to your computer using your USB cable and put the telegraph script on it.
|
||||
* Connect the second micro:bit to your computer using your USB cable and run the telegraph script on it.
|
||||
* Connect the first @boardname@ to your computer using your USB cable and put the telegraph script on it.
|
||||
* Connect the second @boardname@ to your computer using your USB cable and run the telegraph script on it.
|
||||
* The first person and second person take turns pressing button A to play the telegraph game!
|
||||
|
@ -4,13 +4,13 @@
|
||||
|
||||

|
||||
|
||||
In this project, you will build your own wearable micro:bit watch from an old pair of jeans and T-shirt. Project duration: 15 minutes.
|
||||
In this project, you will build your own wearable @boardname@ watch from an old pair of jeans and T-shirt. Project duration: 15 minutes.
|
||||
|
||||

|
||||
|
||||
## Materials
|
||||
|
||||
* micro:bit, battery holder and 2 AAA batteries
|
||||
* @boardname@, battery holder and 2 AAA batteries
|
||||
* Old T-shirt
|
||||
* Old Jeans
|
||||
* Velcro with sticky back – 5cm x 5cm
|
||||
@ -70,25 +70,25 @@ Peal the tape protective layer from the rectangle.
|
||||
|
||||

|
||||
|
||||
Place the micro:bit pins on the tape at more or less **7** cm from the left border. Then lower the micro:bit on the tape and press **gently**.
|
||||
Place the @boardname@ pins on the tape at more or less **7** cm from the left border. Then lower the @boardname@ on the tape and press **gently**.
|
||||
|
||||
### Step 9
|
||||
|
||||

|
||||
|
||||
Connect the battery holder and place it on the right of the micro:bit. Tuck the cables away on the tape to protect them.
|
||||
Connect the battery holder and place it on the right of the @boardname@. Tuck the cables away on the tape to protect them.
|
||||
|
||||
### Step 10
|
||||
|
||||

|
||||
|
||||
Stick the T-shirt rectangle from the top of the micro:bit, over the battery cables.
|
||||
Stick the T-shirt rectangle from the top of the @boardname@, over the battery cables.
|
||||
|
||||
### Step 11
|
||||
|
||||

|
||||
|
||||
Use your fingers to push the T-shirt cloth under the micro:bit to give access to the micro-USB plug.
|
||||
Use your fingers to push the T-shirt cloth under the @boardname@ to give access to the micro-USB plug.
|
||||
|
||||
### Step 12
|
||||
|
||||
@ -106,7 +106,7 @@ Turn over the watch and cut the extra T-shirt material.
|
||||
|
||||

|
||||
|
||||
Stick the T-shirt cloth on the other side of the watch. Lift the micro:bit pins to slide the cloth under and leave them free from the tape.
|
||||
Stick the T-shirt cloth on the other side of the watch. Lift the @boardname@ pins to slide the cloth under and leave them free from the tape.
|
||||
|
||||
### Step 15
|
||||
|
||||
|
@ -8,17 +8,17 @@ This project explains the principles of timing gates using household materials.
|
||||
|
||||
## Timing gates
|
||||
|
||||
The two gates are connected to the micro:bit and can detect a car passing through.
|
||||
The two gates are connected to the @boardname@ and can detect a car passing through.
|
||||
|
||||

|
||||
|
||||
As the car passes through the gate ``0``, it sends an event to the micro:bit through the [on pin pressed](/reference/input/on-pin-pressed) block.
|
||||
The micro:bit records the time in a variable ``t0``.
|
||||
As the car passes through the gate ``0``, it sends an event to the @boardname@ through the [on pin pressed](/reference/input/on-pin-pressed) block.
|
||||
The @boardname@ records the time in a variable ``t0``.
|
||||
|
||||

|
||||
|
||||
As the car passes through the gate ``1``, it sends an event to the micro:bit through the [on pin pressed](/reference/input/on-pin-pressed) block.
|
||||
The micro:bit records the time in a variable ``t1``.
|
||||
As the car passes through the gate ``1``, it sends an event to the @boardname@ through the [on pin pressed](/reference/input/on-pin-pressed) block.
|
||||
The @boardname@ records the time in a variable ``t1``.
|
||||
|
||||

|
||||
|
||||
@ -34,7 +34,7 @@ By dividing the distance between the gates by the duration, we get the speed of
|
||||
* Aluminum fail
|
||||
* Double-side tape (carpet tape)
|
||||
* 4 crocodile clips
|
||||
* A micro:bit board and USB cable
|
||||
* A @boardname@ board and USB cable
|
||||
|
||||

|
||||
|
||||
@ -76,9 +76,9 @@ Connect a crocodile strip to each foil strip.
|
||||
|
||||

|
||||
|
||||
Connect the crocodile plugs to the ``GND`` and ``P0`` pins on the micro:bit.
|
||||
Connect the crocodile plugs to the ``GND`` and ``P0`` pins on the @boardname@.
|
||||
|
||||

|
||||

|
||||
|
||||
The gate is ready to use! Your circuit should look like the picture below:
|
||||
|
||||
@ -87,7 +87,7 @@ The gate is ready to use! Your circuit should look like the picture below:
|
||||
|
||||
## Detecting the car with code
|
||||
|
||||
The micro:bit provides an event [on pin pressed](/reference/input/on-pin-pressed)
|
||||
The @boardname@ provides an event [on pin pressed](/reference/input/on-pin-pressed)
|
||||
that is raised when a circuit between ``GND`` and a pin is detected. The circuit conductor could be a wire or even your body!
|
||||
We will attach a foil to the bottom of the car. When it passes over the gate, it connect both foil strips, close the circuit and trigger the event.
|
||||
|
||||
@ -140,7 +140,7 @@ Repeat the same process with tape and foil to build the first gate.
|
||||
|
||||

|
||||
|
||||
Connect the crocodile plugs to the ``GND`` and ``P1`` pins on the micro:bit.
|
||||
Connect the crocodile plugs to the ``GND`` and ``P1`` pins on the @boardname@.
|
||||
|
||||

|
||||
|
||||
@ -182,7 +182,7 @@ https://youtu.be/N4bWQcu6yWs
|
||||
|
||||
## Computing time
|
||||
|
||||
The micro:bit has a clock that measures time precisely. It measures how many seconds the micro:bit has been on.
|
||||
The @boardname@ has a clock that measures time precisely. It measures how many seconds the @boardname@ has been on.
|
||||
We will record the time where each gate is tripped in variables ``t0`` and ``t1``.
|
||||
We take the different between ``t1`` and ``t0`` to compute the duration between the gates.
|
||||
|
||||
|
Reference in New Issue
Block a user