adding a few more examples
This commit is contained in:
parent
45c82767d0
commit
a4a74bdd6b
@ -2,6 +2,23 @@
|
||||
|
||||
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
|
||||
@ -11,5 +28,8 @@ Here are some fun programs for your @boardname@!
|
||||
}, {
|
||||
"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-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
|
||||
)
|
||||
})
|
||||
```
|
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))
|
||||
})
|
||||
```
|
Loading…
Reference in New Issue
Block a user