Defines all the functions to connect to a serial USB/serial connection.
More...
Go to the source code of this file.
Defines all the functions to connect to a serial USB/serial connection.
- Author
- Marcus Pham
int ANALOGRead |
( |
int |
channel | ) |
|
Reads the analog channel on the IO board.
- Parameters
-
- Returns
- a hex value representing the analog value
int ANALOGVoltage |
( |
void |
| ) |
|
Finds the Analog Voltage as read from the IO board.
- Returns
- the voltage*100, on failure returns -1
Initialises connection to the IO board.
- Returns
- 0 on success, 1 on failure
int DIGITALRead |
( |
int |
io | ) |
|
Reads the digital input/output pins.
- Parameters
-
io | the pin to check status |
- Returns
- 0 on success, 1 on failure
int DIGITALReadAll |
( |
void |
| ) |
|
Reads all digital pins.
- Returns
- an integer representing the value current status of all pins MSB first
int DIGITALSetup |
( |
int |
io, |
|
|
char |
direction |
|
) |
| |
Sets up the digital input/output pins.
- Parameters
-
io | the pin to setup, direction UP/Down |
- Returns
- 0 on success, 1 on failure
int DIGITALWrite |
( |
int |
io, |
|
|
int |
state |
|
) |
| |
Writes to the digital input/output pins.
- Parameters
-
io | the pin to set, state the state of the pin |
- Returns
- 0 on success, 1 on failure
int IOBoardVer |
( |
char * |
version | ) |
|
Gives the version of the board.
- Parameters
-
version,the | string to store the version string |
- Returns
- 0 on success, 1 on failure