mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
0.1.2 SHT85
This commit is contained in:
parent
85fb107290
commit
eb5b781770
@ -158,7 +158,6 @@ See async example for usage
|
||||
- direct Fahrenheit formula
|
||||
|
||||
|
||||
|
||||
## Operation
|
||||
|
||||
See examples
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// FILE: SHT85.cpp
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.1.1
|
||||
// VERSION: 0.1.2
|
||||
// DATE: 2021-02-10
|
||||
// PURPOSE: Arduino library for the SHT85 temperature and humidity sensor
|
||||
// https://nl.rs-online.com/web/p/temperature-humidity-sensor-ics/1826530
|
||||
@ -11,6 +11,7 @@
|
||||
// HISTORY:
|
||||
// 0.1.0 2021-02-10 initial version
|
||||
// 0.1.1 2021-03-13 initial release
|
||||
// 0.1.2 2021-05-27 fix arduino-lint
|
||||
|
||||
|
||||
#include "SHT85.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// FILE: SHT85.h
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.1.1
|
||||
// VERSION: 0.1.2
|
||||
// DATE: 2021-02-10
|
||||
// PURPOSE: Arduino library for the SHT85 temperature and humidity sensor
|
||||
// https://nl.rs-online.com/web/p/temperature-humidity-sensor-ics/1826530
|
||||
@ -25,7 +25,7 @@
|
||||
#include "Wire.h"
|
||||
|
||||
|
||||
#define SHT85_LIB_VERSION "0.1.1"
|
||||
#define SHT85_LIB_VERSION (F("0.1.2"))
|
||||
|
||||
|
||||
// fields readStatus
|
||||
|
@ -24,6 +24,7 @@ uint32_t stop;
|
||||
|
||||
SHT85 sht;
|
||||
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(115200);
|
||||
@ -47,8 +48,10 @@ void setup()
|
||||
Serial.println("\ndone...");
|
||||
}
|
||||
|
||||
|
||||
void loop()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// -- END OF FILE --
|
||||
|
@ -24,6 +24,7 @@ uint32_t stop;
|
||||
|
||||
SHT85 sht;
|
||||
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(115200);
|
||||
@ -40,6 +41,7 @@ void setup()
|
||||
Serial.println();
|
||||
}
|
||||
|
||||
|
||||
void loop()
|
||||
{
|
||||
start = micros();
|
||||
@ -55,4 +57,5 @@ void loop()
|
||||
delay(100);
|
||||
}
|
||||
|
||||
|
||||
// -- END OF FILE --
|
||||
|
@ -26,6 +26,7 @@ uint32_t last = 0;
|
||||
|
||||
SHT85 sht;
|
||||
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(115200);
|
||||
@ -43,6 +44,7 @@ void setup()
|
||||
Serial.println("count\t time\t temp\t hum");
|
||||
}
|
||||
|
||||
|
||||
void loop()
|
||||
{
|
||||
start = micros();
|
||||
@ -64,4 +66,5 @@ void loop()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// -- END OF FILE --
|
||||
|
@ -3,6 +3,7 @@
|
||||
# Datatypes (KEYWORD1)
|
||||
SHT85 KEYWORD1
|
||||
|
||||
|
||||
# Methods and Functions (KEYWORD2)
|
||||
begin KEYWORD2
|
||||
read KEYWORD2
|
||||
@ -10,18 +11,23 @@ isConnected KEYWORD2
|
||||
readStatus KEYWORD2
|
||||
lastRead KEYWORD2
|
||||
reset KEYWORD2
|
||||
|
||||
setHeatTimeout KEYWORD2
|
||||
heatOn KEYWORD2
|
||||
heatOff KEYWORD2
|
||||
isHeaterOn KEYWORD2
|
||||
|
||||
getHumidity KEYWORD2
|
||||
getTemperature KEYWORD2
|
||||
|
||||
requestData KEYWORD2
|
||||
dataReady KEYWORD2
|
||||
readData KEYWORD2
|
||||
|
||||
|
||||
# Instances (KEYWORD2)
|
||||
|
||||
|
||||
# Constants (LITERAL1)
|
||||
SHT_LIB_VERSION LITERAL1
|
||||
SHT_STATUS_ALERT_PENDING LITERAL1
|
||||
|
@ -15,7 +15,8 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/RobTillaart/SHT85"
|
||||
},
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"license": "MIT",
|
||||
"frameworks": "arduino",
|
||||
"platforms": "*"
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
name=SHT85
|
||||
version=0.1.1
|
||||
version=0.1.2
|
||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
sentence=Arduino library for the SHT85 temperature and humidity sensor
|
||||
paragraph=Class for SHT85 Temperature Humidity Adafruit I2C
|
||||
category=Sensor
|
||||
category=Sensors
|
||||
url=https://github.com/RobTillaart/SHT85
|
||||
architectures=*
|
||||
includes=SHT85.h
|
||||
|
@ -29,6 +29,7 @@
|
||||
It appears that Wire.write does not fail without sensor...
|
||||
*/
|
||||
|
||||
|
||||
#include <ArduinoUnitTests.h>
|
||||
|
||||
#include "Arduino.h"
|
||||
@ -38,14 +39,17 @@ int expect; // TODO needed as there seems a problem with 8 bit comparisons (cha
|
||||
|
||||
uint32_t start, stop;
|
||||
|
||||
|
||||
unittest_setup()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
unittest_teardown()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
unittest(test_begin)
|
||||
{
|
||||
SHT85 sht;
|
||||
@ -65,6 +69,7 @@ unittest(test_begin)
|
||||
assertEqual(0, sht.getHumidity());
|
||||
}
|
||||
|
||||
|
||||
unittest(test_read)
|
||||
{
|
||||
SHT85 sht;
|
||||
@ -94,6 +99,7 @@ unittest(test_read)
|
||||
assertEqual(expect, sht.getError());
|
||||
}
|
||||
|
||||
|
||||
unittest(test_readStatus)
|
||||
{
|
||||
SHT85 sht;
|
||||
@ -105,6 +111,7 @@ unittest(test_readStatus)
|
||||
assertEqual(expect, sht.getError());
|
||||
}
|
||||
|
||||
|
||||
unittest(test_heater)
|
||||
{
|
||||
SHT85 sht;
|
||||
@ -124,6 +131,7 @@ unittest(test_heater)
|
||||
assertEqual(expect, sht.getError());
|
||||
}
|
||||
|
||||
|
||||
unittest(test_async)
|
||||
{
|
||||
SHT85 sht;
|
||||
@ -151,6 +159,8 @@ unittest(test_async)
|
||||
assertEqual(expect, sht.getError());
|
||||
}
|
||||
|
||||
|
||||
unittest_main()
|
||||
|
||||
|
||||
// --------
|
Loading…
x
Reference in New Issue
Block a user