Servo library support (#1343)

* ateempt at bringin servos

* basic plumbing

* avoid math map duplicate

* missing parts annontation

* pretify parts

* extend appcompat layer

* updated strings

* more compat layer

* annotations

* don't rely on webmidi

* updated pxt ref

* bump pxt

* adding whenUsed

* updated v1 readme

* more pins

* more pins

* compress the parts definition

* update common packages
This commit is contained in:
Peli de Halleux
2018-10-05 11:09:08 -07:00
committed by GitHub
parent fd954ed6f8
commit 9002edbb22
15 changed files with 333 additions and 43 deletions

View File

@ -109,20 +109,31 @@
"Math.atan|param|x": "A number",
"Math.ceil": "Returns the smallest number greater than or equal to its numeric argument.",
"Math.ceil|param|x": "A numeric expression.",
"Math.constrain": "Constrains a number to be within a range",
"Math.cos": "Returns the cosine of a number.",
"Math.cos|param|x": "An angle in radians",
"Math.exp": "Returns returns ``e^x``.",
"Math.exp|param|x": "A number",
"Math.floor": "Returns the greatest number less than or equal to its numeric argument.",
"Math.floor|param|x": "A numeric expression.",
"Math.icos": "Returns the cosine of an input angle. This is an 8-bit approximation.",
"Math.icos|param|theta": "input angle from 0-255",
"Math.idiv": "Returns the value of integer signed 32 bit division of two numbers.",
"Math.idiv|param|x": "The first number",
"Math.idiv|param|y": "The second number",
"Math.imul": "Returns the value of integer signed 32 bit multiplication of two numbers.",
"Math.imul|param|x": "The first number",
"Math.imul|param|y": "The second number",
"Math.isin": "Returns the sine of an input angle. This is an 8-bit approximation.",
"Math.isin|param|theta": "input angle from 0-255",
"Math.log": "Returns the natural logarithm (base e) of a number.",
"Math.log|param|x": "A number",
"Math.map": "Re-maps a number from one range to another. That is, a value of ``from low`` would get mapped to ``to low``, a value of ``from high`` to ``to high``, values in-between to values in-between, etc.",
"Math.map|param|fromHigh": "the upper bound of the value's current range, eg: 1023",
"Math.map|param|fromLow": "the lower bound of the value's current range",
"Math.map|param|toHigh": "the upper bound of the value's target range, eg: 4",
"Math.map|param|toLow": "the lower bound of the value's target range",
"Math.map|param|value": "value to map in ranges",
"Math.max": "Returns the larger of two supplied numeric expressions.",
"Math.min": "Returns the smaller of two supplied numeric expressions.",
"Math.pow": "Returns the value of a base expression taken to a specified power.",
@ -402,6 +413,25 @@
"parseFloat": "Convert a string to a number.",
"parseInt": "Convert a string to an integer.",
"pins": "Control currents in Pins for analog/digital signals, servos, i2c, ...",
"pins.P0": "Pin P0",
"pins.P1": "Pin P1",
"pins.P10": "Pin P10",
"pins.P11": "Pin P3",
"pins.P12": "Pin P12",
"pins.P13": "Pin P13",
"pins.P14": "Pin P14",
"pins.P15": "Pin P15",
"pins.P16": "Pin P16",
"pins.P19": "Pin P19",
"pins.P2": "Pin P2",
"pins.P20": "Pin P19",
"pins.P3": "Pin P3",
"pins.P4": "Pin P4",
"pins.P5": "Pin P5",
"pins.P6": "Pin P6",
"pins.P7": "Pin P7",
"pins.P8": "Pin P8",
"pins.P9": "Pin P9",
"pins.analogPitch": "Emits a Pulse-width modulation (PWM) signal to the current pitch pin. Use `analog set pitch pin` to define the pitch pin.",
"pins.analogPitch|param|frequency": "frequency to modulate in Hz.",
"pins.analogPitch|param|ms": "duration of the pitch in milli seconds.",

View File

@ -143,6 +143,8 @@
"LedSpriteProperty.Direction|block": "direction",
"LedSpriteProperty.X|block": "x",
"LedSpriteProperty.Y|block": "y",
"Math.constrain|block": "constrain %value|between %low|and %high",
"Math.map|block": "map %value|from low %fromLow|high %fromHigh|to low %toLow|high %toHigh",
"Math.randomBoolean|block": "pick random true or false",
"Math.randomRange|block": "pick random %min|to %limit",
"Math|block": "Math",
@ -208,6 +210,10 @@
"Note.GSharp4|block": "G#4",
"Note.GSharp5|block": "G#5",
"Note.GSharp|block": "G#",
"PinEvent.Fall|block": "fall",
"PinEvent.PulseHigh|block": "pulse high",
"PinEvent.PulseLow|block": "pulse low",
"PinEvent.Rise|block": "rise",
"PinEventType.Edge|block": "edge",
"PinEventType.None|block": "none",
"PinEventType.Pulse|block": "pulse",
@ -349,6 +355,8 @@
"serial.writeString|block": "serial|write string %text",
"serial.writeValue|block": "serial|write value %name|= %value",
"serial|block": "serial",
"{id:category}AnalogInPin": "AnalogInPin",
"{id:category}AnalogOutPin": "AnalogOutPin",
"{id:category}Array": "Array",
"{id:category}Arrays": "Arrays",
"{id:category}Basic": "Basic",
@ -356,6 +364,7 @@
"{id:category}Buffer": "Buffer",
"{id:category}Console": "Console",
"{id:category}Control": "Control",
"{id:category}DigitalInOutPin": "DigitalInOutPin",
"{id:category}Game": "Game",
"{id:category}Helpers": "Helpers",
"{id:category}Image": "Image",
@ -363,9 +372,11 @@
"{id:category}Input": "Input",
"{id:category}Led": "Led",
"{id:category}Math": "Math",
"{id:category}MicrobitPin": "MicrobitPin",
"{id:category}Music": "Music",
"{id:category}Number": "Number",
"{id:category}Pins": "Pins",
"{id:category}PwmOnlyPin": "PwmOnlyPin",
"{id:category}Serial": "Serial",
"{id:category}String": "String",
"{id:category}Text": "Text"