Using the new Arduino IDE for ESP8266 and found bugs, report them here

Moderator: igrr

User avatar
By VasilijHCN
#13174 Compilation error.
C:\Users\IOT\Desktop\arduino-1.6.1\libraries\Esp8266EasyIoT\EEPROM.cpp:26:21: fatal error: c_types.h: No such file or directory
#include "c_types.h"
^
compilation terminated.
Error compiling.


When try compile this (code compiles in standard arduino ide)
This is easy iot temperature node.
Code: Select all /*
 V1.0 - first version
 
 Created by Igor Jarc <igor.jarc1@gmail.com>
 See http://iot-playground.com for details
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 version 2 as published by the Free Software Foundation.
 */

#include <Esp8266EasyIoT.h>
//#include <SoftwareSerial.h>
#include <OneWire.h>
#include <DallasTemperature.h>


#define CHILD_ID_TEMP 1
#define ONE_WIRE_BUS 2
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);



Esp8266EasyIoT esp;

//SoftwareSerial serialEsp(10, 11);


float lastTemp;

//Esp8266EasyIoTMsg msgHum(CHILD_ID_HUM, V_HUM);
Esp8266EasyIoTMsg msgTemp(CHILD_ID_TEMP, V_TEMP);


void setup()
{
 // serialEsp.begin(9600);
  Serial.begin(115200); 
  sensors.begin();

  Serial.println("EasyIoTEsp init");


  esp.begin(NULL, 3, &Serial);
  //esp.begin(NULL, &serialEsp);
 

  pinMode(13, OUTPUT);



//  Serial.println("present S_TEMP");
  esp.present(CHILD_ID_TEMP, S_TEMP);

}

void loop()

  while(!esp.process());

  delay(1000);

  while(!esp.process());
  sensors.requestTemperatures();
  float temperature = (sensors.getTempCByIndex(0));
  if (isnan(temperature)) {
    Serial.println("Failed reading temperature from DS18B20");
  }
  else if (temperature != lastTemp)
  {
    lastTemp = temperature;
    esp.send(msgTemp.set(temperature, 1));
    Serial.print("T: ");
    Serial.println(temperature);
  } 
}