Skip to content

Update DHT library dependency #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
libraries: |
# Install the library from the local path.
- source-path: ./
- name: DHT sensor library
- name: Grove Temperature And Humidity Sensor
- name: Grove-3-Axis-Digital-Accelerometer-2g-to-16g-LIS3DHTR
- name: Grove - Barometer Sensor BMP280
- name: U8g2
Expand Down
5 changes: 5 additions & 0 deletions examples/Temp_and_Humidity/Temp_and_Humidity.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
//#define DHTPIN 3 // By default its connected to pin D3, it can be changed, define it before the #include of the library
#include "Arduino_SensorKit.h"

//uncomment line below if using DHT20
//#define Environment Environment_I2C

void setup() {
//uncomment line below if using DHT20
//Wire.begin();
Serial.begin(9600);
Environment.begin();
}
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ category=Sensors
url=https://sensorkit.arduino.cc/
architectures=avr
precompiled=false
depends=DHT sensor library,Grove - Barometer Sensor BMP280,U8g2,Grove-3-Axis-Digital-Accelerometer-2g-to-16g-LIS3DHTR
depends=Grove Temperature And Humidity Sensor,Grove - Barometer Sensor BMP280,U8g2,Grove-3-Axis-Digital-Accelerometer-2g-to-16g-LIS3DHTR
5 changes: 3 additions & 2 deletions src/Arduino_SensorKit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

//Declare component's classes
U8X8_SSD1306_128X64_NONAME_SW_I2C Oled(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE);
DHT Environment(DHTPIN, DHTTYPE);
DHT Environment(DHTPIN,DHT11);
DHT Environment_I2C(DHT20);
SensorKit_LIS3DHTR Accelerometer;
SensorKit_BMP280 Pressure;
SensorKit_BMP280 Pressure;
7 changes: 2 additions & 5 deletions src/Arduino_SensorKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
#include "DHT.h" // Temp & Humidity
#include "U8x8lib.h" // OLED Display

//Defines
#ifndef DHTTYPE
#define DHTTYPE DHT11
#endif
#ifndef DHTPIN
#define DHTPIN 3
#endif
Expand All @@ -29,4 +25,5 @@ extern U8X8_SSD1306_128X64_NONAME_SW_I2C Oled;
extern SensorKit_LIS3DHTR Accelerometer;
extern SensorKit_BMP280 Pressure;
extern DHT Environment;
#endif
extern DHT Environment_I2C;
#endif