You are reading a single comment by @fobus and its replies. Click here to read the full conversation.
  • Yes, I had many mistakes on code; Also I had misakes on wiring.

    Here is the correct one

    EEPROM VCC -> Board 5V
    EEPROM CSS -> Board Ground
    EEPROM SCL -> Board SCL (B10)
    EEPROM SDA -> Board SDA (B11)

    Also I have placed two 10k ohm resistors between VCC -> SCL and VCC ->SDA

    I2C2.setup({scl:B10,sda:B11});
    var eeprom=require("AT24").connect(I2C2, 8, 256, 0);
    console.log(eeprom.write(0x64,"Merhaba"));
    console.log(eeprom.read(0x64,7));
    
    

    line console.log(eeprom.write(0x64,"Merhaba")); outputs 7

    but console.log(eeprom.read(0x64,7)); delays 10-12 seconds and outputs this error;

    Uncaught InternalError: Timeout on I2C Read Receive Mode
     at line 2 col 2
    b)}
      ^
    in function "read" called from line 1 col 31
    console.log(eeprom.read(0x64,7));
    
About

Avatar for fobus @fobus started