The Sample code for interfacing MAX7360 and micro controller using Arduino IDE is:
#include <Wire.h>
const int max7360 = 0x38;
int data = 0;
void setup() {
Serial.begin(9600);
Wire.begin();
Wire.beginTransmission(max7360);
Wire.write(0x01);
Wire.write(0x83);
Wire.endTransmission();
Wire.beginTransmission(max7360);
Wire.write(0x02);
Wire.write(0x1F);
Wire.endTransmission();
}
void loop() {
Wire.beginTransmission(max7360);
Wire.write(0x00);
Wire.endTransmission();
Wire.requestFrom(max7360, 1);
data = Wire.read();
if(data != 0x3F)
{
Serial.print("Key ");
Serial.println(data);
}
delay(50);
}