| Type: | Name: | Description: |
| Internal: | |
|---|
| char | portname[6] | Holds COM port name used to connect. |
| unsigned char | mess[256] | Holds message sent to or recieved from NXT. |
| unsigned char | nxtname[15] | Holds name of the NXT. |
| unsigned char | btaddress[8] | Holds Buletooth adress. |
| int | i_ready | Not used? |
| int | NXT_stop | Not used? |
| int | NXT_error | Holds Error returned my NXT. |
| Motor: |
| int | NXT_motoron[3] | Holds Motor state (1 or 0). |
| double | NXT_motor_pos_raw[3] | Holds Motor tachometer position. |
| double | NXT_motor_pos_cum[3] | Holds Motor tachometer count since program start. |
| Sensor: |
| int | NXT_sensoron[4] | Holds Sensor state(1 or 0). |
| int | NXT_sensortype[4] | Holds new Sensor type. |
| int | i_sensortype[4] | Holds last set Sensor type. |
| int | NXT_sensormode[4] | Holds new Sensor mode. |
| int | i_sensormode[4] | Holds last set Sensor mode. |
| int | NXT_sensorvalraw[4] | Holds last Sensor reading. |
| int | NXT_sensorvalnorm[4] | Not implimented |
| Name: | Value: | Description: |
| Motor: |
| Motor Port: |
| PORT_A | 0 |   |
| PORT_B | 1 |   |
| PORT_C | 2 |   |
| Motor Mode: |
| RUN_IDLE | 0 | Sets operation to run, idle. |
| RUN_BRAKE | 1 | Sets operation to run, brake. |
| OFF_IDLE | 3 | Sets operation to off, idle. |
| Sensor: |
| Sensor Ports: |
| PORT_1 | 0 |   |
| PORT_2 | 1 |   |
| PORT_3 | 2 |   |
| PORT_4 | 3 |   |
| Sensor Types |
| TOUCH | 1 | Sets to Touch sensor. |
| TEMPERATURE | 2 | Sets to Temerature Sensor. |
| LIGHT_ACTIVE | 5 | Sets to Light Sensor in active mode(LED on). |
| LIGHT_INACTIVE | 6 | Sets to Light Sensor in inactive mode(LED off). |
| SOUND_DB | 7 | Sets to Sound Sensor in dB. |
| SOUND_DBA | 8 | Sets to Sound Sensor in dBa. |
| ULTRASONIC | 11 | Sets to Ultrasonic Sensor. |
| Sensor Mode: |
| RAWMODE | 0 |   |
| BOOLEANMODE | 50 |   |