pxt-microbit Accessibility PR (#529)

* Accessibility changes
This commit is contained in:
Sam El-Husseini
2017-09-07 13:42:08 -07:00
committed by GitHub
parent 3f87576a50
commit e3975e65e5
357 changed files with 1641 additions and 3540 deletions

View File

@ -1,8 +1,8 @@
# Accelerometer Beat control
### @description @boardname@ guitar: using accelerometer to control tempo
## @description @boardname@ guitar: using accelerometer to control tempo
### ~avatar avatar
## ~avatar avatar
Use the Accelerometer to control guitar tempo
* Concepts:
@ -15,7 +15,7 @@ Use the Accelerometer to control guitar tempo
* Graphing
* Absolute value
### ~
## ~
## Duration: 30 - 45 minutes
@ -51,7 +51,7 @@ If the force along **Y** grows, the @boardname@ is tilting more and more vertica
The acceleration block approximately measures **milli-g**, which is 1/1000 of a **g** or the
acceleration of gravity.
### Step 1: Graphing acceleration
## Step 1: Graphing acceleration
```blocks
basic.forever(() => {
led.plotBarGraph(input.acceleration(Dimension.Y), 1023)
@ -63,17 +63,17 @@ basic.forever(() => {
**Test the movements that move the graph from 1 to 5 bars on the LEDs**
### Extra
## Extra
Try graphing the acceleration along the **X** and **Z** axis. Can you explain the differences?
### ~hint
## ~hint
## Mapping
**It is common to map one standard to another - such as with temperature**
![Fahrenheit to Celsius](/static/mb/projects/guitar/map_analogy.png "Fahrenheit to Celsius")
### ~
## ~
### Step 2: Mapping acceleration to Beat
## Step 2: Mapping acceleration to Beat
**@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(() => {
@ -90,7 +90,7 @@ basic.forever(() => {
**Test the movements that speed and slow the tempo**
### Step 3: Combine with light sensor tone control
## Step 3: Combine with light sensor tone control
**Put it all together!**
```blocks
@ -108,8 +108,8 @@ basic.forever(() => {
**Download the code** to the @boardname@ on the guitar
### Now play the guitar adjusting tone and tempo using the light sensor and accelerometer!
## Now play the guitar adjusting tone and tempo using the light sensor and accelerometer!
### ~button /projects/guitar/pinpress
## ~button /projects/guitar/pinpress
NEXT: Pin Press on/off
### ~
## ~

View File

@ -1,14 +1,14 @@
# Buttons, Display & Sound
### @description @boardname@ guitar: using buttons with display and sound
## @description @boardname@ guitar: using buttons with display and sound
### ~avatar avatar
## ~avatar avatar
Use Button Events to control LED Display and play Sound
* **Concepts:**
* Events
* Tone/Note
* Sequence
### ~
## ~
## Duration: 30 - 45 minutes
@ -108,7 +108,7 @@ Attach the @boardname@ & battery-pack to the guitar body
https://youtu.be/ewyEW_U5G9M
Connect the headphones with crocodile clips
### ~hint
## ~hint
## The @boardname@ can play music
The **play tone** block allows a range letter note tones from **C** to **B5**.
@ -129,7 +129,7 @@ input.onButtonPressed(Button.A, () => {
music.playTone(Note.E, music.beat(BeatFraction.Whole))
})
```
### ~
## ~
## Step 4: Add Tone Playing Events for Buttons A & B
```blocks
input.onButtonPressed(Button.A, () => {
@ -174,6 +174,6 @@ From **Music**, drag **play tone *C* for *1* beat** block under the **show leds*
* [Hack your headphones](/projects/hack-your-headphones)
### ~button /projects/guitar/lightsensor
## ~button /projects/guitar/lightsensor
NEXT: Light Sensor Tone Control
### ~
## ~

View File

@ -1,8 +1,8 @@
# Light Sensor Tone control
### @description @boardname@ guitar: using light sensor to control tone
## @description @boardname@ guitar: using light sensor to control tone
### ~avatar avatar
## ~avatar avatar
Use the Light Sensor to the control tone for this [Theremin](https://en.wikipedia.org/wiki/Theremin) inspired guitar
@ -13,7 +13,7 @@ Use the Light Sensor to the control tone for this [Theremin](https://en.wikipedi
* Ratio Mapping
* Forever Loop
* Math (multiplication) with code properties
### ~
## ~
## Duration: 30 - 45 minutes
@ -61,8 +61,8 @@ Experiment to see the effect on graph height when the **plot bar graph** value *
**255 is the maximum light input reading**, try numbers smaller than 255
**Find a value** that allows the graph to show 1 - 5 bars
### ~hint
### Frequency
## ~hint
## 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 @boardname@ + headphones reliably produce detectable output ~50Hz - 6,000Hz.
@ -76,7 +76,7 @@ by replacing the letter **C** note with a **number** block that has the value it
```blocks
music.playTone(261, music.beat(BeatFraction.Half))
```
### ~
## ~
## Step 3: Multiply Frequency using Math blocks
```blocks
@ -86,7 +86,7 @@ input.onButtonPressed(Button.A, () => {
```
Create a **play tone** block using a **Math** section, **multiplication** block to set *tone*
### Next
## 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 @boardname@**
@ -110,6 +110,6 @@ Cover the LEDs with your hand to vary light detected to control the tone
## Good work, this guitar is sounding good!
**Challenge:** Create a variable for the light level multiplier that you can change using buttons (optional)
### ~button /projects/guitar/accelerometer
## ~button /projects/guitar/accelerometer
NEXT: Accelerometer Beat control
### ~
## ~

View File

@ -1,11 +1,11 @@
# Making the Guitar Body
### @description Maker Project for Guitar Body for @boardname@
## @description Maker Project for Guitar Body for @boardname@
### ~avatar avatar
## ~avatar avatar
Make the Guitar Body for your @boardname@ Guitar
### ~
## ~
## Duration: ~45 minutes
@ -25,12 +25,12 @@ https://youtu.be/xMSrWaOZkFg
the shape of your guitar
* Trace the design on a flat piece of cardboard (40-80 cm is best)
### ~hint
## ~hint
* Avoid small details that are difficult to cut into cardboard
* Unfolding a box gives longer pieces of cardboard and creases can be reinforced
### ~
## ~
## Step 2: Cut out the body
*cutting the cardboard*
@ -54,6 +54,6 @@ https://youtu.be/q0GkQdJmxjE
Strengthen the guitar next with an angled cardboard strip (*optional*).
### ~button /projects/guitar/displaybuttons
## ~button /projects/guitar/displaybuttons
NEXT: Buttons, Display and Sound
### ~
## ~

View File

@ -1,8 +1,8 @@
# Pin Press Switch
### @description @boardname@ guitar: use pin press to toggle guitar play on/off
## @description @boardname@ guitar: use pin press to toggle guitar play on/off
### ~avatar avatar
## ~avatar avatar
Use pin press to switch guitar play on/off
* Concepts:
@ -11,7 +11,7 @@ Use pin press to switch guitar play on/off
* Variable/Global-Variable
* Conditional: **`if`**, **`else`**
* Boolean: **`True`/`False`**
### ~
## ~
## Duration: approximately 45 minutes
@ -29,7 +29,7 @@ input.onPinPressed(TouchPin.P1, () => {})
### ~hint
## ~hint
## Circuits & Switches
* **Circuits** need a power supply (battery), a resister (like a LED) & a conductor (metal, water, hand)
* **Switches** turn electric power on by closing (completing) a circuit with a conductor so power can flow
@ -38,7 +38,7 @@ input.onPinPressed(TouchPin.P1, () => {})
**In this activity we use YOU to conduct electricity**
**to close the circuit that switches the guitar ON and OFF!**
### ~
## ~
## Step 1: Pin Press Test
@ -62,9 +62,9 @@ https://youtu.be/PAIU-vHqyGU
**Hold the @boardname@ touching The GND pin with one hand**
**with the other hand alternately touch the 0, 1 and 2 pins**
### ~hint
## ~hint
**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
https://youtu.be/NX0ECcpXFes