basic motor block support

This commit is contained in:
Peli de Halleux
2016-10-11 22:58:53 -07:00
parent 5d8a1b69f6
commit dff4f3adb3
7 changed files with 76 additions and 1 deletions

16
libs/core/shims.d.ts vendored
View File

@ -508,6 +508,22 @@ declare namespace led {
//% parts="ledmatrix" shim=led::screenshot
function screenshot(): Image;
}
/**
* Blocks to control the onboard motors
*/
//% weight=30
declare namespace motors {
/**
* Controls the power sent to a single motor
* @param power %percent of power sent to the motor. Negative power goes backward. eg: 50
*/
//% blockId=motor_on block="motor on at %percent|%"
//% parts=dcmotor shim=motors::motorOn
function motorOn(power: number): void;
}
declare namespace pins {
/**