From 981b54a2469c6f2e3465d4ac357229965500396f Mon Sep 17 00:00:00 2001 From: Amerlander Date: Mon, 14 Sep 2020 23:02:41 +0200 Subject: [PATCH] Change digital Pin selection --- main.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.ts b/main.ts index c088082..bf5dfba 100644 --- a/main.ts +++ b/main.ts @@ -456,6 +456,8 @@ namespace grove { * @param pin signal pin of ultrasonic ranger module */ //% blockId=grove_ultrasonic_centimeters block="Ultrasonic Sensor (in cm) at|%pin" + //% pin.fieldEditor="gridpicker" pin.fieldOptions.columns=4 + //% pin.fieldOptions.tooltips="false" pin.fieldOptions.width="250" export function measureInCentimeters(pin: DigitalPin): number { let duration = 0; @@ -483,6 +485,8 @@ namespace grove { * @param pin signal pin of ultrasonic ranger module */ //% blockId=grove_ultrasonic_inches block="Ultrasonic Sensor (in inch) at|%pin" + //% pin.fieldEditor="gridpicker" pin.fieldOptions.columns=4 + //% pin.fieldOptions.tooltips="false" pin.fieldOptions.width="250" export function measureInInches(pin: DigitalPin): number { let duration = 0; @@ -511,6 +515,10 @@ namespace grove { * @param dataPin value of data pin number */ //% blockId=grove_tm1637_create block="4-Digit Display at|%clkPin|and|%dataPin" + //% clkPin.fieldEditor="gridpicker" clkPin.fieldOptions.columns=4 + //% clkPin.fieldOptions.tooltips="false" clkPin.fieldOptions.width="250" + //% dataPin.fieldEditor="gridpicker" dataPin.fieldOptions.columns=4 + //% dataPin.fieldOptions.tooltips="false" dataPin.fieldOptions.width="250" export function createDisplay(clkPin: DigitalPin, dataPin: DigitalPin): TM1637 { let display = new TM1637();