diff --git a/docs/device/crocodile-clips.md b/docs/device/crocodile-clips.md index 01196b32..780acae0 100644 --- a/docs/device/crocodile-clips.md +++ b/docs/device/crocodile-clips.md @@ -11,9 +11,7 @@ This example displays a random number every time the crocodile clip holds `GND` ### Connecting Crocodile Clips -![](/static/mb/crocodile-clips-1.jpg) -![](/static/mb/crocodile-clips-2.jpg) ### Lessons diff --git a/libs/microbit/control.cpp b/libs/microbit/control.cpp index 7556c3ae..2d8cc1f5 100644 --- a/libs/microbit/control.cpp +++ b/libs/microbit/control.cpp @@ -163,4 +163,12 @@ namespace control { StringData* deviceName() { return ManagedString(microbit_friendly_name()).leakData(); } + + /** + * Derive a unique, consistent serial number of this device from internal data. + */ + //% + int deviceSerialNumber() { + return microbit_serial_number(); + } } diff --git a/libs/microbit/core.cpp b/libs/microbit/core.cpp index 5179f490..b74c3cc5 100644 --- a/libs/microbit/core.cpp +++ b/libs/microbit/core.cpp @@ -301,4 +301,18 @@ namespace pxtrt { { microbit_panic(code); } + + // + // Debugger + // + + //% + uint32_t getNumGlobals() { + return numGlobals; + } + + //% + void* getGlobalsPtr() { + return globals; + } } diff --git a/libs/microbit/shims.d.ts b/libs/microbit/shims.d.ts index bf33e2be..84c4ff0d 100644 --- a/libs/microbit/shims.d.ts +++ b/libs/microbit/shims.d.ts @@ -348,6 +348,12 @@ declare namespace control { */ //% blockId="control_device_name" block="device name" weight=10 shim=control::deviceName function deviceName(): string; + + /** + * Derive a unique, consistent serial number of this device from internal data. + */ + //% shim=control::deviceSerialNumber + function deviceSerialNumber(): number; } diff --git a/package.json b/package.json index cab56e15..245a7d2c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pxt-microbit", - "version": "0.2.91", + "version": "0.2.92", "description": "BBC micro:bit target for PXT", "keywords": [ "JavaScript", @@ -29,6 +29,6 @@ "typescript": "^1.8.7" }, "dependencies": { - "pxt-core": "0.2.99" + "pxt-core": "0.2.100" } } diff --git a/pxtarget.json b/pxtarget.json index 949ac2d2..e1dff78d 100644 --- a/pxtarget.json +++ b/pxtarget.json @@ -57,7 +57,10 @@ "deployDrives": "^MICROBIT" }, "runtime": { - "mathBlocks": true + "mathBlocks": true, + "loopBlocks": true, + "logicBlocks": true, + "variablesBlocks": true }, "simulator": { "autoRun": true