f6388ae7ab
* add windows and mac icons for offline app (#2141) * Don't overwrite electron deploy (#2142) * remove baud rate as it is not support on HW (#2124) * add blocks for serial set tx/rx buffer size (#2144) * support flag argument (#2126) * support flag argument * enable drop semantics * add reentrant * updated shims * Bumping pxt-core to 5.15.3 * 1.4.13 * Bumping pxt-core to 5.15.4 * 1.4.14 * bump setgroup on top of radio (#2157) * bump setgroup on top of radio * move group up * Update name-tag.md (#2156) * add API to disable serial padding. (#2145) * add API to desiable serial padding. * renamed api * Set serial help paths for blocks (#2159) * Shrink the link in firmware version hint (#2163) * Shrink the link in firmware version hint * fix a translation quibble * Fix Black and White Typo (#2138) * Fixed typo: Back->Black * Added Upgrade Rules to fix spelling * Removed extra isEmpty * Added previous BackAndWhite to allow for compilation of old scripts * always shake when button is pressed (#2161) * add PLENbit (#2140) * Bumping pxt-core to 5.15.5 * 1.4.15 * stop background before foreground (#2174) * Bumping pxt-core to 5.15.6 * 1.4.16 * Bumping pxt-core to 5.15.7 * 1.4.17 * Bumping pxt-core to 5.15.8 * 1.4.18 * add backgrounds for use with .dmg (#2200) * add normal size and 2x size backgrounds for dmg * update arrow color to dark gray * Bumping pxt-core to 5.15.9 * 1.4.19 * Adding v1-ref.json pointing to 1.2.13 * Bumping microbit to 2.0.0 * 2.0.1 * Pointing beta-ref to v2 * Bumping pxt-core to 5.15.10 * 2.0.2 * this repo is empty (#2201) * Update radio event parm usage descriptions (#2165) * add browser db prefix for v2 (#2208) * 2.0.3 * Releasing 2.0.3 to live (#2209) * dynamically sniff offline app version (#2059) * Revert "dynamically sniff offline app version (#2059)" (#2211) This reverts commitb480b34f7e
. * Updating electron to 2.0.3 (#2210) * Updating offline reference to 2.0.3 (#2212) * Bumping version to 2.1.0 * 2.1.1 * Spelling (#2214) * Update write-received-packet-to-serial.md (#2217) A support ticket pointed out issues that they'd encountered when trying to follow this document: - `sendValue` only supports an 8 character string. This is documented in the `sendValue` docs but a longer string had been used here - Only `radio.onReceivedNumber` is used so the sample output is not consistent with the users experience. I've changed it so that all packets are handled * Use gcPreAllocateBlock() to fix #2177, #2215 (#2216) * Use gcPreAllocateBlock() to fix #2177, #2215 * bump pcp 6.9.4 * 2.1.2 * Correct dice example (#2262) Changed random(6) to random(5) so the number reflect real dice. * add 4tronix minibit (#2249) * Update targetconfig.json (#2258) remove mock-iot-extension as it is just an experimental development by The Foundation * Update calibrate-compass.md (#2265) Based on user feedback in Slack https://microbit-community.slack.com/archives/C1ZMKRFHD/p1563274019078400?thread_ts=1563268925.077500&cid=C1ZMKRFHD * add wukong (#2239) * Decrease size of GC heap to allow more DAL allocs (#2246) * 2.1.3 * add Kitronik view text (#2125) * Release 2.0.6 to live (#2308) * Update nexus:bit entry (#2315) * update nexus:bit entry * update nexus:bit entry * Logic Lab mini-course (#2307) * Logic Lab mini-course * example syntax * Updating Readme with branch information. * bump pxt for ios <=9 fix (#2311) * Update pxt/common-packages and fix build (#2323) * fix build off of pxt/ and pxt-common-packages master * check in generated files * add-pxt-bmp280 (#2325) * Bumping pxt-core to 5.19.8 & common-packages to 6.14.9 * 2.1.4 * Error codes page update (#2327) * Start adding new codes * few tiny edits * Add more errors and rearrange * Update docs/device/error-codes.md Co-Authored-By: Michał Moskal <michal@moskal.me> * juggle category * set error range in hint Co-Authored-By: Michał Moskal <michal@moskal.me> * Update docs/device/error-codes.md Co-Authored-By: Mark <mark@microbit.org> * fix build (#2360) * fix broken build * just try the more 'official' fix if possible * back to the way that actually works.. * bump pxt to include accessibility changes (#2404) * 2.1.5 * make hc mode sim color have higher contrast (#2409) * Show project settings (#2401) * markdown link fix (#2400) * add HTS221 (#2384) * Editor controllers fixes (#2412) * updated strings * bump pxt * anotehr attempt * 2.1.6 * turn on samples when reading accelerometer (#2413) * 2.1.7 * hide pin p19/p20 (#2268) * Fix remove life animation causing microbit stuck (#2314) On the real microbit board, if the program execute other game blocks while the remove life animation is playing, it would cause strange behavior or even make the game stuck. * Port of Programmable Logic lesson for Logic Lab course (#2359) * port of programmable logic lesson * trigger rebuild * express as logical equation in snippet * go logical for snippet inputs * emit enum as bitmask (#2414) * 2.1.8 * add alt attributes to download screens (#2415) * add alt attributes to download screens, fixes microsoft/pxt-microbit#2291 * better descriptions * fixing links in translate page * Modify the LED coordinates to be between 0 and 4. (#2416) Without this change, there is a 11/36 chance no LED lights as [`Math.random(a,b)`](https://docs.python.org/2/library/random.html#random.uniform) (thus the `pick random` block) chooses a number in the (inclusive, closed) interval `[a, b]`. * Set LED plot row/column ranges for 'Reaction Time' (#2420) * add LIS2MDL (#2385) * add LIS2DW12 (#2386) * add LPS22 (#2387) * add LSM6DSO (#2388) * add gator environment (#2326) * add STTS751 (#2389) * add inventura extension (#2421) * add new sparkfun extensions (#2238) * add new sparkfun extensions * remove gator environment pending fixes * add dfplayer mini extension (#2417) * Update 'servo calibrator' link (#2424) * I2C Addressing Note (#2428) * I2C on-board sensor address note * note for 7bit to 8bit shift * Add nested summaries for newer courses (#2425) * bump pxt (#2432) * bump pxt * bump * bump * fix version * 2.1.9 * bump package.json (#2433) * 2.1.10 * bump pxt (#2434) * 2.1.11 * bump for diff3 (#2435) * enable experiment * bump pxt * 2.1.12 * Add the Stu Lowe coding cards (#2438) * Add the Stu Lowe coding cards * Move 'Coding Cards' below 'Hardware' * Add isDeleted (#2445) * add xinabox OD01 and breakout display section (#2397) * add xinabox OD01 and breakout display section * Update targetconfig.json * Update extensions.md * Link to power supply limitations (#2443) Fixes: #2442 * Pxt v5.23.17 (#2446) * bump pxt * regen docs * fix version syntax * restore extension * removed dup * 2.1.13 * add-sw01 (#2393) * Locking old issues * add Keyestudio robot car (#2452) * Allow globals in reclaimed bluetooth memory (#2455) * isTouchingEdge() should not return true for deleted sprite (#2449) * add query variant to hide toolbar (#2458) * Adding link to stable refs (#2460) * Update extensions.md (#2456) Move the :VIEW Text32 from other to Display now there is a display sections * 2.1.14 * fixing radio stack (#2461) * fixing radio stack * updated shims * 2.1.15 * Stable points to latest 2.0.9 (#2469) * Releasing 2.0.9 to live (#2470) * Fixing signal strength (#2474) * Pointing to 2.0.10 * Releasing 2.0.10 (#2476) With radio strength signal fix for hot or cold * Removing old bitbot as we have a new bitbot package (#2479) * updated pxt (#2465) * updated pxt * bump pxt * updated react * updated ptx * Remove empty variable element from XML * Bump pxt-core to 5.25.15 * bump pxt * Bump pxt to 5.25.17 * Add precision to music slider * 2.1.16 * add drive:bit (#2484) * micro:bit RSSI fix (#2480) * read rssi from packet * updated shims * fix build * fix help * move deprecated function to ts * some formatting * restore rssi block * restory notations * actually copy bytes * removing logging code * simpler wake up code * comment * fix build * bump pxt * go back to safety * bump microbit * restor package.json * revert jquery v * use macro * check length * bump pxt (#2490) * 2.1.17 * Use default resize function for microbit gesture dropdown (#2491) * Name Badge project page (#2477) * Name Bagde project page * gotta please the summary check * link typo, ugh * Revert "Name Badge project page (#2477)" This reverts commit2e2860632b
. * add freenove starter kit (#2493) * radio.setFrequencyBand support (#2495) * setfrequencyband support * revert line change * add bounds check * Name Badge project page (#2496) * Name Bagde project page * gotta please the summary check * link typo, ugh * get rid of the pptx * Simplify the Fahrenheit from Celsius computation. (#2497) As the micro:bit introduces floating point arithmetic for both the existing `f = 18 * c / 10 + 32` computation and the new `f = 1.8 * c + 32` computation, there isn't any benefit for the former. * Enable Polish localization (#2499) * bump package * 2.1.18 * shrink maintenance gif * 2.1.19 * Rotary phone dial (#2502) * some write up * adding images * text * more text * adding vids * adding escape room * remove newer lesson * remove .mp4 * Card page edits * adding image * adding to toys * rotary edits * fix typo * bump pxt 5.28.7 (#2503) * bump pxt * bump to pxt 5.28.8 * 2.1.20 * bump pxt 5.28.9 (#2504) * 2.1.21 * bump pxt 5.28.10 * 2.1.22 * bump pxt 5.28.11 * 2.1.23 * bump pxt 5.28.12 * 2.1.24 * Update README.md * robot unicorn (#2512) * robot unicorn * Edits to the unicorn * fix missing radio and boardname * bump pxt 5.28.18 (#2517) * bump pxt 5.28.18 * updated summary * 2.1.25 * bump pxt 5.28.21 * 2.1.26 * bump to pxt5.28.23 * 2.1.27 * Add redirect to pins info to serial heading (#2520) * Add redirect to pins info to serial heading * adding links * vump to pxt 5.28.24 * 2.1.28 * bump to pxt 5.28.26 * 2.1.29 * add build instructions * updated build notes * bump pxt 5.28.27 * 2.1.30 * missing svg * remove crowdin project to disable upload from master branch * reeanble crowdin, no upload * 2.1.31 * bump pxt common to 6.16.25 * missing radio package * Fix GC heap reclamation (#2528) * bump to pxt 5.28.31 * bump pxt 5.28.32 * 2.1.32 * 2.1.33 * fix typo * pxt-microbit-next? (#2543) Since the repo https://github.com/microsoft/pxt-microbit-next doesn't exist, I am assuming that the word `next` is not meant to be here. * Extensions: Add Inksmith Climate Action Kit (#2535) * Fixes for typos found in Crowdin - 11252019 (#2538) * Extension: add Kitronik Halo HD (#2541) * Extension: Add EBOTICS MIBO (#2542) * add Bright Wearables Brightboard (#2537) * Docs: Change default value in Javascript. (#2540) * Change default value in Javascript. Per @microbit-mark 's suggestion, add an example of how to change the default interval value by switching to Javascript. * edits to new example * bump pxt 5.30.6 * 2.1.34 * update git and vscode settings * revert changes to 2.1.28 * package-lock * v2.1.34 * Change Hero Image * add RVR (#2516) * Extension: add minicruise (#2545) * Fix minutes display for 'Digital Watch' project (#2547) * Fix minutes display for 'Digital Watch' project * minutes less than 10 * bump pxt * 2.1.35 * updated pxt * 2.1.36 * package lock * Tutorial Typo Fix * bumppxt * 2.1.37 * update error guide link (#2554) * adding radio firefly (#2549) * Update 'Metal Detector' example (#2559) * bump pxt * 2.1.38 * typoFix * Update Pins * Add C7, C8 and C9 Serial Pins * Add C7, C8 and C9 Serial Pins * Pins update * Add maqueen (#2560) * Extensions: Add DFRobot Maqueen * fix * revert pin C7, C8 and C9 * add extension doc file * revert pxt bump * Docs: Extensions remove headliner * Remove outdated #ifdef (#2564) * Extensions: add servobit (#2557) Co-authored-by: Abhijith Chatra <abchatra@microsoft.com> * bump to pxt 5.31.8, common 6.18.2 * 2.1.39 Co-authored-by: Joey Wunderlich <jwunderl@users.noreply.github.com> Co-authored-by: Richard Knoll <riknoll@users.noreply.github.com> Co-authored-by: Peli de Halleux <pelikhan@users.noreply.github.com> Co-authored-by: Abhijith Chatra <abchatra@microsoft.com> Co-authored-by: kimprice <kimberlymprice@ufl.edu> Co-authored-by: Galen Nickel <v-gani@microsoft.com> Co-authored-by: Chase Mortensen <C_Mortensen@live.com> Co-authored-by: Mark <mark@microbit.org> Co-authored-by: shakao <34112083+shakao@users.noreply.github.com> Co-authored-by: Danny Yates <danny@codeaholics.org> Co-authored-by: Sam Kent <32453267+microbit-sam@users.noreply.github.com> Co-authored-by: Michał Moskal <michal@moskal.me> Co-authored-by: Daryl Zuniga <Daryl.Zuniga@gmail.com> Co-authored-by: Eric Kimsey <ekimsey@users.noreply.github.com> Co-authored-by: Peter Brodersen <peter@ter.dk> Co-authored-by: Leo <leo881003@gmail.com> Co-authored-by: Asher Kach <asher.kach@gmail.com> Co-authored-by: Franklin Tse <FranklinWhale@users.noreply.github.com> Co-authored-by: Neal McBurnett <nealmcb@gmail.com> Co-authored-by: Kitronik Ltd <design@kitronik.co.uk> Co-authored-by: Helen Leigh <48659173+helenleigh@users.noreply.github.com> Co-authored-by: Gerard Braad <me@gbraad.nl> Co-authored-by: Nicole Parrot <cleoqc1124@gmail.com>
570 lines
18 KiB
TypeScript
570 lines
18 KiB
TypeScript
// Auto-generated. Do not edit.
|
|
|
|
|
|
declare const enum NumberFormat {
|
|
Int8LE = 1,
|
|
UInt8LE = 2,
|
|
Int16LE = 3,
|
|
UInt16LE = 4,
|
|
Int32LE = 5,
|
|
Int8BE = 6,
|
|
UInt8BE = 7,
|
|
Int16BE = 8,
|
|
UInt16BE = 9,
|
|
Int32BE = 10,
|
|
|
|
UInt32LE = 11,
|
|
UInt32BE = 12,
|
|
Float32LE = 13,
|
|
Float64LE = 14,
|
|
Float32BE = 15,
|
|
Float64BE = 16,
|
|
}
|
|
|
|
|
|
declare const enum PerfCounters {
|
|
GC = 0,
|
|
}
|
|
declare namespace images {
|
|
}
|
|
declare namespace basic {
|
|
}
|
|
|
|
|
|
declare const enum Button {
|
|
A = 1, // MICROBIT_ID_BUTTON_A
|
|
B = 2, // MICROBIT_ID_BUTTON_B
|
|
//% block="A+B"
|
|
AB = 26, // MICROBIT_ID_BUTTON_AB
|
|
}
|
|
|
|
|
|
declare const enum Dimension {
|
|
//% block=x
|
|
X = 0,
|
|
//% block=y
|
|
Y = 1,
|
|
//% block=z
|
|
Z = 2,
|
|
//% block=strength
|
|
Strength = 3,
|
|
}
|
|
|
|
|
|
declare const enum Rotation {
|
|
//% block=pitch
|
|
Pitch = 0,
|
|
//% block=roll
|
|
Roll = 1,
|
|
}
|
|
|
|
|
|
declare const enum TouchPin {
|
|
P0 = 19, // MICROBIT_ID_IO_P12
|
|
P1 = 7, // MICROBIT_ID_IO_P0
|
|
P2 = 8, // MICROBIT_ID_IO_P1
|
|
P3 = 23, // MICROBIT_ID_IO_P16
|
|
}
|
|
|
|
|
|
declare const enum AcceleratorRange {
|
|
/**
|
|
* The accelerator measures forces up to 1 gravity
|
|
*/
|
|
//% block="1g"
|
|
OneG = 1,
|
|
/**
|
|
* The accelerator measures forces up to 2 gravity
|
|
*/
|
|
//% block="2g"
|
|
TwoG = 2,
|
|
/**
|
|
* The accelerator measures forces up to 4 gravity
|
|
*/
|
|
//% block="4g"
|
|
FourG = 4,
|
|
/**
|
|
* The accelerator measures forces up to 8 gravity
|
|
*/
|
|
//% block="8g"
|
|
EightG = 8,
|
|
}
|
|
|
|
|
|
declare const enum Gesture {
|
|
/**
|
|
* Raised when shaken
|
|
*/
|
|
//% block=shake
|
|
//% jres=gestures.shake
|
|
Shake = 11, // MICROBIT_ACCELEROMETER_EVT_SHAKE
|
|
/**
|
|
* Raised when the logo is upward and the screen is vertical
|
|
*/
|
|
//% block="logo up"
|
|
//% jres=gestures.tiltforward
|
|
LogoUp = 1, // MICROBIT_ACCELEROMETER_EVT_TILT_UP
|
|
/**
|
|
* Raised when the logo is downward and the screen is vertical
|
|
*/
|
|
//% block="logo down"
|
|
//% jres=gestures.tiltbackwards
|
|
LogoDown = 2, // MICROBIT_ACCELEROMETER_EVT_TILT_DOWN
|
|
/**
|
|
* Raised when the screen is pointing down and the board is horizontal
|
|
*/
|
|
//% block="screen up"
|
|
//% jres=gestures.frontsideup
|
|
ScreenUp = 5, // MICROBIT_ACCELEROMETER_EVT_FACE_UP
|
|
/**
|
|
* Raised when the screen is pointing up and the board is horizontal
|
|
*/
|
|
//% block="screen down"
|
|
//% jres=gestures.backsideup
|
|
ScreenDown = 6, // MICROBIT_ACCELEROMETER_EVT_FACE_DOWN
|
|
/**
|
|
* Raised when the screen is pointing left
|
|
*/
|
|
//% block="tilt left"
|
|
//% jres=gestures.tiltleft
|
|
TiltLeft = 3, // MICROBIT_ACCELEROMETER_EVT_TILT_LEFT
|
|
/**
|
|
* Raised when the screen is pointing right
|
|
*/
|
|
//% block="tilt right"
|
|
//% jres=gestures.tiltright
|
|
TiltRight = 4, // MICROBIT_ACCELEROMETER_EVT_TILT_RIGHT
|
|
/**
|
|
* Raised when the board is falling!
|
|
*/
|
|
//% block="free fall"
|
|
//% jres=gestures.freefall
|
|
FreeFall = 7, // MICROBIT_ACCELEROMETER_EVT_FREEFALL
|
|
/**
|
|
* Raised when a 3G shock is detected
|
|
*/
|
|
//% block="3g"
|
|
//% jres=gestures.impact3g
|
|
ThreeG = 8, // MICROBIT_ACCELEROMETER_EVT_3G
|
|
/**
|
|
* Raised when a 6G shock is detected
|
|
*/
|
|
//% block="6g"
|
|
//% jres=gestures.impact6g
|
|
SixG = 9, // MICROBIT_ACCELEROMETER_EVT_6G
|
|
/**
|
|
* Raised when a 8G shock is detected
|
|
*/
|
|
//% block="8g"
|
|
//% jres=gestures.impact8g
|
|
EightG = 10, // MICROBIT_ACCELEROMETER_EVT_8G
|
|
}
|
|
|
|
|
|
declare const enum MesDpadButtonInfo {
|
|
//% block="A down"
|
|
ADown = 1, // MES_DPAD_BUTTON_A_DOWN
|
|
//% block="A up"
|
|
AUp = 2, // MES_DPAD_BUTTON_A_UP
|
|
//% block="B down"
|
|
BDown = 3, // MES_DPAD_BUTTON_B_DOWN
|
|
//% block="B up"
|
|
BUp = 4, // MES_DPAD_BUTTON_B_UP
|
|
//% block="C down"
|
|
CDown = 5, // MES_DPAD_BUTTON_C_DOWN
|
|
//% block="C up"
|
|
CUp = 6, // MES_DPAD_BUTTON_C_UP
|
|
//% block="D down"
|
|
DDown = 7, // MES_DPAD_BUTTON_D_DOWN
|
|
//% block="D up"
|
|
DUp = 8, // MES_DPAD_BUTTON_D_UP
|
|
//% block="1 down"
|
|
_1Down = 9, // MES_DPAD_BUTTON_1_DOWN
|
|
//% block="1 up"
|
|
_1Up = 10, // MES_DPAD_BUTTON_1_UP
|
|
//% block="2 down"
|
|
_2Down = 11, // MES_DPAD_BUTTON_2_DOWN
|
|
//% block="2 up"
|
|
_2Up = 12, // MES_DPAD_BUTTON_2_UP
|
|
//% block="3 down"
|
|
_3Down = 13, // MES_DPAD_BUTTON_3_DOWN
|
|
//% block="3 up"
|
|
_3Up = 14, // MES_DPAD_BUTTON_3_UP
|
|
//% block="4 down"
|
|
_4Down = 15, // MES_DPAD_BUTTON_4_DOWN
|
|
//% block="4 up"
|
|
_4Up = 16, // MES_DPAD_BUTTON_4_UP
|
|
}
|
|
declare namespace input {
|
|
}
|
|
|
|
|
|
/**
|
|
* How to create the event.
|
|
*/
|
|
|
|
declare const enum EventCreationMode {
|
|
/**
|
|
* MicroBitEvent is initialised, and no further processing takes place.
|
|
*/
|
|
CreateOnly = 0, // CREATE_ONLY
|
|
/**
|
|
* MicroBitEvent is initialised, and its event handlers are immediately fired (not suitable for use in interrupts!).
|
|
*/
|
|
CreateAndFire = 1, // CREATE_AND_FIRE
|
|
}
|
|
|
|
|
|
declare const enum EventBusSource {
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_BUTTON_A = 1, // MICROBIT_ID_BUTTON_A
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_BUTTON_B = 2, // MICROBIT_ID_BUTTON_B
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_BUTTON_AB = 26, // MICROBIT_ID_BUTTON_AB
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_RADIO = 29, // MICROBIT_ID_RADIO
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_GESTURE = 27, // MICROBIT_ID_GESTURE
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_ACCELEROMETER = 4, // MICROBIT_ID_ACCELEROMETER
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_IO_P0 = 7, // MICROBIT_ID_IO_P0
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_IO_P1 = 8, // MICROBIT_ID_IO_P1
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_IO_P2 = 9, // MICROBIT_ID_IO_P2
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_IO_P3 = 10, // MICROBIT_ID_IO_P3
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_IO_P4 = 11, // MICROBIT_ID_IO_P4
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_IO_P5 = 12, // MICROBIT_ID_IO_P5
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_IO_P6 = 13, // MICROBIT_ID_IO_P6
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_IO_P7 = 14, // MICROBIT_ID_IO_P7
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_IO_P8 = 15, // MICROBIT_ID_IO_P8
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_IO_P9 = 16, // MICROBIT_ID_IO_P9
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_IO_P10 = 17, // MICROBIT_ID_IO_P10
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_IO_P11 = 18, // MICROBIT_ID_IO_P11
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_IO_P12 = 19, // MICROBIT_ID_IO_P12
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_IO_P13 = 20, // MICROBIT_ID_IO_P13
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_IO_P14 = 21, // MICROBIT_ID_IO_P14
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_IO_P15 = 22, // MICROBIT_ID_IO_P15
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_IO_P16 = 23, // MICROBIT_ID_IO_P16
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_IO_P19 = 24, // MICROBIT_ID_IO_P19
|
|
//% blockIdentity="control.eventSourceId"
|
|
MICROBIT_ID_IO_P20 = 25, // MICROBIT_ID_IO_P20
|
|
//% blockIdentity="control.eventSourceId"
|
|
MES_DEVICE_INFO_ID = 1103, // MES_DEVICE_INFO_ID
|
|
//% blockIdentity="control.eventSourceId"
|
|
MES_SIGNAL_STRENGTH_ID = 1101, // MES_SIGNAL_STRENGTH_ID
|
|
//% blockIdentity="control.eventSourceId"
|
|
MES_DPAD_CONTROLLER_ID = 1104, // MES_DPAD_CONTROLLER_ID
|
|
//% blockIdentity="control.eventSourceId"
|
|
MES_BROADCAST_GENERAL_ID = 2000, // MES_BROADCAST_GENERAL_ID
|
|
}
|
|
|
|
|
|
declare const enum EventBusValue {
|
|
//% blockIdentity="control.eventValueId"
|
|
MICROBIT_EVT_ANY = 0, // MICROBIT_EVT_ANY
|
|
//% blockIdentity="control.eventValueId"
|
|
MICROBIT_BUTTON_EVT_DOWN = 1, // MICROBIT_BUTTON_EVT_DOWN
|
|
//% blockIdentity="control.eventValueId"
|
|
MICROBIT_BUTTON_EVT_UP = 2, // MICROBIT_BUTTON_EVT_UP
|
|
//% blockIdentity="control.eventValueId"
|
|
MICROBIT_BUTTON_EVT_CLICK = 3, // MICROBIT_BUTTON_EVT_CLICK
|
|
//% blockIdentity="control.eventValueId"
|
|
MICROBIT_RADIO_EVT_DATAGRAM = 1, // MICROBIT_RADIO_EVT_DATAGRAM
|
|
//% blockIdentity="control.eventValueId"
|
|
MICROBIT_ACCELEROMETER_EVT_DATA_UPDATE = 1, // MICROBIT_ACCELEROMETER_EVT_DATA_UPDATE
|
|
//% blockIdentity="control.eventValueId"
|
|
MICROBIT_PIN_EVT_RISE = 2, // MICROBIT_PIN_EVT_RISE
|
|
//% blockIdentity="control.eventValueId"
|
|
MICROBIT_PIN_EVT_FALL = 3, // MICROBIT_PIN_EVT_FALL
|
|
//% blockIdentity="control.eventValueId"
|
|
MICROBIT_PIN_EVT_PULSE_HI = 4, // MICROBIT_PIN_EVT_PULSE_HI
|
|
//% blockIdentity="control.eventValueId"
|
|
MICROBIT_PIN_EVT_PULSE_LO = 5, // MICROBIT_PIN_EVT_PULSE_LO
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_ALERT_EVT_ALARM1 = 6, // MES_ALERT_EVT_ALARM1
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_ALERT_EVT_ALARM2 = 7, // MES_ALERT_EVT_ALARM2
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_ALERT_EVT_ALARM3 = 8, // MES_ALERT_EVT_ALARM3
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_ALERT_EVT_ALARM4 = 9, // MES_ALERT_EVT_ALARM4
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_ALERT_EVT_ALARM5 = 10, // MES_ALERT_EVT_ALARM5
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_ALERT_EVT_ALARM6 = 11, // MES_ALERT_EVT_ALARM6
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_ALERT_EVT_DISPLAY_TOAST = 1, // MES_ALERT_EVT_DISPLAY_TOAST
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_ALERT_EVT_FIND_MY_PHONE = 5, // MES_ALERT_EVT_FIND_MY_PHONE
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_ALERT_EVT_PLAY_RINGTONE = 4, // MES_ALERT_EVT_PLAY_RINGTONE
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_ALERT_EVT_PLAY_SOUND = 3, // MES_ALERT_EVT_PLAY_SOUND
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_ALERT_EVT_VIBRATE = 2, // MES_ALERT_EVT_VIBRATE
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_CAMERA_EVT_LAUNCH_PHOTO_MODE = 1, // MES_CAMERA_EVT_LAUNCH_PHOTO_MODE
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_CAMERA_EVT_LAUNCH_VIDEO_MODE = 2, // MES_CAMERA_EVT_LAUNCH_VIDEO_MODE
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_CAMERA_EVT_START_VIDEO_CAPTURE = 4, // MES_CAMERA_EVT_START_VIDEO_CAPTURE
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_CAMERA_EVT_STOP_PHOTO_MODE = 6, // MES_CAMERA_EVT_STOP_PHOTO_MODE
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_CAMERA_EVT_STOP_VIDEO_CAPTURE = 5, // MES_CAMERA_EVT_STOP_VIDEO_CAPTURE
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_CAMERA_EVT_STOP_VIDEO_MODE = 7, // MES_CAMERA_EVT_STOP_VIDEO_MODE
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_CAMERA_EVT_TAKE_PHOTO = 3, // MES_CAMERA_EVT_TAKE_PHOTO
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_CAMERA_EVT_TOGGLE_FRONT_REAR = 8, // MES_CAMERA_EVT_TOGGLE_FRONT_REAR
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DEVICE_DISPLAY_OFF = 5, // MES_DEVICE_DISPLAY_OFF
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DEVICE_DISPLAY_ON = 6, // MES_DEVICE_DISPLAY_ON
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DEVICE_GESTURE_DEVICE_SHAKEN = 4, // MES_DEVICE_GESTURE_DEVICE_SHAKEN
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DEVICE_INCOMING_CALL = 7, // MES_DEVICE_INCOMING_CALL
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DEVICE_INCOMING_MESSAGE = 8, // MES_DEVICE_INCOMING_MESSAGE
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DEVICE_ORIENTATION_LANDSCAPE = 1, // MES_DEVICE_ORIENTATION_LANDSCAPE
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DEVICE_ORIENTATION_PORTRAIT = 2, // MES_DEVICE_ORIENTATION_PORTRAIT
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DPAD_BUTTON_1_DOWN = 9, // MES_DPAD_BUTTON_1_DOWN
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DPAD_BUTTON_1_UP = 10, // MES_DPAD_BUTTON_1_UP
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DPAD_BUTTON_2_DOWN = 11, // MES_DPAD_BUTTON_2_DOWN
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DPAD_BUTTON_2_UP = 12, // MES_DPAD_BUTTON_2_UP
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DPAD_BUTTON_3_DOWN = 13, // MES_DPAD_BUTTON_3_DOWN
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DPAD_BUTTON_3_UP = 14, // MES_DPAD_BUTTON_3_UP
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DPAD_BUTTON_4_DOWN = 15, // MES_DPAD_BUTTON_4_DOWN
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DPAD_BUTTON_4_UP = 16, // MES_DPAD_BUTTON_4_UP
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DPAD_BUTTON_A_DOWN = 1, // MES_DPAD_BUTTON_A_DOWN
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DPAD_BUTTON_A_UP = 2, // MES_DPAD_BUTTON_A_UP
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DPAD_BUTTON_B_DOWN = 3, // MES_DPAD_BUTTON_B_DOWN
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DPAD_BUTTON_B_UP = 4, // MES_DPAD_BUTTON_B_UP
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DPAD_BUTTON_C_DOWN = 5, // MES_DPAD_BUTTON_C_DOWN
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DPAD_BUTTON_C_UP = 6, // MES_DPAD_BUTTON_C_UP
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DPAD_BUTTON_D_DOWN = 7, // MES_DPAD_BUTTON_D_DOWN
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_DPAD_BUTTON_D_UP = 8, // MES_DPAD_BUTTON_D_UP
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_REMOTE_CONTROL_EVT_FORWARD = 6, // MES_REMOTE_CONTROL_EVT_FORWARD
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_REMOTE_CONTROL_EVT_NEXTTRACK = 4, // MES_REMOTE_CONTROL_EVT_NEXTTRACK
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_REMOTE_CONTROL_EVT_PAUSE = 2, // MES_REMOTE_CONTROL_EVT_PAUSE
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_REMOTE_CONTROL_EVT_PLAY = 1, // MES_REMOTE_CONTROL_EVT_PLAY
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_REMOTE_CONTROL_EVT_PREVTRACK = 5, // MES_REMOTE_CONTROL_EVT_PREVTRACK
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_REMOTE_CONTROL_EVT_REWIND = 7, // MES_REMOTE_CONTROL_EVT_REWIND
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_REMOTE_CONTROL_EVT_STOP = 3, // MES_REMOTE_CONTROL_EVT_STOP
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_REMOTE_CONTROL_EVT_VOLUMEDOWN = 9, // MES_REMOTE_CONTROL_EVT_VOLUMEDOWN
|
|
//% blockIdentity="control.eventValueId"
|
|
MES_REMOTE_CONTROL_EVT_VOLUMEUP = 8, // MES_REMOTE_CONTROL_EVT_VOLUMEUP
|
|
}
|
|
|
|
|
|
declare const enum EventFlags {
|
|
//%
|
|
QueueIfBusy = 0x0010, // MESSAGE_BUS_LISTENER_QUEUE_IF_BUSY
|
|
//%
|
|
DropIfBusy = 0x0020, // MESSAGE_BUS_LISTENER_DROP_IF_BUSY
|
|
//%
|
|
Reentrant = 0x0008, // MESSAGE_BUS_LISTENER_REENTRANT
|
|
}
|
|
declare namespace control {
|
|
}
|
|
|
|
|
|
declare const enum DisplayMode {
|
|
//% block="black and white"
|
|
BlackAndWhite = 0, // DISPLAY_MODE_BLACK_AND_WHITE
|
|
//% blockHidden=true
|
|
BackAndWhite = 0, // DISPLAY_MODE_BLACK_AND_WHITE
|
|
//% block="greyscale"
|
|
Greyscale = 1, // DISPLAY_MODE_GREYSCALE
|
|
// TODO DISPLAY_MODE_BLACK_AND_WHITE_LIGHT_SENSE
|
|
}
|
|
declare namespace led {
|
|
}
|
|
|
|
|
|
declare const enum MotorCommand {
|
|
//% block=coast
|
|
Coast = 0,
|
|
//% block=break
|
|
Break = 1,
|
|
//% block=sleep
|
|
Sleep = 2,
|
|
}
|
|
|
|
|
|
declare const enum Motor {
|
|
A = 0,
|
|
B = 1,
|
|
//% block="A and B"
|
|
AB = 2,
|
|
}
|
|
declare namespace motors {
|
|
}
|
|
|
|
|
|
declare const enum DigitalPin {
|
|
P0 = 19, // MICROBIT_ID_IO_P12
|
|
P1 = 7, // MICROBIT_ID_IO_P0
|
|
P2 = 8, // MICROBIT_ID_IO_P1
|
|
P3 = 23, // MICROBIT_ID_IO_P16
|
|
C4 = 10, // MICROBIT_ID_IO_P3
|
|
C5 = 11, // MICROBIT_ID_IO_P4
|
|
C6 = 17, // MICROBIT_ID_IO_P10
|
|
C7 = 20, // MICROBIT_ID_IO_P13
|
|
C8 = 21, // MICROBIT_ID_IO_P14
|
|
C9 = 22, // MICROBIT_ID_IO_P15
|
|
C10 = 16, // MICROBIT_ID_IO_P9
|
|
C11 = 14, // MICROBIT_ID_IO_P7
|
|
C12 = 13, // MICROBIT_ID_IO_P6
|
|
C16 = 9, // MICROBIT_ID_IO_P2
|
|
C17 = 15, // MICROBIT_ID_IO_P8
|
|
C18 = 25, // MICROBIT_ID_IO_P20
|
|
C19 = 24, // MICROBIT_ID_IO_P19
|
|
}
|
|
|
|
|
|
declare const enum AnalogPin {
|
|
P1 = 7, // MICROBIT_ID_IO_P0
|
|
P2 = 8, // MICROBIT_ID_IO_P1
|
|
C4 = 10, // MICROBIT_ID_IO_P3
|
|
C5 = 11, // MICROBIT_ID_IO_P4
|
|
C6 = 17, // MICROBIT_ID_IO_P10
|
|
C16 = 9, // MICROBIT_ID_IO_P2
|
|
C17 = 15, // MICROBIT_ID_IO_P8
|
|
MIC = 50, // MICROBIT_ID_IO_P21
|
|
}
|
|
|
|
|
|
declare const enum PulseValue {
|
|
//% block=high
|
|
High = 4, // MICROBIT_PIN_EVT_PULSE_HI
|
|
//% block=low
|
|
Low = 5, // MICROBIT_PIN_EVT_PULSE_LO
|
|
}
|
|
|
|
|
|
declare const enum PinPullMode {
|
|
//% block="down"
|
|
PullDown = 0,
|
|
//% block="up"
|
|
PullUp = 1,
|
|
//% block="none"
|
|
PullNone = 2,
|
|
}
|
|
|
|
|
|
declare const enum PinEventType {
|
|
//% block="edge"
|
|
Edge = 1, // MICROBIT_PIN_EVENT_ON_EDGE
|
|
//% block="pulse"
|
|
Pulse = 2, // MICROBIT_PIN_EVENT_ON_PULSE
|
|
//% block="touch"
|
|
Touch = 3, // MICROBIT_PIN_EVENT_ON_TOUCH
|
|
//% block="none"
|
|
None = 0, // MICROBIT_PIN_EVENT_NONE
|
|
}
|
|
|
|
|
|
declare const enum SerialPin {
|
|
P0 = 19, // MICROBIT_ID_IO_P12
|
|
P1 = 7, // MICROBIT_ID_IO_P0
|
|
P2 = 8, // MICROBIT_ID_IO_P1
|
|
P3 = 23, // MICROBIT_ID_IO_P16
|
|
C16 = 9, // MICROBIT_ID_IO_P2
|
|
C17 = 15, // MICROBIT_ID_IO_P8
|
|
USB_TX = 1001,
|
|
USB_RX = 1002,
|
|
}
|
|
|
|
|
|
declare const enum BaudRate {
|
|
//% block=115200
|
|
BaudRate115200 = 115200,
|
|
//% block=57600
|
|
BaudRate57600 = 57600,
|
|
//% block=38400
|
|
BaudRate38400 = 38400,
|
|
//% block=31250
|
|
BaudRate31250 = 31250,
|
|
//% block=28800
|
|
BaudRate28800 = 28800,
|
|
//% block=19200
|
|
BaudRate19200 = 19200,
|
|
//% block=14400
|
|
BaudRate14400 = 14400,
|
|
//% block=9600
|
|
BaudRate9600 = 9600,
|
|
//% block=4800
|
|
BaudRate4800 = 4800,
|
|
//% block=2400
|
|
BaudRate2400 = 2400,
|
|
//% block=1200
|
|
BaudRate1200 = 1200,
|
|
}
|
|
|
|
|
|
declare const enum Delimiters {
|
|
//% block="new line"
|
|
NewLine = 1,
|
|
//% block=","
|
|
Comma = 2,
|
|
//% block="$"
|
|
Dollar = 3,
|
|
//% block=":"
|
|
Colon = 4,
|
|
//% block="."
|
|
Fullstop = 5,
|
|
//% block="#"
|
|
Hash = 6,
|
|
}
|
|
declare namespace serial {
|
|
}
|
|
|
|
// Auto-generated. Do not edit. Really.
|