contributed by Spencer Kiser
This code reads color values from the Taos TCS230 color sensor and sends them out serially in ASCII-formatted values.

From the Datasheet for Module with Appmod Adapter


EN			CON			1
A0			CON			2
SO			CON			3
S1			CON			4
S2			CON			5
S3			CON			6
nLED			CON			7
OUT			CON			8

pRED			CON			12
pGREEN		        CON			6
pBLUE			CON			5

RED			VAR			WORD
GREEN			VAR			WORD
BLUE			VAR			WORD

Start:		        LOW			A0
			HIGH			S0
			HIGH			S1
			LOW			nLED
			HIGH			EN

MainLp:		        GOSUB			Color
			DEBUG			"R", DEC3 RED
			DEBUG			" G", DEC3 GREEN
			DEBUG			" B", DEC3 BLUE
			DEBUG			CR
			GOTO			MainLp

Color:		        LOW			S2
			LOW			S3
			COUNT			OUT, pRED, RED
			HIGH			S3
			COUNT			OUT, pBLUE, BLUE
			HIGH			S2
			COUNT			OUT, pGREEN, GREEN
			RETURN

			END