Hello everybody. I'm trying to get my intellibrain bot to comunicate with arduino via I2C, but I get some errors which I don't know how to debug. Google doesn't help at all. Here is what I get on my display when I turn on the program:
"Code: 20&97b6
8d57 8d24 839d"
and after it shows that very shortly it turns the program off. It happens both when arduino is on and when it's off.
This is my code, I just changed some examples that came with the program, but the examples gave same or very simmilar errors too.
import com.ridgesoft.io.Display;
import com.ridgesoft.io.I2CMaster;
import com.ridgesoft.intellibrain.IntelliBrain;
import java.io.IOException;
public class IntelliBrainCompass{
private static final int COMPASS_ADDRESS = 0xc0;
public static void main(String args[]) {
try {
I2CMaster i2cMaster = IntelliBrain.getI2CMaster();
setMove(i2cMaster, COMPASS_ADDRESS, 600);
setMove(i2cMaster, COMPASS_ADDRESS, 600);
setMove(i2cMaster, COMPASS_ADDRESS, 1000);
Thread.sleep(1000);
}
catch (Throwable t) {
t.printStackTrace();
}
}
public static void setMove(I2CMaster i2cMaster,int adress, int position) throws IOException {
i2cMaster.transfer(adress, new byte[] {(byte)position,(byte)(position >> 8),(byte)(position >> 16),(byte)(position >> 24)},null);
}
}
Does anyone know what can I do to make the I2C comunication work?