rename micro:bit to @boardname@
This commit is contained in:
@ -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**
|
||||
|
||||
|
Reference in New Issue
Block a user