Read Color Sensor Logic Analyzer Trace

The I2C traffic for the Read Color Sensor Example was captured on a logic analyzer. This trace can be downloaded and viewed with free software from www.saleae.com. This is the best way to analyze the data, as it allows you to zoom in/out and measure timing.

NOTE: This logic analyzer trace may not exactly match the current code in the example. Use at your own risk.

=ColorSensorInit= This configures the color sensor.

Turn Off the Color Sensor
On I2C, this is: W0x72, 0x80, 0x00

Turn On the Color Sensor
On I2C, this is W0x72, 0x80, 0x01

Set Integration Time
On I2C, this is: W0x72, 0x81, 0x01

Read ID Register
For example, in this part the ID Register is 0x11.

On I2C, this is W0x72, 0x84, [Repeated Start], R 0x73, 0x11

Turn on the ADC
Must be done after setting integration time, other ADC options.

On I2C, this is W0x72, 0x80, 0x03

=getColor= This process is repeated every few seconds.

Read RED Register
For example, red register value is 0x00F9.

On I2C, this is W0x72, 0xB2, [Repeated Start], R 0x73, 0xF9, 0x00

Read GREEN Register
For example, green register value is 0x00AD.

On I2C, this is W0x72, 0xB0, [Repeated Start], R 0x73, 0xAD, 0x00

Read BLUE Register
For example, blue register value is 0x007B.

On I2C, this is W0x72, 0xB4, [Repeated Start], R 0x73, 0x7B, 0x00

Read CLEAR Register
For example, clear register value is 0x0180.

On I2C, this is W0x72, 0xB6, [Repeated Start], R 0x73, 0x80, 0x01

