In "rec/robotino/api2/c/DigitalOutput.h" you can find functions for reading Robotino's bumper.
More...
#include "rec/robotino/api2/c/globals.h"
#include "rec/robotino/api2/c/Com.h"
Go to the source code of this file.
In "rec/robotino/api2/c/DigitalOutput.h" you can find functions for reading Robotino's bumper.
Use DigitalOutput_construct() to create a new digital output object. Associate the bumper object with a com object using DigitalOutput_setComId(). Use DigitalOutput_value() to read the digital output's state.
#define INVALID_DIGITALOUTPUTID -1 |
Invalid DigitalOutputId is -1
Construct an digital output object
- Parameters
-
- Returns
- Returns the ID of the newly constructed digital output object.
Destroy the digital output object assigned to id
- Parameters
-
id | The id of the digital output object to be destroyed |
- Returns
- Returns TRUE (1) on success. Returns FALSE (0) if the given DigitalOutputId is invalid.
Associated a digital output object with a communication interface, i.e. binding the digital output to a specific Robotino
- Returns
- Returns TRUE (1) on success. Returns FALSE (0) if the given DigitalOutputId or ComId is invalid.
DLLEXPORT BOOL DigitalOutput_setOutputNumber |
( |
DigitalOutputId |
id, |
|
|
unsigned int |
n |
|
) |
| |
Sets the number of this digital output device.
- Parameters
-
id | The id of the digital input object to be set |
n | The output number. Range [0 - numAnalogInputs()] |
- Returns
- Returns TRUE (1) on success otherwise FALSE (0)
Sets the value of this digital output device.
- Parameters
-
id | The id of the digital output object to be written |
on | Turn the output on or off |
- Returns
- Returns TRUE (1) on success otherwise FALSE (0)
DLLEXPORT unsigned int numDigitalOutputs |
( |
| ) |
|
- Returns
- Returns the number of digital outputs.