From 1ea8c73671e7e35eaab15332f05965913cc07ec6 Mon Sep 17 00:00:00 2001 From: Michael Klein <37311672+MKleinSB@users.noreply.github.com> Date: Mon, 9 Dec 2024 13:11:16 +0100 Subject: [PATCH 1/4] Update test.ts --- test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.ts b/test.ts index 3997a88..8b74d66 100644 --- a/test.ts +++ b/test.ts @@ -1,4 +1,4 @@ -let _4Digit = grove.createDisplay(DigitalPin.C16, DigitalPin.C17) +let _4Digit = grove.createDisplay(DigitalPin.P0, DigitalPin.P1) grove.setupWifi( SerialPin.P15, SerialPin.P1, @@ -9,4 +9,4 @@ grove.setupWifi( basic.forever(function () { _4Digit.bit(6, 1) -}) \ No newline at end of file +}) From 7e500aed93b6f78af98a10fc62c566f79c35f40f Mon Sep 17 00:00:00 2001 From: Michael Klein <37311672+MKleinSB@users.noreply.github.com> Date: Mon, 9 Dec 2024 13:12:51 +0100 Subject: [PATCH 2/4] Update main.ts remove Calliope mini specific pins --- main.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/main.ts b/main.ts index 24831db..c1b539c 100644 --- a/main.ts +++ b/main.ts @@ -460,7 +460,7 @@ namespace grove { //% blockId=grove_ultrasonic_centimeters_v2 block="(V2)Ultrasonic Sensor (in cm) at|%pin" //% pin.fieldEditor="gridpicker" pin.fieldOptions.columns=4 //% pin.fieldOptions.tooltips="false" pin.fieldOptions.width="250" - //% group="Ultrasonic" pin.defl=DigitalPin.C16 + //% group="Ultrasonic" pin.defl=DigitalPin.P0 export function measureInCentimetersV2(pin: DigitalPin): number { @@ -491,7 +491,7 @@ namespace grove { //% blockId=grove_ultrasonic_inches_v2 block="(V2)Ultrasonic Sensor (in inch) at|%pin" //% pin.fieldEditor="gridpicker" pin.fieldOptions.columns=4 //% pin.fieldOptions.tooltips="false" pin.fieldOptions.width="250" - //% group="Ultrasonic" pin.defl=DigitalPin.C16 + //% group="Ultrasonic" pin.defl=DigitalPin.P0 export function measureInInchesV2(pin: DigitalPin): number { let duration = 0; @@ -521,7 +521,7 @@ namespace grove { //% 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" - //% group="Ultrasonic" pin.defl=DigitalPin.C16 + //% group="Ultrasonic" pin.defl=DigitalPin.P0 export function measureInCentimeters(pin: DigitalPin): number { @@ -552,7 +552,7 @@ namespace grove { //% 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" - //% group="Ultrasonic" pin.defl=DigitalPin.C16 + //% group="Ultrasonic" pin.defl=DigitalPin.P0 export function measureInInches(pin: DigitalPin): number { let duration = 0; @@ -585,7 +585,7 @@ namespace grove { //% group="4-Digit" //% clkPin.fieldOptions.tooltips="false" clkPin.fieldOptions.width="250" //% dataPin.fieldEditor="gridpicker" dataPin.fieldOptions.columns=4 - //% clkPin.defl=DigitalPin.C16 dataPin.defl=DigitalPin.C17 + //% clkPin.defl=DigitalPin.P0 dataPin.defl=DigitalPin.P1 //% dataPin.fieldOptions.tooltips="false" dataPin.fieldOptions.width="250" //% blockSetVariable=4digit export function createDisplay(clkPin: DigitalPin, dataPin: DigitalPin): TM1637 @@ -628,7 +628,7 @@ namespace grove { * */ //% blockId=grove_getjoystick block="get joystick key at|%xpin|and|%ypin" - //% group="Thumbjoystick" xpin.defl=AnalogPin.C16 ypin.defl=AnalogPin.C17 + //% group="Thumbjoystick" xpin.defl=AnalogPin.P0 ypin.defl=AnalogPin.P1 export function getJoystick(xpin: AnalogPin, ypin: AnalogPin): number { return joystick.joyread(xpin, ypin); } @@ -683,7 +683,7 @@ namespace grove { * @param handler code to run */ //% blockId=grove_joystick_create_event block="on Key|%key at |%xpin|and|%ypin" - //% group="Thumbjoystick" xpin.defl=AnalogPin.C16 ypin.defl=AnalogPin.C17 + //% group="Thumbjoystick" xpin.defl=AnalogPin.P0 ypin.defl=AnalogPin.P1 export function onJoystick(key: GroveJoystickKey, xpin: AnalogPin, ypin: AnalogPin, handler: () => void) { control.onEvent(joystickEventID, key, handler); @@ -866,3 +866,4 @@ namespace grove { serial.writeString(cmd + "\u000D\u000A") } } + From 56f461139f3c63554b0ffaf64e98ed8cf6e1f537 Mon Sep 17 00:00:00 2001 From: Michael Klein <37311672+MKleinSB@users.noreply.github.com> Date: Mon, 9 Dec 2024 13:16:15 +0100 Subject: [PATCH 3/4] Update pxt.json to target microbit --- pxt.json | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pxt.json b/pxt.json index 81e0d8b..54fced0 100644 --- a/pxt.json +++ b/pxt.json @@ -19,8 +19,13 @@ "test.ts" ], "public": true, - "supportedTargets": [ - "calliopemini" - ], + "targetVersions": { + "target": "7.0.51", + "targetId": "microbit" + }, + "supportedTargets": [ + "calliopemini", + "microbit" + ], "preferredEditor": "tsprj" } From 52a9f86d9685e191ee47f54c5c85076508612562 Mon Sep 17 00:00:00 2001 From: Michael Klein <37311672+MKleinSB@users.noreply.github.com> Date: Mon, 9 Dec 2024 13:16:40 +0100 Subject: [PATCH 4/4] bump to V0.7.0 --- pxt.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pxt.json b/pxt.json index 54fced0..f2f88a6 100644 --- a/pxt.json +++ b/pxt.json @@ -1,6 +1,6 @@ { "name": "Grove", - "version": "0.6.0", + "version": "0.7.0", "description": "A Microsoft MakeCode package for Seeed Studio Grove module", "license": "MIT", "dependencies": {