update readme and pxt version

This commit is contained in:
Baozhu Zuo 2019-07-31 15:51:43 +08:00
parent 719ec4a2cc
commit 2ee4f55c1c
2 changed files with 70 additions and 7 deletions

View File

@ -6,16 +6,79 @@ A Microsoft MakeCode package for for Seeed Studio Grove module.
### Grove - Gesture
Create gesture events.
get gesture model.
```blocks
grove.onGesture(GroveGesture.Up, () => {
basic.showString("Up");
})
grove.onGesture(GroveGesture.Down, () => {
basic.showString("Down");
grove.initGesture()
basic.forever(function () {
if (grove.getGestureModel() == 1) {
basic.showLeds(`
. . # . .
. . . # .
# # # # #
. . . # .
. . # . .
`)
}
if (grove.getGestureModel() == 2) {
basic.showLeds(`
. . # . .
. # . . .
# # # # #
. # . . .
. . # . .
`)
}
if (grove.getGestureModel() == 3) {
basic.showLeds(`
. . # . .
. # # # .
# . # . #
. . # . .
. . # . .
`)
}
if (grove.getGestureModel() == 4) {
basic.showLeds(`
. . # . .
. . # . .
# . # . #
. # # # .
. . # . .
`)
}
basic.pause(100)
})
```
all the model
```
/**
* Grove Gestures
*/
enum GroveGesture {
//% block=None
None = 0,
//% block=Right
Right = 1,
//% block=Left
Left = 2,
//% block=Up
Up = 3,
//% block=Down
Down = 4,
//% block=Forward
Forward = 5,
//% block=Backward
Backward = 6,
//% block=Clockwise
Clockwise = 7,
//% block=Anticlockwise
Anticlockwise = 8,
//% block=Wave
Wave = 9
}
```
### Grove - Ultrasonic Ranger

View File

@ -1,6 +1,6 @@
{
"name": "Grove",
"version": "0.1.3",
"version": "0.1.4",
"description": "A Microsoft MakeCode package for Seeed Studio Grove module",
"license": "MIT",
"dependencies": {