Hi, I'm working on a project using an ESP32 which will log data from our greenhouse and display it via the web using Adafruit's IO. I've been able to get some test programs going with the ESP32 that exercise some sensors and have been able to upload and debug OTA. I ran into trouble building when I started experimenting with AdafruitIO. Sooooo, I decided to just use one of the examples in the Adafruit-IO-master library...the assumption being that the code should compile and work correctly. However, I got the same type of error I was getting in my code. It relates to unfound files detected during deep search for libraries. "The SoftwareSerial-master library encountered an unknown path resolve error.C*: 41:27: fatal error: avr/interrupt.h: No such file or directory". I previously got a similar error when building the example code regarding SoftwareSerial.h.....so I looked for the SoftwareSerial library on GitHub, loaded it, then got another avr header not found. I looked in my Arduino/libraries that got installed with the IDE and didn't see an avr library. I looked for the entire avr library on GitHub/web but didn't find anything. I reinstalled my arduino IDE just for kicks....no change. The code I'm trying to build is below and I've attached the compiler build/verbose as an attachment. Any help you can give is much appreciated. thanks....jim
// Adafruit IO Temperature & Humidity Example
// Tutorial Link:
https://learn.adafruit.com/adafruit-io-basics-temperature-and-humidity //
// Adafruit invests time and resources providing this open source code.
// Please support Adafruit and open source hardware by purchasing
// products from Adafruit!
//
// Written by Todd Treece for Adafruit Industries
// Copyright (c) 2016-2017 Adafruit Industries
// Licensed under the MIT license.
//
// All text above must be included in any redistribution.
/************************** Configuration ***********************************/
// edit the config.h tab and enter your Adafruit IO credentials
// and any additional configuration needed for WiFi, cellular,
// or ethernet clients.
#include <AdafruitIO_WiFi.h>
#include <AdafruitIO_Time.h>
#include <AdafruitIO_MQTT.h>
#include <AdafruitIO_Group.h>
#include <AdafruitIO_FONA.h>
#include <AdafruitIO_Feed.h>
#include <AdafruitIO_Ethernet.h>
#include <AdafruitIO_Definitions.h>
#include <AdafruitIO_Data.h>
#include <AdafruitIO_Dashboard.h>
#include <AdafruitIO.h>
#include "config.h"
/************************ Example Starts Here *******************************/
#include <Adafruit_Sensor.h>
#include <DHT.h>
#include <DHT_U.h>
// pin connected to DH22 data line
#define DATA_PIN 2
// create DHT22 instance
DHT_Unified dht(DATA_PIN, DHT22);
// set up the 'temperature' and 'humidity' feeds
AdafruitIO_Feed *temperature = io.feed("temperature");
AdafruitIO_Feed *humidity = io.feed("humidity");
void setup() {
// start the serial connection
Serial.begin(115200);
// wait for serial monitor to open
while(! Serial);
// initialize dht22
dht.begin();
// connect to io.adafruit.com
Serial.print("Connecting to Adafruit IO");
io.connect();
// wait for a connection
while(io.status() < AIO_CONNECTED) {
Serial.print(".");
delay(500);
}
// we are connected
Serial.println();
Serial.println(io.statusText());
}
void loop() {
// io.run(); is required for all sketches.
// it should always be present at the top of your loop
// function. it keeps the client connected to
// io.adafruit.com, and processes any incoming data.
io.run();
sensors_event_t event;
dht.temperature().getEvent(&event);
float celsius = event.temperature;
float fahrenheit = (celsius * 1.8) + 32;
Serial.print("celsius: ");
Serial.print(celsius);
Serial.println("C");
Serial.print("fahrenheit: ");
Serial.print(fahrenheit);
Serial.println("F");
// save fahrenheit (or celsius) to Adafruit IO
temperature->save(fahrenheit);
dht.humidity().getEvent(&event);
Serial.print("humidity: ");
Serial.print(event.relative_humidity);
Serial.println("%");
// save humidity to Adafruit IO
humidity->save(event.relative_humidity);
// wait 5 seconds (5000 milliseconds == 5 seconds)
delay(5000);
}