Master/Slave Navigation Controller Communication

I2C Register Description

Address / Register Name / Description
0x00 / STATUS_REG / Contains embedded controller status, such as data ready flag
0x01 / CTRL_REG / Reserved for future use, currently provides software reset bit
0x02 / FRONT_LEFT_SONAR / Distance value for front LEFT sonar distance sensor
0x03 / FRONT_CENTER_SONAR / Distance value for front center sonar sensor
0x04 / FRONT_RIGHT_SONAR / Distance value for front RIGHT sonar sensor
0x05 / REAR_CENTER_SONAR / Distance value for rear center sonar sensor
0x06 / GROUND_LEFT / Distance from front LEFT of robot chassis to ground
0x07 / GROUND_RIGHT / Distance from front RIGHT of robot chassis to ground
0x08 / ACCEL_X / X-Axis Acceleration
0x09 / ACCEL_Y / Y-Axis Acceleration
0x0A / ACCEL_Z / Z-Axis Acceleration
0x0B / GPS_LATT / GPS Latitude
0x0C / GPS_LONG / GPS Longitude
0x0D / GPS_SPEED / GPS Speed
0xFF / WHO_ARE_YOU / Test register. Always returns 0x55. Can be used by Master to check communication status and slave operability.

STATUS_REG: 0x00

NEW_DATA / SNSR_RDY / Reserved / Reserved

7 r 6 r 5 4 3 2 1 0

NEW_DATA – Indicates whether new sensor data is available from previous read or startup.

0: No new data present

1: New data is present in sensor registers

SNSR_RDY – Indicates whether the initialization process has completed and the sensors are functioning properly.

0: Sensors are not yet initialized.

1: Sensors are ready & sensor sampling is in progress.

Reserved: Reserved for future use, always read as 0.

CTRL_REG: 0x01

RESET / Reserved

7 w6 5 4 3 2 1 0

RESET – Set by master. Setting RESET forces embedded controller to reset itself and re-initialize. Read SNSR_RDY and NEW_DATA bits in STATUS_REG to determine when the system is ready. Bit automatically cleared after reset.

FRONT_LEFT_SONAR: 0x02

FRONT_LEFT_SONAR_DIST [7:0]

7 r 6 r 5 r 4 r 3r 2 r 1r 0 r

FRONT_LEFT_SONAR_DIST [7:0]: Indicates the distance from the robot to an object in front-left side sonar sensor’s field in inches. Minimum distance is 0 inches, maximum distance is 254 inches, which is the maximum range on the current sensors.

FRONT_CENTER_SONAR: 0x03

FRONT_CENTER_SONAR_DIST [7:0]

7 r 6 r 5 r 4 r 3r 2 r 1r 0 r

FRONT_CENTER_SONAR_DIST [7:0]: Indicates the distance from the robot to an object in front-center sonar sensor’s field in inches. Minimum distance is 0 inches, maximum distance is 254 inches, which is the maximum range on the current sensors.

FRONT_RIGHT_SONAR: 0x04

FRONT_RIGHT_SONAR_DIST [7:0]

7 r 6 r 5 r 4 r 3r 2 r 1r 0 r

FRONT_RIGHT_SONAR_DIST [7:0]: Indicates the distance from the robot to an object in front-right sensor’s field in inches. Minimum distance is 0 inches, maximum distance is 254 inches, which is the maximum range on the current sensors.

REAR_CENTER_SONAR: 0x05

REAR_CENTER_SONAR_DIST [7:0]

7 r 6 r 5 r 4 r 3r 2 r 1r 0 r

REAR_CENTER_SONAR_DIST [7:0]: Indicates the distance from the robot to an object in rear-center sonar sensor’s field in inches. Minimum distance is 0 inches, maximum distance is 254 inches, which is the maximum range on the current sensors.

GROUND_LEFT: 0x06

Reserved / GROUND_LEFT_DIST [4:0]

7 r 6 r 5 r 4 r 3r 2 r 1r 0 r

GROUND_LEFT_DIST [4:0]: Indicates the distance from the robot chassis to the ground (left-side) in inches. Useful for edge detection and detection of uneven terrain. Minimum distance is 4 inches, maximum is 16 inches.

Reserved: Reserved for future use, always read as 0.

GROUND_RIGHT: 0x07

Reserved / GROUND_RIGHT_DIST [4:0]

7 r 6 r 5 r 4 r 3r 2 r 1r 0 r

GROUND_RIGHT_DIST [4:0]: Indicates the distance from the robot chassis to the ground (right-side) in inches. Useful for edge detection and detection of uneven terrain. Minimum distance is 4 inches, maximum is 16.

Reserved: Reserved for future use, always read as 0.

ACCEL_X: 0x08

ACCEL_X [7:0]

7 r 6 r 5 r 4 r 3r 2 r 1r 0 r

ACCEL_X [7:0]: Indicates acceleration of the robot in the x-axis. Represented as a 2’s complement signed byte. The range is 2g, thus the resolution is 15.6mg.

ACCEL_Y: 0x09

ACCEL_Y [7:0]

7 r 6 r 5 r 4 r 3r 2 r 1r 0 r

ACCEL_Y [7:0]: Indicates acceleration of the robot in the y-axis. Represented as a 2’s complement signed byte. The range is 2g, thus the resolution is 15.6mg.

ACCEL_Z: 0x0A

ACCEL_Z [7:0]

7 r 6 r 5 r 4 r 3r 2 r 1r 0 r

ACCEL_Z [7:0]: Indicates acceleration of the robot in the z-axis. Represented as a 2’s complement signed byte. The range is 2g, thus the resolution is 15.6mg.

GPS_LATT: 0x0B

GPS_LATT: GPS Latitude returned as an 11-byte serial string. An example is shown below:

“04807.038,N” Latitude 48 deg 07.038' North

GPS_LONG: 0x0C

GPS_LONG: GPS Longitude returned as an 11-byte serial string. An example is shown below:

“01131.000,E” Longitude 11 deg 31.000' East

GPS_SPEED: 0x0D

GPS_SPEED: GPS Speed returned as an 5-byte serial string. Value is returned as speed over the ground in knots. An example is shown below:

“022.4”22.4 Knots