From d830b63ab1619289aa7668c5b3ff13330226216c Mon Sep 17 00:00:00 2001 From: Sam Groveman Date: Thu, 3 Apr 2025 01:15:06 -0400 Subject: [PATCH 1/4] Fixed includes --- src/DFRobot_EnvironmentalSensor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DFRobot_EnvironmentalSensor.h b/src/DFRobot_EnvironmentalSensor.h index ff60ffc..be93b9d 100644 --- a/src/DFRobot_EnvironmentalSensor.h +++ b/src/DFRobot_EnvironmentalSensor.h @@ -12,10 +12,10 @@ #ifndef DFROBOT_MULTIFUNCTIONAL_ENVIRONMENTAL_SENSOR_H #define DFROBOT_MULTIFUNCTIONAL_ENVIRONMENTAL_SENSOR_H +#pragma once #include "Arduino.h" #include "Wire.h" #include "DFRobot_RTU.h" -#include "String.h" #if (defined ARDUINO_AVR_UNO) && (defined ESP8266) #include "SoftwareSerial.h" From 581fe706c80128d2e3e982f8a7804fed6b198ce6 Mon Sep 17 00:00:00 2001 From: Sam Groveman Date: Thu, 3 Apr 2025 01:27:10 -0400 Subject: [PATCH 2/4] Made fixes specific to ESP devices only --- src/DFRobot_EnvironmentalSensor.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/DFRobot_EnvironmentalSensor.h b/src/DFRobot_EnvironmentalSensor.h index be93b9d..f4f6156 100644 --- a/src/DFRobot_EnvironmentalSensor.h +++ b/src/DFRobot_EnvironmentalSensor.h @@ -16,6 +16,9 @@ #include "Arduino.h" #include "Wire.h" #include "DFRobot_RTU.h" +#if !defined(ESP8266) && !defined(ESP32) +#include "String.h" +#endif #if (defined ARDUINO_AVR_UNO) && (defined ESP8266) #include "SoftwareSerial.h" From da411669db75cd705691e5e5fc09a3d4b572f9c4 Mon Sep 17 00:00:00 2001 From: Sam Groveman Date: Tue, 28 Oct 2025 13:08:37 -0400 Subject: [PATCH 3/4] Update LICENSE --- LICENSE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index 79f3100..ebec433 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ -Copyright 2010 DFRobot Co.Ltd +Copyright 2010 DFRobot Co.Ltd, additions copyright Sam Groveman, 2025 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From ab5776775b315745b96e23dc72364701371b24c2 Mon Sep 17 00:00:00 2001 From: Sam Groveman Date: Tue, 28 Oct 2025 13:09:38 -0400 Subject: [PATCH 4/4] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8547f1d..4426ca0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ DFRobot_EnvironmentalSensor =========================== +This has been modified to be compatible with ESP32 devices. + * [中文版](./README_CN.md) The multifunctional environmental sensor(SEN0500/SEN0501) integrates the UV, illumination, atmospheric pressure and temperature and humidity detection functions into one. It features Gravity and Breakout interfaces, and supports UART and I2C data communication, which can be selected by the onboard switch.