OpenAccelerator
Initializes the HiTechnic acceleration sensor, sets correct sensor mode
Contents
Syntax
OpenAccelerator(port)
OpenAccelerator(port, handle)
Description
OpenAccelerator(port) initializes the input mode of NXT accelerator sensor specified by the sensor port. The value port can be addressed by the symbolic constants SENSOR_1 , SENSOR_2, SENSOR_3 and SENSOR_4 analog to the labeling on the NXT Brick.
The last optional argument can be a valid NXT handle. If none is specified, the default handle will be used (call COM_SetDefaultNXT to set one).
Examples
OpenAccelerator(SENSOR_4); acc_Vector = GetAccelerator(SENSOR_4); CloseSensor(SENSOR_4);
See also
GetAccelerator, CloseSensor, COM_ReadI2C, NXT_LSGetStatus, NXT_LSRead,
Signature
- Author: Linus Atorf (see AUTHORS)
- Date: 2008/09/25
- Copyright: 2007-2010, RWTH Aachen University