|
| | Board (PApplet app, String portName, int baud) |
| |
| void | transmit (byte communicationType, byte deviceID, byte[] bData, float[] fData) |
| |
| float[] | receive (byte communicationType, byte deviceID, int expected) |
| |
| boolean | data_available () |
| |
◆ Board()
| Board.Board |
( |
PApplet |
app, |
|
|
String |
portName, |
|
|
int |
baud |
|
) |
| |
Constructs a Board linking to the specified serial port at the given serial data speed (baud rate)
- Parameters
-
| app | the parent Applet this class runs inside (this is your Processing sketch) |
| portname | serial port name that the hardware board is connected to (eg, "com10") |
| speed | the baud rate of serial data transfer |
◆ data_available()
| boolean Board.data_available |
( |
| ) |
|
- Returns
- a boolean indicating if data is available from the serial port
◆ receive()
| float [] Board.receive |
( |
byte |
communicationType, |
|
|
byte |
deviceID, |
|
|
int |
expected |
|
) |
| |
Receives data from the serial port and formats data to return a float data array
- Parameters
-
| type | type of communication taking place |
| deviceID | ID of the device receiving the information |
| expected | number for floating point numbers that are expected |
- Returns
- formatted float data array from the received data
◆ transmit()
| void Board.transmit |
( |
byte |
communicationType, |
|
|
byte |
deviceID, |
|
|
byte[] |
bData, |
|
|
float[] |
fData |
|
) |
| |
Formats and transmits data over the serial port
- Parameters
-
| communicationType | type of communication taking place |
| deviceID | ID of device transmitting the information |
| bData | byte inforamation to be transmitted |
| fData | float information to be transmitted |
The documentation for this class was generated from the following file: