I am attempting to use port 1 of a JeeNode to communicate with Adafruit's TCS34725 breakout board which has an I2C interface. There is a picture of the breakout board (showing the pins) here: http://learn.adafruit.com/adafruit-colo ... s/overview I have had this breakout board working successfully using an Arduino Uno.
As noted in the doc: "When used for I2C, DIO is used as SDA and AIO" as SCL http://jeelabs.net/pub/docs/jeelib/clas ... ml#details.
So I hook up the TCS34725 SDA to port 1's DIO and SCL to port 1's AIO.
I run this sketch:
--------------------
#include <JeeLib.h>
PortI2C myport (1);
DeviceI2C lightSensor(myport,0x26);
void setup() {
Serial.begin(57600);
Serial.println("\n[light sensor i2c test]");
bool bIsPresent = lightSensor.isPresent();
Serial.print("Is the i2c device reading as present? -->");
bIsPresent ? Serial.println("yes") : Serial.println("no");
}
void loop() {
}
--------------------
The result is:
---------------------
[light sensor i2c test]
Is the i2c device reading as present? -->no
---------------------
Any advice on getting this to work is appreciated.
thank you.
can't get i2c to work with Adafruit's TCS34725 breakout boar
-
- Posts: 5
- Joined: Sat Oct 12, 2013 4:49 pm
Re: can't get i2c to work with Adafruit's TCS34725 breakout
Did you connect 3.3v or 5v and GND to the TCS34725 so it has power?