Interface for the Blink Plug - see https://jeelabs.org/bp.
More...
#include <Ports.h>
|
| enum | {
ALL_OFF,
ON1,
OFF1,
ON2,
OFF2,
SOME_ON,
ALL_ON
} |
| | Enum containing shorthands for BlinkPlug button states.
|
| |
|
| static void | mode3 (uint8_t value) |
| | Set the pin mode of the I pin on all Ports. More...
|
| |
| static uint8_t | digiRead3 () |
| | Reads the value of the I pin on all Ports. More...
|
| |
| static void | digiWrite3 (uint8_t value) |
| | Writes the value of the I pin on all Ports. More...
|
| |
|
static void | anaWrite3 (uint8_t val) |
| | Writes a PWM value to the I pin of all Ports.
|
| |
| uint8_t | digiPin () const |
| |
| uint8_t | digiPin2 () const |
| |
| uint8_t | anaPin () const |
| |
| static uint8_t | digiPin3 () |
| |
| uint8_t | portNum |
| | The port number is a small integer mathing the hardware port used. More...
|
| |
Interface for the Blink Plug - see https://jeelabs.org/bp.
| BlinkPlug::BlinkPlug |
( |
byte |
port | ) |
|
|
inline |
Constructor for the BlinkPlug class.
- Parameters
-
| port | Portnumber the blinkplug is connected to. |
| byte BlinkPlug::buttonCheck |
( |
| ) |
|
Check the state of the buttons.
- Returns
- The corresponding enum state: ON1, OFF1, ON2, or OFF2.
| void BlinkPlug::ledOff |
( |
byte |
mask | ) |
|
Turn off the corresponding leds.
- Parameters
-
| mask | 0 for neither led, 1 for the first led, 2 for the second led or 3 for both leds. |
| void BlinkPlug::ledOn |
( |
byte |
mask | ) |
|
Turn on the corresponding leds.
- Parameters
-
| mask | 0 for neither led, 1 for the first led, 2 for the second led or 3 for both leds. |
| byte BlinkPlug::ledState |
( |
| ) |
const |
|
inline |
- Returns
- One byte containing the state of both leds.
| byte BlinkPlug::pushed |
( |
| ) |
|
| byte BlinkPlug::state |
( |
| ) |
|
Read entire BlinkPlug state.
- Returns
- One byte with the state of the leds on the 1st and 2nd least significant bits and the state of the buttons on the 3rd and 4th least significant bits.
The documentation for this class was generated from the following files: