UNPKG

pxt-common-packages

Version:
76 lines 6.11 kB
{ "AnalogInPin.analogRead": "Read the connector value as analog, that is, as a value comprised between 0 and 1023.", "AnalogOutPin.analogWrite": "Set the connector value as analog. Value must be comprised between 0 and 1023.", "AnalogOutPin.analogWrite|param|value": "value to write to the pin between ``0`` and ``1023``. eg:1023,0", "DigitalInOutPin.digitalRead": "Read a pin or connector as either 0 or 1", "DigitalInOutPin.digitalWrite": "Set a pin or connector value to either 0 or 1.", "DigitalInOutPin.digitalWrite|param|value": "value to set on the pin", "DigitalInOutPin.onEvent": "Register code to run when a pin event occurs.", "DigitalInOutPin.onPulsed": "Make this pin a digital input, and create events where the timestamp is the duration\nthat this pin was either ``high`` or ``low``.", "DigitalInOutPin.pulseIn": "Return the duration of a pulse in microseconds", "DigitalInOutPin.pulseIn|param|value": "the value of the pulse (default high)", "DigitalInOutPin.setPull": "Set the pull direction of this pin.", "DigitalInOutPin.setPull|param|pull": "one of the mbed pull configurations: PullUp, PullDown, PullNone", "I2C.readBuffer": "Read `size` bytes from a 7-bit I2C `address`.", "I2C.writeBuffer": "Write bytes to a 7-bit I2C `address`.", "PwmOnlyPin.analogSetPeriod": "Set the Pulse-width modulation (PWM) period of the analog output. The period is in\n**microseconds** or `1/1000` milliseconds.\nIf this pin is not configured as an analog output (using `analog write pin`), the operation has\nno effect.", "PwmOnlyPin.servoSetContinuous": "Indicates if the servo is running continuously", "PwmOnlyPin.servoSetPulse": "Set the pin for PWM analog output, make the period be 20 ms, and set the pulse width.\nThe pulse width is based on the value it is given **microseconds** or `1/1000` milliseconds.", "PwmOnlyPin.servoSetPulse|param|duration": "pulse duration in micro seconds, eg:1500", "PwmOnlyPin.servoWrite": "Write a value to the servo to control the rotation of the shaft. On a standard servo, this will\nset the angle of the shaft (in degrees), moving the shaft to that orientation. On a continuous\nrotation servo, this will set the speed of the servo (with ``0`` being full-speed in one\ndirection, ``180`` being full speed in the other, and a value near ``90`` being no movement).", "PwmOnlyPin.servoWrite|param|value": "angle or rotation speed", "SPI.setFrequency": "Sets the SPI clock frequency", "SPI.setMode": "Sets the SPI bus mode", "SPI.transfer": "Transfer buffers over the SPI bus", "SPI.write": "Write to the SPI bus", "control": "Program controls and events.", "control.Timer": "A timer", "control.Timer.millis": "Gets the elapsed time in millis since the last reset", "control.Timer.pauseUntil": "Pauses until the timer reaches the given amount of milliseconds", "control.Timer.pauseUntil|param|ms": "how long to pause for, eg: 5, 100, 200, 500, 1000, 2000", "control.Timer.reset": "Resets the timer", "control.Timer.seconds": "Gets the elapsed time in seconds since the last reset", "control.allocateNotifyEvent": "Allocates the next user notification event", "control.deviceDalVersion": "Determine the version of system software currently running.", "control.dmesg": "Write a message to DMESG debugging buffer.", "control.dmesgPtr": "Write a message and value (pointer) to DMESG debugging buffer.", "control.isUSBInitialized": "Determines if the USB has been enumerated.", "control.raiseEvent": "Announce that an event happened to registered handlers.", "control.raiseEvent|param|src": "ID of the MicroBit Component that generated the event", "control.raiseEvent|param|value": "Component specific code indicating the cause of the event.", "light.sendBuffer": "Send a programmable light buffer to the specified digital pin", "light.sendBuffer|param|buf": "The buffer to send to the pin", "light.sendBuffer|param|clk": "the clock line if any", "light.sendBuffer|param|data": "The pin that the lights are connected to", "light.sendBuffer|param|mode": "the color encoding mode", "pins": "Control currents in Pins for analog/digital signals, servos, i2c, ...", "pins.createBuffer": "Create a new zero-initialized buffer.", "pins.createBuffer|param|size": "number of bytes in the buffer", "pins.createI2C": "Opens a Serial communication driver", "pins.createSPI": "Opens a SPI driver", "pins.createSlaveSPI": "Opens a slave SPI driver", "pins.i2c": "Gets the default I2C bus", "pins.i2cReadBuffer": "Read `size` bytes from a 7-bit I2C `address`.", "pins.i2cReadNumber": "Read one number from an I2C address.", "pins.i2cReadRegister": "Read the value from a I2C register.", "pins.i2cReadRegister|param|address": "I2c address of the device", "pins.i2cReadRegister|param|register": "register index", "pins.i2cReadRegister|param|valueFormat": "format of the value, default is UInt8LE", "pins.i2cWriteBuffer": "Write bytes to a 7-bit I2C `address`.", "pins.i2cWriteNumber": "Write one number to an I2C address.", "pins.i2cWriteRegister": "Write a value in a I2C register.", "pins.i2cWriteRegister|param|address": "I2c address of the device", "pins.i2cWriteRegister|param|register": "register index", "pins.i2cWriteRegister|param|value": "value to write", "pins.i2cWriteRegister|param|valueFormat": "format of the value, default is UInt8LE", "pins.pinByCfg": "Get a pin by configuration id (DAL.CFG_PIN...)", "pins.pulseDuration": "Get the duration of the last pulse in microseconds. This function should be called from a\n``onPulsed`` handler.", "pins.spi": "Gets the default SPI driver", "pins.spiFrequency": "Set the SPI frequency", "pins.spiFrequency|param|frequency": "the clock frequency, eg: 1000000", "pins.spiMode": "Set the SPI signal mode", "pins.spiMode|param|mode": "the mode, eg: 3", "pins.spiTransfer": "Write a given command to SPI bus, and at the same time read the response.", "pins.spiWrite": "Write to the SPI slave and return the response", "pins.spiWrite|param|value": "Data to be sent to the SPI slave" }