TCS230 how do you connect with the board of education!!!!
Gabo
Posts: 10
·Hi, I need help with the connection and using the TCS230 with the Boe-Bot board the education, i know there are codes and etc in the page of parralax, but i haven`t found really how you can connect the TCS230 with the DB Expander into the Board of Education. thanx
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (D Faust) : 10/8/2007 6:10:30 PM GMT
-Phil
·
In the docs for the DB-Expander, there's a diagram showing how to plug it into the wireless breadboard of the BOE and how to connect the power and ground leads. Each signal pin on the DB-Expander has a letter assigned to it. There are eight signal lines, so the letters range from A to H. In the doc for the TCS230-DB there's a chart that shows the correspondence between each of the TCS230-DB's signals and the letters on the DB-Expander. For example, to connect to the TCS230's output pin, you'd use pin C on the DB-Expander. Therefore you'd run a jumper wire from pin C to whichever BS2 pin (P0 - P15) you wanted to use to read the TCS230's output. To use the sample code posted in the docs, this would be P7. Likewise for S2 (E), S3 (F), and LED (D). These would connect to P1, P0, and P5, respectively, to use the sample code.
Please let me know if this helped.
-Phil
Post Edited (Phil Pilgrim (PhiPi)) : 10/8/2007 6:00:00 PM GMT
Sorry, I missed the part about you already having the necessary parts.
EDIT: I wrote as Phil posted.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (D Faust) : 10/8/2007 6:09:49 PM GMT
'{$PBASIC 2.5}
'Define port pins
EN· CON
A0· CON
S0· CON· 3
S1· CON· 4
S2· CON· 7
S3· CON· 8
nLED· CON· 6
OUT· CON· 5
'Define count periods for each color.
'Adjust these for a reading just under 255
'· for a white sheet of paper.
pRED· CON· 12
pGREEN· CON· 8
pBLUE· CON· 6
-Phil
'Define port pins
S3 CON 8
S2 CON 7
Id CON ?
LED CON 6
Owio CON ?
Out CON 5
'Define variables for color results.
-Phil
name PIN # not
name CON #
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Phil