Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
a5cb663316 | |||
1dd0c1793e | |||
a4a74bdd6b | |||
45c82767d0 | |||
0c77927f35 | |||
672672e632 | |||
fe2ae855b0 | |||
6612080885 |
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
* **[Getting Started](/getting-started)**
|
* **[Getting Started](/getting-started)**
|
||||||
* [Projects](/projects)
|
* [Projects](/projects)
|
||||||
|
* [Examples](/examples)
|
||||||
* [Lessons](/lessons)
|
* [Lessons](/lessons)
|
||||||
|
|
||||||
### @boardname@ reference
|
### @boardname@ reference
|
||||||
|
35
docs/examples.md
Normal file
35
docs/examples.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
# Examples
|
||||||
|
|
||||||
|
Here are some fun programs for your @boardname@!
|
||||||
|
|
||||||
|
## Fun stuff
|
||||||
|
|
||||||
|
```codecard
|
||||||
|
[{
|
||||||
|
"name": "Blinky",
|
||||||
|
"url":"/examples/blinky"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Name Tag",
|
||||||
|
"url":"/examples/name-tag"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Rando",
|
||||||
|
"url":"/examples/rando"
|
||||||
|
}]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Sensors
|
||||||
|
|
||||||
|
```codecard
|
||||||
|
[{
|
||||||
|
"name": "Plot Acceleration",
|
||||||
|
"url":"/examples/plot-acceleration"
|
||||||
|
}, {
|
||||||
|
"name": "Plot Light Level",
|
||||||
|
"url":"/examples/plot-light-level"
|
||||||
|
}, {
|
||||||
|
"name": "Plot Analog Pin",
|
||||||
|
"url":"/examples/plot-analog-pin"
|
||||||
|
}]
|
||||||
|
```
|
20
docs/examples/blinky.md
Normal file
20
docs/examples/blinky.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# Blinky
|
||||||
|
|
||||||
|
```blocks
|
||||||
|
basic.forever(() => {
|
||||||
|
basic.showLeds(`
|
||||||
|
. # . # .
|
||||||
|
# # # # #
|
||||||
|
# # # # #
|
||||||
|
. # # # .
|
||||||
|
. . # . .`
|
||||||
|
);
|
||||||
|
basic.showLeds(`
|
||||||
|
. . . . .
|
||||||
|
. . . . .
|
||||||
|
. . . . .
|
||||||
|
. . . . .
|
||||||
|
. . . . .`
|
||||||
|
);
|
||||||
|
})
|
||||||
|
```
|
7
docs/examples/name-tag.md
Normal file
7
docs/examples/name-tag.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Name Tag
|
||||||
|
|
||||||
|
```blocks
|
||||||
|
basic.forever(() => {
|
||||||
|
basic.showString("JAMES")
|
||||||
|
})
|
||||||
|
```
|
10
docs/examples/plot-acceleration.md
Normal file
10
docs/examples/plot-acceleration.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Plot Acceleration
|
||||||
|
|
||||||
|
```blocks
|
||||||
|
basic.forever(() => {
|
||||||
|
led.plotBarGraph(
|
||||||
|
input.acceleration(Dimension.X),
|
||||||
|
1023
|
||||||
|
)
|
||||||
|
})
|
||||||
|
```
|
10
docs/examples/plot-analog-pin.md
Normal file
10
docs/examples/plot-analog-pin.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Plot Analog Pin
|
||||||
|
|
||||||
|
```blocks
|
||||||
|
basic.forever(() => {
|
||||||
|
led.plotBarGraph(
|
||||||
|
pins.analogReadPin(AnalogPin.P0),
|
||||||
|
1023
|
||||||
|
)
|
||||||
|
})
|
||||||
|
```
|
10
docs/examples/plot-light-level.md
Normal file
10
docs/examples/plot-light-level.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Plot Light level
|
||||||
|
|
||||||
|
```blocks
|
||||||
|
basic.forever(() => {
|
||||||
|
led.plotBarGraph(
|
||||||
|
input.lightLevel(),
|
||||||
|
255
|
||||||
|
)
|
||||||
|
})
|
||||||
|
```
|
7
docs/examples/rando.md
Normal file
7
docs/examples/rando.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Rando
|
||||||
|
|
||||||
|
```blocks
|
||||||
|
basic.forever(() => {
|
||||||
|
led.toggle(Math.random(5), Math.random(5))
|
||||||
|
})
|
||||||
|
```
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "pxt-microbit",
|
"name": "pxt-microbit",
|
||||||
"version": "0.9.2",
|
"version": "0.9.4",
|
||||||
"description": "micro:bit target for PXT",
|
"description": "micro:bit target for PXT",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"JavaScript",
|
"JavaScript",
|
||||||
@ -36,6 +36,6 @@
|
|||||||
"semantic-ui-less": "^2.2.4"
|
"semantic-ui-less": "^2.2.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pxt-core": "0.11.26"
|
"pxt-core": "0.11.28"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -208,6 +208,7 @@
|
|||||||
"termsOfUseUrl": "https://go.microsoft.com/fwlink/?LinkID=206977",
|
"termsOfUseUrl": "https://go.microsoft.com/fwlink/?LinkID=206977",
|
||||||
"githubUrl": "https://github.com/Microsoft/pxt-microbit",
|
"githubUrl": "https://github.com/Microsoft/pxt-microbit",
|
||||||
"projectGallery": "projects",
|
"projectGallery": "projects",
|
||||||
|
"exampleGallery": "examples",
|
||||||
"crowdinProject": "kindscript",
|
"crowdinProject": "kindscript",
|
||||||
"boardName": "micro:bit",
|
"boardName": "micro:bit",
|
||||||
"sideDoc": "tutorials/getting-started",
|
"sideDoc": "tutorials/getting-started",
|
||||||
|
Reference in New Issue
Block a user