public class RW_24LC16 {
// Create
an I2C bus object named i2cbus.
final public static int SDAPin = CPU.pin13;
final public static int SCLPin = CPU.pin14;
public static I2C i2cbus = new I2C(SDAPin, SCLPin);
// Create a
MC24LC32LibExample object named eeprom0
using the i2cbus object.
// Address chip :A2,A1,A0 -> 0
public static MC24LC32LibEx ee16 = new MC24LC32LibEx (i2cbus, 0);
// Declare
StringBuffer object and static
variables.
public static StringBuffer characters = new StringBuffer(128);
public static void main() {
int i, data;
int eeAddress = 0;