Welcome to the EyeBot  Version 7 - RPi1
A Controller For Various Hardware IO
Functions | Variables
inout.h File Reference

Defines all the functions to connect to a serial USB/serial connection. More...

#include "serial.h"

Go to the source code of this file.

Functions

int DIGITALInit (void)
 Initialises connection to the IO board. More...
 
int DIGITALSetup (int io, char direction)
 Sets up the digital input/output pins. More...
 
int DIGITALRead (int io)
 Reads the digital input/output pins. More...
 
int DIGITALReadAll (void)
 Reads all digital pins. More...
 
int DIGITALWrite (int io, int state)
 Writes to the digital input/output pins. More...
 
int ANALOGRead (int channel)
 Reads the analog channel on the IO board. More...
 
int ANALOGVoltage (void)
 Finds the Analog Voltage as read from the IO board. More...
 
int IOBoardVer (char *version)
 Gives the version of the board. More...
 

Variables

int DIGITALInitialised
 

Detailed Description

Defines all the functions to connect to a serial USB/serial connection.

Author
Marcus Pham

Function Documentation

int ANALOGRead ( int  channel)

Reads the analog channel on the IO board.

Parameters
thechannel to read from
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
int DIGITALInit ( void  )

Initialises connection to the IO board.

Returns
0 on success, 1 on failure
int DIGITALRead ( int  io)

Reads the digital input/output pins.

Parameters
iothe 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
iothe 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
iothe 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,thestring to store the version string
Returns
0 on success, 1 on failure