Pins
Control currents in Pins for analog/digital signals, servos, i2c, …
digital readpinP0
digitalReadPin
Read the specified pin or connector as either 0 or 1.
0digital writepinP0to
digitalWritePin
Set a pin or connector value to either 0 or 1.
analog readpinP0
analogReadPin
Read the connector value as analog, that is, as a value comprised between 0 and 1023.
1023analog writepinP0to
analogWritePin
Set the connector value as analog.
20000analog set periodpinP0to (µs)
analogSetPeriod
Configure the pulse-width modulation (PWM) period of the analog output in microseconds.
00102304mapfrom lowfrom highto lowto high
map
Map a number from one range to another.
onpinP0pulsedhigh
onPulsed
Configure the pin as a digital input and generate an event when the pin is pulsed either high or low.
pulse duration (µs)
pulseDuration
Get the duration of the last pulse in microseconds.
pulse in (µs)pinP0pulsedhigh
pulseIn
Return the duration of a pulse at a pin in microseconds.
set pullpinP0toup
setPull
Configure the pull directiion of of a pin.
00analog pitchfor (ms)
analogPitch
Emit a plse-width modulation (PWM) signal to the current pitch pin.
analog set pitch pinP0
analogSetPitchPin
Set the pin used when using analog pitch or music.
Servos
180servo writepinP0to
servoWritePin
Write a value to the servo, controlling the shaft accordingly.
1500servo set pulsepinP0to (µs)
servoSetPulse
Configure the IO pin as an analog/pwm output and set a pulse width.
I2C
0falsei2c read numberat addressof formatInt8LErepeated
i2cReadNumber
Read one number from 7-bit I2C address.
00falsei2c write numberat addresswith valueof formatInt8LErepeated
i2cWriteNumber
Write one number to a 7-bit I2C address.
SPI
0spi write
spiWrite
Write to the SPI slave and return the response.
1000000spi frequency
spiFrequency
Set the SPI frequency.
83spi formatbitsmode
spiFormat
Set the SPI bits and mode.
spi set pinsMOSIP0MISOP0SCKP0
spiPins
Set the MOSI, MISO, SCK pins used by the SPI connection.