I just wrote some code to use an i2c temp sensor that doesn't work
#include <Wire.h>
int temp_address = 74;
void setup()
{
SerialUSB.begin();
Wire.begin();
}
void loop()
{
Wire.beginTransmission(temp_address);
Wire.send(0);
Wire.endTransmission();
Wire.requestFrom(temp_address, 1);
while(Wire.available() == 0);
int c = Wire.receive();
SerialUSB.println(c);
}
and i tested it with the arduino and it works. So what am i doing wrong?