adding example pages

This commit is contained in:
Peli de Halleux 2017-02-09 14:44:56 -08:00
parent fe2ae855b0
commit 672672e632
5 changed files with 35 additions and 0 deletions

View File

@ -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

13
docs/examples.md Normal file
View File

@ -0,0 +1,13 @@
# Examples
Here are some fun programs for your @boardname@!
```codecard
[{
"name": "Plot Acceleration",
"url":"/examples/plot-acceleration"
}, {
"name": "Plot Light Level",
"url":"/examples/plot-light-level"
}]
```

View File

@ -0,0 +1,10 @@
## Plot Acceleration
```blocks
basic.forever(() => {
led.plotBarGraph(
input.acceleration(Dimension.X),
1023
)
})
```

View File

@ -0,0 +1,10 @@
## Plot Light level
```blocks
basic.forever(() => {
led.plotBarGraph(
input.lightLevel(),
255
)
})
```

View File

@ -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",