A Microsoft MakeCode package for for LB Grove module.
Create gesture events.
grove.onGesture(GroveGesture.Up, () => {
basic.showString("Up");
})
grove.onGesture(GroveGesture.Down, () => {
basic.showString("Down");
})
Measure distance in centimeters, specify the signal pin.
let distance = grove.measureInCentimeters(DigitalPin.P0);
Measure distance in inches, specify the signal pin.
let distance = grove.measureInInches(DigitalPin.P0);
Create a 4 Digital Display driver, specify the clk and data pin, and set the brightness level, then start display value.
let display = grove.createDisplay(DigitalPin.P0, DigitalPin.P1);
display.set(7);
display.show(1234);
Use ||bit||
to display one bit number.
Use ||point||
to open or close point dispay.
Use ||clear||
to clean display.
MIT
- for PXT/microbit