Usage of I2c on esp8266

hi
i have a esp8266 but i don't work with i2c.
i have to what do i?
Thanks alot

Is this a serious question? RTFM

A Beginner's Guide to the ESP8266

Pieter

Don't cross-post.
http://forum.arduino.cc/index.php?topic=506402.msg3453037#msg3453037
forum.arduino.cc/index.php?topic=506404.msg3453052#msg3453052

My problem is programming.Because I can not program it
The program error is as follows:
Arduino: 1.6.10 (Windows 10), Board: "Adafruit HUZZAH ESP8266, 80 MHz, 115200, 4M (3M SPIFFS)"

C:\Users\Hamidreza\Documents\Arduino\libraries\WireExt\WireExt.cpp:24:22: fatal error: avr/io.h: No such file or directory

#include <avr/io.h>

^

compilation terminated.

exit status 1
Error compiling for board Adafruit HUZZAH ESP8266.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

What is WireExt? Why are you trying to use an AVR-only library on an Xtensa processor?

Please read the forum rules, and post your code using [code][/code] tags. Also post a link to all libraries you are trying to use.

//for i2c
#include <Wire.h>
#include <WireExt.h>
//for eeprom
#include <EEPROM.h>

//for d6t
#define D6T_addr 0x0A
#define D6T_cmd 0x4C

//Condition variables

#define bet 1024
#define con 1

//variable

int rbuf[35];
float tdata[16];
boolean first    = true;
boolean secend    = true;
float a[16];
float b[16];
float d[16];
float c[48] ;
float e;
float n;
float s;
float t_PTAT;

void setup()
{
    Wire.setClockStretchLimit(1500);
    Wire.begin(4, 5);
    Serial.begin(115200);
    pinMode(12, OUTPUT);
    pinMode(13, OUTPUT);
  }

  void loop()
  {
    int i;
    int j;
    //Calculate the temperature
    Wire.beginTransmission(D6T_addr);
    Wire.write(D6T_cmd);
    Wire.endTransmission();
    if (WireExt.beginReception(D6T_addr) >= 0)
    {
      i = 0;
      for (i = 0; i < 35; i++) {
        rbuf[i] = WireExt.get_byte();
      }
      WireExt.endReception();
      t_PTAT = (rbuf[0] + (rbuf[1] << 8)) * 0.1;
      for (i = 0; i < 16; i++) {
        tdata[i] = (rbuf[(i * 2 + 2)] + (rbuf[(i * 2 + 3)] << 8)) * 0.1;
      }
    }
    //Calculation of reference temperature
    if (first)
    {
      for (j = 0; j < bet; j++)
      {
        for (i = 0; i < 16; i++)
        {
          b[i] += tdata[i];
        }
      }
      for (i = 0; i < 16; i++)
      {
        b[i] = (b[i]) / bet;
        EEPROM.put(i * 5, b[i] );
      }
      first = false;
    }

    //Calculate the reference condition

    if (secend)
    {
      for (i = 0; i < 16; i++)
      {
        EEPROM.get(i * 5, d[i]);
        c[(i * 3) + 1] = d[i];
      }
      secend = false;
    }
    for (i = 0; i < 16; i++)
    {
      s = abs( tdata[i] - c[(i * 3) + 1]);
      c[(i * 3)] = tdata[i];
      c[(i * 3) + 2] = s;
    }
    while (c[2] > con || c[5] > con || c[8] > con || c[11] > con || c[14] > con || c[17] > con || c[20] > con || c[23] > con || c[26] > con || c[29] > con || c[32] > con || c[35] > con || c[38] > con || c[41] > con || c[44] > con || c[47] > con)
    {
      digitalWrite(12, LOW);
      digitalWrite(13, HIGH);
      for (i = 0; i < 16; i++)
      {
        s = abs( tdata[i] - c[(i * 3) + 1]);
        c[(i * 3)] = tdata[i];
        c[(i * 3) + 2] = s;
      }
      if (c[2] < con && c[5] < con && c[8] < con && c[11] < con && c[14] < con && c[17] < con && c[20] < con && c[23] < con && c[26] < con && c[29] < con && c[32] < con && c[35] < con && c[38] < con && c[41] < con && c[44] < con && c[47] < con)
      {
        break;
      }
    }


    digitalWrite(12, HIGH);
    digitalWrite(13, LOW);

  }

that's my code

PieterP:
What is WireExt? Why are you trying to use an AVR-only library on an Xtensa processor?