~nxti2cdev/nxti2cdevice/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
I2C device API's

NXTServo:
~getBatteryVoltage()
     -Retrieves the battery voltage 
~storeInitial() 
     -Store the initial speed and position properties of a servo
~reset() 
     -Reset servo properties to factory default
~halfMacro() 
     -Re-initializes the macro enviornment
~resumeMacro() 
     -Resumes macro when it was paused in the same enviornment 
~gotoEEPROM() 
     -Re-initializes the macro enviornment
~editMacro() 
     -Edit macro
~pauseMacro() 
     -Pauses the macro, and saves for subsequent resumption
~setSpeed(uint8_t number, uint8_t speed) 
     -Set speed of servo 
	*number:Servo_1, 2, ..., 8 
	*speed [0, inf] or Servo_Speed_Full
~setPosition(uint8_t number, uint8_t position)
     -Set position of servo 
	*number:Servo_1, 2, ..., 8 
	*position [500, 2500] or Servo_Position_Default
~runServo(uint8_t number, uint8_t position, uint8_t speed)
     -Run a Servo to a certain position at a certain speed
	*number:Servo_1, 2, ..., 8 
	*speed [500, 2500] or Servo_Position_Default
	*position [500, 2500] or Servo_Position_Default


PFMate:
~issueCommand(char command)
~sendSignal()
~controlMotor(uint8_t channel, uint8_t contol, uint8_t operation, uint8_t speed)
   -Control the PF Motors
	*channel : PF_Channel_1, 2, 3, or 4
	*control : PF_Contol_Both, A, or B
	*operation : PF_Operation_Forward, Reverse, Float, or Brake
	*speed :  [1, 7] or PF_Speed_Full, Medium, or Slow
~setChannel(uint8_t channel)
~setControl(uint8_t contol)
~setOperationA(uint8_t operation)
~setOperationB(uint8_t operation)
~setSpeedA(uint8_t speed)
~setSpeedB(uint8_t speed)


NXTHID:
~transmitData()
     -Transmit data to hsot computer
~asciiMode()
     -Setup device for ascii data mode
~directMode()
     -Setup device for direct data mode   
~setModifier(uint8_t mod)
    -Setup the key modifier
	*HID_None, L_Ctrl, L_Shift ,  L_Alt, L_GUI, R_Ctrl, R_Shift, R_Alt, R_GUI,
~sendKeyboardData(uint8_t data)
    -Send specific key data


NXTMMX:
~getBatteryVoltage()
~issueCommand(char command)
~setEncoderTarget(uint8_t which_motor, long target)
~getEncoderTarget(uint8_t which_motor)
setSpeed(uint8_t which_motor, int speed)
~getSpeed(uint8_t which_motor)
~getTimeToRun(uint8_t which_motor, int seconds)
~getTimeToRun(uint8_t which_motor)
~setCommandRegB(uint8_t which_motor, uint8_t value)
~getCommandRegB(uint8_t which_motor)
~setCommandRegA(uint8_t which_motor, uint8_t value)
~getCommandRegA(uint8_t which_motor)
~getEncoderPosition(uint8_t which_motor)
~getMotorStatusByte(uint8_t which_motor)
~getMotorTasksRunningByte(uint8_t which_motor)
~setEncoderPID(uint16_t Kp, uint16_t Ki, uint16_t Kd)
~setSpeedPID(uint16_t Kp, uint16_t Ki, uint16_t Kd)
~setPassCount(uint8_t pass_count)
~setTolerance(uint8_t tolerance)
~reset()
~startMotorsInSync()
~resetEncoder(uint8_t which_motor)
~setSpeedTimeAndControl(uint8_t which_motors, int speed, uint8_t duration, uint8_t control)
setEncoderSpeedTimeAndControl(uint8_t  which_motors, long encoder, int speed, uint8_t duration, uint8_t control)
~isTimeDone(uint8_t which_motors)
~waitUntilTimeDone(uint8_t  which_motors)
~isTachoDone(uint8_t  which_motors)
~waitUntilTachoDone(uint8_t  which_motors)
~runUnlimited(uint8_t which_motors, uint8_t direction, int speed)
~runSeconds(uint8_t  which_motors, uint8_t direction, int speed, uint8_t duration, uint8_t wait_for_completion, uint8_t next_action)
~runTachometer(uint8_t which_motors, uint8_t direction, int speed, long tachometer, uint8_t relative, uint8_t wait_for_completion, uint8_t next_action)
~runDegrees(uint8_t which_motors, uint8_t direction,int speed, long degrees, uint8_t wait_for_completion, uint8_t  next_action)
~void runRotations(uint8_t  which_motors, uint8_t direction, int speed, long rotations, uint8_t wait_for_completion, uint8_t next_action)~stop(uint8_t which_motors, uint8_t next_action)

ACCLNx:
~issueCommand(char command)
~aquireXpointCalibration()
~aquireXpointCalibrationEnd()
~aquireYpointCalibration()
~aquireYpointCalibrationEnd()
~aquireZpointCalibration()
~aquireZpointCalibrationEnd()
~resetFactory()
~setApdaOn()
~setApdaOff()
~getXTilt()
~getYTilt()
~getZTilt()
~getXAccl()
~getYAccl()
~getZAccl()
~getSens()

DISTNx:
~issueCommand(char command)
~setModuleGP2D12()
~setModuleGP2D120()
~setModuleGP2Y0A21YK()
~setModuleGP2Y0A02YK()
~setModuleCustom()
~energized()
~deenergized()
~setApdaOn()
~setApdaOff()
~getDist()
~getVolt()
~getType()

PSPNx:	
~issueCommand(char command)
~energized()
~deenergized()
~setDigitalMode()
~setAnalogMode()
~setApdaOn()
~setApdaOff()
~getXLJoy()
~getYLJoy()
~getXRJoy()
~getYRJoy()
~getButtons(int *buttons1, int *buttons2);

LineLeader:
~issueCommand(char command)
~calibrateWhite()
~calibrateBlack()
~sleep()
~wakeUp()
~invertLineColorToWhite()
~resetColorInversion()
~takeSnapshot()
~configureUS()
~configureEurope()
~configureUniversal()
~getSetPoint()
~setSetPoint(uint8_t spoint)
~getKp()
~setKp(uint8_t kp)
~getKi()
~setKi(uint8_t ki);
~getKd()
~setKd(uint8_t kd)
~getKpFactor()
~setKpFactor(uint8_t kpfact)
~getKiFactor()
~setKiFactor(uint8_t kifact)
~getKdFactor()
~setKdFactor(uint8_t kdfact)
~getSteering()
~getAverage()
~getResult()
~getRawCalibrated()
~getRawUncalibrated()
~getWhiteLimit()
~getBlackLimit()
~getWhiteCalibration()
~getBlackCalibration()

NXTPowerMeter:
~issueCommand(char command)
~resetCounters()
~readPresentCurrent()
~readPresentVoltage()
~readCapacityUsed()
~readElapsedTime()

RTC:
~getSeconds()
~getMinutes()
~getHours()
~getDayWeek()
~getDayMonth()
~getMonth()
~getYear()

NXTCam:
~issueCommand(char command)
~sortSize()
~selectObjectMode()
~writeImageRegisters()
~disableTracking()
~enableTracking()
~getColorMap()
~illuminationOn()
~readImageRegisters()
~selectLineMode()
~adpaOn()
~adpaOff()
~pingCam()
~resetCam()
~sendColorMap()
~illuminationOff()
~sortColor()
~sortNone()
~camFirmware()
~getNumberObjects()
~getBlobs(int *nblobs, uint8_t *color, uint8_t *left, uint8_t *top, uint8_t *right, uint8_t *bottom)