Home

Defines | Functions

dwengoSensorModule.h File Reference

Dwengo Robot Sensor board routines. More...

#include "dwengoBoard.h"

Defines

#define DIFF_MODE   0
#define AMBIENT_MODE   1
#define ACTIVE_MODE   2
#define OS1   0
#define OS2   1
#define OS3   2
#define OS4   3
#define OS5   4
#define OS6   5
#define OS7   6
#define OS8   9
#define D1   7
#define D2   8
#define LD1   0
#define LD2   1

Functions

void initSensorModule (void)
 Configures the Dwengo Robot Sensor board.
void setHeadlights (BYTE side, BYTE state)
 Turn the robot headlights on or off.
BYTE readSensor (BYTE sensor, BYTE modus)
 Read one of the sensors from the module.
void powerLongRange (BYTE state)
 Set the power of the long range distance sensor.

Detailed Description

Dwengo Robot Sensor board routines.

Library to control the Dwengo Robot Sensor board.


Function Documentation

void initSensorModule ( void  )

Configures the Dwengo Robot Sensor board.

Initialize the Dwengo Robot Sensor board

void powerLongRange ( BYTE  state)

Set the power of the long range distance sensor.

Parameters:
statecan be TRUE or FALSE wether you want the long range sensor to be powered or not. Can be used to improve battery life.
BYTE readSensor ( BYTE  sensor,
BYTE  modus 
)

Read one of the sensors from the module.

Returns value corresponding with the sensor

Parameters:
sensorChoose the sensor. Can be OSx, where x is the number of the sensor you want.
modusChoose the measuring modus. Can be: DIFF_MODE, AMBIENT_MODE or ACTIVE_MODE
void setHeadlights ( BYTE  side,
BYTE  state 
)

Turn the robot headlights on or off.

Parameters:
sideChoose the headlight LD1 (right) or LD2 (left)
stateTRUE turns on the LED; FALSE turns it off.
 All Data Structures Files Functions Variables Defines

Generated on Wed Dec 25 2013 23:03:08 for Dwengo library by doxygen 1.7.3