Skip to content

Commit 578685d

Browse files
committed
adding date-update field to front matter
1 parent 43179f8 commit 578685d

13 files changed

+55
-45
lines changed

7-segment-display-max7219.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ cats: external
2525
# Name of Component for index page
2626
simple-description: 7-Segment Display (SPI)
2727

28-
date: 2016-12-23T10:20:00Z
28+
date: 2016-12-23T10:20:00Z
29+
date-updated: 2016-12-23T10:20:00Z
30+
2931
---
3032

3133
![microbit edge connector](images/7-segment-display-max7219.jpg){:.ui .image .small .floated .right}

8x8-matrix-HT16K33-microbit.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ simple-description: LED Matrix (I2C)
2727

2828
acknowledgements: All images by Adafruit (CC-BY).
2929

30-
date: 2016-12-23T10:20:00Z
30+
date: 2016-12-23T10:20:00Z
31+
date-updated: 2016-12-23T10:20:00Z
3132
---
3233

3334
An 8x8 LED Matrix is a component where 64 LEDs are arranged in a grid.

PIR-sensor.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ cats: external
2525
# Name of Component for index page
2626
simple-description: "PIR Sensor"
2727

28-
date: 2016-12-23T10:20:00Z
28+
date: 2016-12-23T10:20:00Z
29+
date-updated: 2016-12-23T10:20:00Z
2930
---
3031

3132
The PIR sensor module will detect movement and report it to the microbit as a digital signal. There are many PIR sensor modules on the market but the most common one is based on the DYP-ME003 PIR sensor module by Open Impulse. This module runs at 5v so requires _some_ hacking to work with the microbit.
@@ -52,7 +53,7 @@ Confirmed PIR sensor modules with two sets of header pins:
5253

5354
#### Using a Sensor with 2 x Header Pins
5455

55-
Attach the microbit's `3v pin` to the header pin on the PIR sensor labelled `H`.
56+
Attach the microbit's `3v pin` to the header pin on the PIR sensor labelled `H`.
5657

5758
Attaching it to the H pin bypasses the voltage regulator on the sensor and enables it to run on 3.3v. The jumper attached to these pins can be discarded.
5859

@@ -62,12 +63,12 @@ There is more about this process and its discovery on [tech gurka](http://techgu
6263

6364
There are two potentiometers labelled TIME (or T) and SENSITIVITY (or S) on the sensor module. Adjusting SENSITIVITY changes the detection range from 3m to up to 7m. As the range increases, the more sensitive to movement it becomes.
6465

65-
TIME represents the duration of the output signal. If it detects movement, the TIME parameter controls how long the sensor will output HIGH. This can be changed from 5s through to 300s.
66+
TIME represents the duration of the output signal. If it detects movement, the TIME parameter controls how long the sensor will output HIGH. This can be changed from 5s through to 300s.
6667

6768
{:.ui .dividing .header}
6869
### Electronics
6970

70-
Hook up the sensor to the microbit as shown:
71+
Hook up the sensor to the microbit as shown:
7172

7273
{:.ui .celled .striped .table}
7374
| PIR Sensor Pin | Microbit Pin |
@@ -93,13 +94,13 @@ from microbit import *
9394

9495

9596
while True:
96-
97+
9798
if pin0.read_digital:
9899
display.scroll("Movement")
99100
sleep(1000)
100101
{% endhighlight %}
101102

102103
</div>
103104

104-
### Experiment
105-
* Trigger an alarm!
105+
### Experiment
106+
* Trigger an alarm!

RGB-led-microbit.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ simple-description: RGB LEDs
2727

2828
acknowledgements: RGB LED teaser image by Oomlout (CC-BY-2.0). RGB spectrum image public domain.
2929

30-
date: 2016-12-23T10:20:00Z
30+
date: 2016-12-23T10:20:00Z
31+
date-updated: 2016-12-23T10:20:00Z
3132
---
3233

33-
An RGB LED is essentially a red, green and blue LED combined into one package.
34+
An RGB LED is essentially a red, green and blue LED combined into one package.
3435

3536
![RGB LED](images/RGB-LED-microbit-diagram.jpg){:.ui .image}
3637

@@ -41,7 +42,7 @@ Each of the colours---red, green and blue---can be made my supplying current to
4142
![RGB LED](images/RGB-LED-microbit-rgb.png){:.ui .centered .image}
4243

4344

44-
Any coloured light can be made by varying how bright the red, blue and green LEDs are lit. This can be done with `pin0.write_analog(n)` where *n* is a value between 0 (off) and 1023 (on full).
45+
Any coloured light can be made by varying how bright the red, blue and green LEDs are lit. This can be done with `pin0.write_analog(n)` where *n* is a value between 0 (off) and 1023 (on full).
4546

4647

4748
{:.ui .dividing .header}
@@ -72,7 +73,7 @@ blue = pin1
7273
green = pin2
7374

7475
while True:
75-
76+
7677
# Make Yellow
7778
red.write_digital(1)
7879
green.write_digital(1)
@@ -109,4 +110,4 @@ while True:
109110

110111
### Experiment
111112
* Use `random.randrange(start, stop, step)` to generate a random colour every few seconds
112-
* Use three potentiometers to mix the colours
113+
* Use three potentiometers to mix the colours

button.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ simple-description: Push Button
2727

2828
acknowledgements: SMD push button switch by Sparkfun (CC-BY-2.0)
2929

30-
date: 2016-12-23T10:20:00Z
30+
date: 2016-12-23T10:20:00Z
31+
date-updated: 2016-12-23T10:20:00Z
3132
---
3233

3334
A small push button can be used to provide an external input into your circuits.
@@ -39,7 +40,7 @@ This is a small, SMD-mount tactile switch identical to the ones on your microbit
3940
{:.ui .dividing .header}
4041
### Electronics
4142

42-
One of the button's pins is connected to 3V. The corresponding pin to `pin0` of the microbit. When the button is pressed, `pin0` reads `True` or `1`.
43+
One of the button's pins is connected to 3V. The corresponding pin to `pin0` of the microbit. When the button is pressed, `pin0` reads `True` or `1`.
4344

4445
![Push Button Diagram and Photograph](images/button-circuit-no-pull-down.png){:.ui .image .centered}
4546

@@ -81,5 +82,3 @@ while True:
8182
<p>The microbit has internal pull-up and pull-down resistors. When a digital input is read by the microbit, the pull-down resistors are turned on so there is no need for an external one. </p>
8283
<p>This behaviour can be modified in PXT but not Python. </p>
8384
</div>
84-
85-

neopixels.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,16 @@ simple-description: Neopixels
2727

2828
acknowledgements: Video & teaser image by Adafruit (CC-BY-2.0)
2929

30-
date: 2016-12-23T10:20:00Z
30+
date: 2016-12-23T10:20:00Z
31+
date-updated: 2016-12-23T10:20:00Z
3132
---
3233
{::options parse_block_html="true" /}
3334
<video autoplay="" loop="" class="ui image medium right floated">
3435
<source src="images/neopixels.mp4" type="video/mp4">
3536
Your browser does not support the video tag.
3637
</video>
3738

38-
Neopixels are RGB LEDs sold by an electronics company called Adafruit. The modules come in different shapes and can contain any number of RGB LEDs. Each LED can be controlled (or addressed) individually. The microbit can drive around 8 LEDs; to control modules with more LEDs you'll need to use an external 5v power source.
39+
Neopixels are RGB LEDs sold by an electronics company called Adafruit. The modules come in different shapes and can contain any number of RGB LEDs. Each LED can be controlled (or addressed) individually. The microbit can drive around 8 LEDs; to control modules with more LEDs you'll need to use an external 5v power source.
3940

4041
You can get generic, Neopixel-style modules by searching for 'ws2812 LED' on eBay or Amazon.
4142

@@ -47,7 +48,7 @@ Most neopixel modules require the user to solder on their own connections. This
4748
![My soldered neopixel](images/neopixels-soldered.png){:.ui .image}
4849

4950

50-
* Solder wires to PWR, GND and IN.
51+
* Solder wires to PWR, GND and IN.
5152
* In this example the wires are colour-coded: black (for GND), red (for PWR) or yellow (for IN)
5253

5354
{:.ui .dividing .header}
@@ -113,7 +114,7 @@ neopixels.show() # Light the LEDs
113114

114115
#### Sequentially Light Each Pixel
115116

116-
Light one LED in the neopixel red for 200 milliseconds then light the next one.
117+
Light one LED in the neopixel red for 200 milliseconds then light the next one.
117118

118119
{% highlight python %}
119120
from microbit import *

potentiometer.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ simple-description: Potentiometer
2727

2828
acknowledgements: potentiometer image by budgetronics.eu (CC-SA 2.0)
2929

30-
date: 2016-12-23T10:20:00Z
30+
date: 2016-12-23T10:20:00Z
31+
date-updated: 2016-12-23T10:20:00Z
3132
---
3233

3334
Potentiometers are a type of resistor. The incoming voltage is divided between the middle and the GND pin. How this is divided depends on the rotation of the knob.
@@ -115,4 +116,3 @@ Rotate the knob to fill the microbit display with lit pixels. Note the potentiom
115116
* Dim an external LED
116117
* Control the pitch of music
117118
* Control the speed of a scroll
118-

rain-sensor.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ cats: external
2525
# Name of Component for index page
2626
simple-description: Rain Sensor
2727

28-
date: 2016-12-23T10:20:00Z
28+
date: 2016-12-23T10:20:00Z
29+
date-updated: 2016-12-23T10:20:00Z
2930
---
3031

31-
A rain sensor will detect droplets of water when they fall on the sensor board.
32+
A rain sensor will detect droplets of water when they fall on the sensor board.
3233

3334
{:.ui .dividing .header}
3435
### Component
@@ -40,16 +41,16 @@ The sensor board has two traces on it and the microbit can measure the resistanc
4041
#### Which Sensor?
4142
A search for 'FC-37' or 'YL-83' or 'Arduino Raindrop Sensor' will yield the sensor that's required.
4243

43-
The sensor usually comes with two modules. One part detects the raindrops, the other takes a signal from the sensor and outputs it as an analog or digital signal. It's possible to use the big raindrop detector module on its own; see the _Soil Moisutre Sensor_ entry on how to do it.
44+
The sensor usually comes with two modules. One part detects the raindrops, the other takes a signal from the sensor and outputs it as an analog or digital signal. It's possible to use the big raindrop detector module on its own; see the _Soil Moisutre Sensor_ entry on how to do it.
4445

4546
#### Setting Sensitivity
4647
First we need to provide power to the sensor to set its sensitivity:
4748

4849
* Connect the two modules together
49-
* Connect the `GND` pin on the small module to the microbit's `GND` pin.
50+
* Connect the `GND` pin on the small module to the microbit's `GND` pin.
5051
* Connect the module's `VCC` or `+` pin to the microbit's `3v pin`.
5152

52-
An LED will light on the module.
53+
An LED will light on the module.
5354

5455
There is a small potentiometer on the module. This sets the level of sensitivity required for the sensor to output a digital signal to say it has detected water.
5556

@@ -94,10 +95,10 @@ from microbit import *
9495

9596

9697
while True:
97-
98+
9899
pin0.write_digital(1) # Turn on the sensor
99100
sleep(500) # Wait for the sensor to settle
100-
101+
101102
if pin1.read_digital():
102103
display.show(Image.SAD) # it's raining
103104
else:

reed-switch.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ cats: external
2525
# Name of Component for index page
2626
simple-description: Reed Switch
2727

28-
date: 2016-12-23T10:20:00Z
28+
date: 2016-12-23T10:20:00Z
29+
date-updated: 2016-12-23T10:20:00Z
2930
---
3031

31-
A reed switch opens and closes in the presence of a magnet.
32+
A reed switch opens and closes in the presence of a magnet.
3233

3334
Typically they are usually open and closed when near a magnet.
3435

@@ -72,7 +73,7 @@ while True:
7273
# reed swich open
7374
# magnet not present
7475
display.scroll('Buglar')
75-
76+
7677
sleep(20)
7778

7879
{% endhighlight %}
@@ -83,5 +84,5 @@ while True:
8384
<img src="{{ baseurl }}/images/components/single-led-pxt.png" class="ui image">
8485
</div>
8586

86-
### Notes
87-
* The microbit can be used as a reed switch with the onboard magnetometer. `compass.get_field_strength()` returns the magnetic field in nano teslas.
87+
### Notes
88+
* The microbit can be used as a reed switch with the onboard magnetometer. `compass.get_field_strength()` returns the magnetic field in nano teslas.

servo.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ simple-description: Servo
2727

2828
acknowledgements: Servo teaser & diagram by [Upgrade Industries](https://www.upgradeindustries.com/licensing/)
2929

30-
date: 2016-12-23T10:20:00Z
30+
date: 2016-12-23T10:20:00Z
31+
date-updated: 2016-12-23T10:20:00Z
3132
---
3233

3334
The __Tower Pro SG90__ is a small, 9 gram servo that can run directly from the microbit power supply. This is a 180&deg; servo meaning it can turn from 0&deg; to 180&deg;. It has many applications: open a flap to dispense treats for to a dog, create a robotic walker, or to drive window wipers on a car.
@@ -68,7 +69,7 @@ Servos are difficult to control in Python on the microbit. I've tried to make it
6869
</div>
6970
<div class="ui bottom attached tab segment active" data-tab="first" markdown="1">
7071

71-
A module must be installed to tell Python how to use the servo.
72+
A module must be installed to tell Python how to use the servo.
7273

7374
#### Steps
7475

@@ -95,7 +96,7 @@ while True:
9596

9697
{% endhighlight %}
9798

98-
The angle of the servo is controlled by `Servo(pin0).write_angle(30)`. If you want to control a servo attached to pin1 as well, it would be:
99+
The angle of the servo is controlled by `Servo(pin0).write_angle(30)`. If you want to control a servo attached to pin1 as well, it would be:
99100

100101
{% highlight python %}
101102
Servo(pin1).write_angle(30)
@@ -122,4 +123,3 @@ sv2.write_angle(0)
122123

123124
### Experiment
124125
* Play with the [sweep example](https://github.com/microbit-playground/microbit-servo-class/blob/master/examples/twist-example.py) to rotate the servo through 180&deg;
125-

single-led.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ simple-description: LEDs
2727

2828
acknowledgements: Teaser image by Adafruit (CC-BY).
2929

30-
date: 2016-12-23T10:20:00Z
30+
date: 2016-12-23T10:20:00Z
31+
date-updated: 2016-12-23T10:20:00Z
3132
---
3233

33-
It's possible to use the external pins on the micro:bit to control external LEDs.
34+
It's possible to use the external pins on the micro:bit to control external LEDs.
3435

3536
{:.ui .dividing .header}
3637
### Electronics
@@ -97,4 +98,4 @@ Creates a lot of flickering in Python; not quite sure yet.
9798
### Experiment
9899
* Remove the resistor; what happens?
99100
* Reverse the polarity of the LED; what happens?
100-
* Make the LED flash when the button is pushed.
101+
* Make the LED flash when the button is pushed.

soil-moisture-sensor.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ simple-description: "Soil Moisture"
2727

2828
acknowledgements: Teaser image by Adafruit (CC-BY). Sensor image by spark fun (CC-BY). Dupont connector by Adafruit (CC-BY).
2929

30-
date: 2016-12-23T10:20:00Z
30+
date: 2016-12-23T10:20:00Z
31+
date-updated: 2016-12-23T10:20:00Z
3132
---
3233

3334
A soil moisture sensor module is designed to measure the amount of water in the soil by reading its resistance. It passes an electric current through the two prongs and measures the resistance of the soil.

ultrasound-distance-sensor.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ simple-description: Ultrasound
2727

2828
acknowledgements: Teaser image by Sparkfun (CC-BY). Sonar diagram by Georg Wiora CC-BY-SA-2.5
2929

30-
date: 2016-12-23T10:20:00Z
30+
date: 2016-12-23T10:20:00Z
31+
date-updated: 2016-12-23T10:20:00Z
3132
---
3233

3334
Sonar uses sound to detect objects. It can be used to measure distance to an object.

0 commit comments

Comments
 (0)