From 41996adf11543b503ab1cb1a9bedd811a8e78ea1 Mon Sep 17 00:00:00 2001 From: "jinyuan.weng" Date: Tue, 30 Jan 2018 14:40:13 +0800 Subject: [PATCH] Modify readme.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f3d9e55..218c1f4 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ A Microsoft MakeCode package for for Seeed Studio Grove module. ### Grove - Gesture Create gesture events. + ```blocks grove.onGesture(GroveGesture.Up, () => { basic.showString("Up") @@ -19,12 +20,14 @@ grove.onGesture(GroveGesture.Down, () => { ### Grove - Ultrasonic Ranger Measure distance in centimeters, specify the signal pin. + ```blocks let distance = 0 distance = grove.measureInCentimeters(DigitalPin.P0) ``` Measure distance in inches, specify the signal pin. + ```blocks let distance = 0 distance = grove.measureInInches(DigitalPin.P0) @@ -33,6 +36,7 @@ distance = grove.measureInInches(DigitalPin.P0) ### Grove - 4 digital display Create a 4 Digital Display driver, specify the clk and data pin, and set the brightness level, then start display value. + ```blocks let display: grove.TM1637 = null display = grove.createDisplay(DigitalPin.P0, DigitalPin.P1) @@ -57,5 +61,3 @@ MIT ## Supported targets * for PXT/microbit -(The metadata above is needed for package search.) -