Seeed Studio Grove Modul für Calliope MakeCode -> Anpassung der ThingSpeak-Cloud auf rlp.schule
Go to file
2017-10-03 09:19:10 +09:00
_locales/ja Add ja locale. 2017-09-01 10:42:36 +09:00
.gitattributes 🎉 Added .gitattributes & .gitignore files 2017-06-23 09:54:17 +08:00
.gitignore 🎉 Added .gitattributes & .gitignore files 2017-06-23 09:54:17 +08:00
icon.png Update 2017-06-23 10:45:06 +08:00
main.ts Modify ultrasonic sensor distance calculation 2017-09-22 14:31:12 +08:00
Makefile Update 2017-06-23 09:54:44 +08:00
pxt.json Add ja locale. 2017-09-01 10:42:36 +09:00
README.md Update 2017-06-28 13:39:51 +08:00
test.ts Update 2017-06-28 13:39:51 +08:00
tsconfig.json Update 2017-06-23 09:54:44 +08:00

Grove

A Microsoft MakeCode package for for Seeed Studio Grove module.

Basic usage

Grove - Gesture

// Create gesture events
grove.onGesture(GroveGesture.Up, () => {
    basic.showString("Up")
})

grove.onGesture(GroveGesture.Down, () => {
    basic.showString("Down")
})

Grove - Ultrasonic Ranger

// 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);

Grove - 4 digital display

// Create a 4 Digital Display driver, specify the clk and data pin
let display = grove.createDisplay(DigitalPin.P0, DigitalPin.P1);

// Set the brightness level
display.set(7);

// Start display value
display.show(1234);

More operation

Grove - 4 digital display

// After create a 4 Digital Display driver, it can display number "1234" one by one
display.bit(1, 0);
display.bit(2, 1)
display.bit(3, 2);
display.bit(4, 3)

Use point() to open or close point dispay.

Use clear() to clean display.

License

MIT

Supported targets

  • for PXT/microbit (The metadata above is needed for package search.)