Methods
analogRead(pin)
Get the analog value of the given pin.
Parameters:
Name | Type | Description |
---|---|---|
pin |
Pin | The pin to use |
analogWrite(pin, value, options)
Set the analog Value of a pin. It will be output using PWM.
Parameters:
Name | Type | Description |
---|---|---|
pin |
Pin | The pin to use |
value |
float | A value between 0 and 1 |
options |
Object | An object containing options for analog output |
digitalPulse(pin, value, time)
Pulse the pin with the value for the given time in milliseconds.
Parameters:
Name | Type | Description |
---|---|---|
pin |
Pin | The pin to use |
value |
mixed | Whether to set output high (true/1) or low (false/0) |
time |
float | A time in milliseconds |
Throws:
"Not implemented"
digitalRead(pin) → {boolean}
Get the digital value of the given pin.
Parameters:
Name | Type | Description |
---|---|---|
pin |
Pin | The pin to use |
Returns:
The digital Value of the Pin
- Type
- boolean
digitalWrite(pin) → {boolean}
Get the digital value of the given pin.
Parameters:
Name | Type | Description |
---|---|---|
pin |
Pin | The pin to use |
Returns:
The digital Value of the Pin
- Type
- boolean
getPinMode(pin) → {string}
Returns the current mode of the given pin.
Parameters:
Name | Type | Description |
---|---|---|
pin |
Pin | The pin to check |
Returns:
The pin mode, as a string
- Type
- string
pinMode(pin, mode)
Set the mode of the given pin.
Parameters:
Name | Type | Description |
---|---|---|
pin |
Pin | The pin to set pin mode for |
mode |
string | The mode |