Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9868 Discussions

Intel Curie i2c speed - Help needed

KSels
New Contributor II
1,006 Views

I got an arduino 101 and are trying to use an AM2315 on it.

But I dont get any data.

It looks like the i2c speed is wrong? Have anyone got the AM2315 to work on the Intel Curie chip?

Here is my test code.

# include

 

# define AM2315_I2CADDR 0x5C

 

# define AM2315_READREG 0x03

 

uint8_t reply[10];

 

 

void setup() {

 

Serial.begin(9600);

 

Wire.begin();

 

 

}

 

 

void loop() {

 

 

// Wake up the sensor

 

Wire.beginTransmission(AM2315_I2CADDR);

 

delay(2);

 

Wire.endTransmission();

 

 

// OK lets ready!

 

Wire.beginTransmission(AM2315_I2CADDR);

 

Wire.write(AM2315_READREG);

 

Wire.write(0x00); // start at address 0x0

 

Wire.write(4); // request 4 bytes data

 

Wire.endTransmission();

 

 

delay(10); // add delay between request and actual read!

 

 

Wire.requestFrom(AM2315_I2CADDR, 8);

 

for (uint8_t i=0; i<8; i++) {<p>  reply[i] = Wire.read();

 

Serial.println(reply[i], HEX);

 

}

 

 

delay(2000);

 

}

The code Works fine on the Arduino Mega 2560.

Tryed using "Wire.setClock(400000L);" but did not help

1 Reply
idata
Community Manager
96 Views

Hi KimLorentz,

Thank you for contacting us.

Unfortunately, we don't have the device you're using with the Arduino 101 so we can't test this ourselves.

Please consider that the Arduino 101 is supported by Arduino.cc, we recommend you to contact them here: https://www.arduino.cc/en/Main/ContactUs https://www.arduino.cc/en/Main/ContactUs . They will be able to provide a more accurate response to your question.

Regards,

 

-Sergio A

 

Reply