• With a pico and an esp8266 from kickstarter on an 24lc256 eeprom there is nothing failed.

    esp8266 is on version 1v94 and pico is on 1v95

     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v94 Copyright 2017 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    Flash map 512KB:256/256, manuf 0xc8 chip 0x4013
    >
    
    var eeprom;
    function dd() {
    //I2C2.setup( {scl: B10, sda: B3 } ); // pico
    //eeprom=require("AT24").connect(I2C2, 64, 256);
    
    I2C1.setup({scl:D2, sda:D0, bitrate:400000}); //esp8266
    eeprom=require("AT24").connect(I2C1, 64, 256);
    }
    
    setTimeout(function () {
      console.log("Hello World");
      dd();
    }, 1000);
    
    
    /* pico
    =undefined
    Hello World
    >eeprom.read(0,10)
    =new Uint8Array([0, 180, 196, 4, 111, 81, 16, 0, 28, 0])
    >                   ^
    >eeprom.write(0,[55,99])
    =2
    =undefined
    >eeprom.read(0,10)
    =new Uint8Array([55, 99, 196, 4, 111, 81, 16, 0, 28, 0])
    >
    */
    
    /* esp8266
    =undefined
    Hello World
    >eeprom.read(0,10)
    =new Uint8Array([55, 99, 196, 4, 111, 81, 16, 0, 28, 0])
    >
    =undefined
    >eeprom.write(0,[99,55])
    =2
    >eeprom.read(0,10)
    =new Uint8Array([99, 55, 196, 4, 111, 81, 16, 0, 28, 0])
    >
    */
    
    
    
About

Avatar for Frida @Frida started