Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RobTillaart committed Dec 4, 2023
1 parent f79ca4a commit c79bcab
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- added **isConnected()**
- added asynchronous interface.
- rewrote the synchronous interface.
- add examples.

----

Expand Down
2 changes: 1 addition & 1 deletion examples/tinySHT2x_demo/tinySHT2x_demo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ void loop()
}


// -- END OF FILE --
// -- END OF FILE --

12 changes: 12 additions & 0 deletions examples/tinySHT2x_demo_async/.arduino-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
compile:
# Choosing to run compilation tests on 2 different Arduino platforms
platforms:
- uno
# - due
# - zero
- leonardo
# - m4
#- esp32
# - esp8266
- mega2560
# - trinket
38 changes: 38 additions & 0 deletions examples/tinySHT2x_demo_async/tinySHT2x_demo_async.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//
// FILE: tinySHT2x_demo_async.ino
// AUTHOR: Rob Tillaart
// PURPOSE: demo
// URL: https://github.com/RobTillaart/tinySHT2x


#include "Wire.h"
#include "tinySHT2x.h"

tinySHT2x sht;


void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);

Wire.begin();
sht.begin();
}


void loop()
{
sht.requestTemperature();
delay(65); // tune to work
Serial.print(sht.readTemperature());
Serial.print("\t");

sht.requestHumidity();
delay(28); // tune to work
Serial.println(sht.getHumidity());
delay(1000);
}


// -- END OF FILE --
12 changes: 12 additions & 0 deletions examples/tinySHT2x_demo_delay/.arduino-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
compile:
# Choosing to run compilation tests on 2 different Arduino platforms
platforms:
- uno
# - due
# - zero
- leonardo
# - m4
#- esp32
# - esp8266
- mega2560
# - trinket
33 changes: 33 additions & 0 deletions examples/tinySHT2x_demo_delay/tinySHT2x_demo_delay.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//
// FILE: tinySHT2x_demo_delay.ino
// AUTHOR: Rob Tillaart
// PURPOSE: demo
// URL: https://github.com/RobTillaart/tinySHT2x


#include "Wire.h"
#include "tinySHT2x.h"

tinySHT2x sht;


void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);

Wire.begin();
sht.begin();
}


void loop()
{
Serial.print(sht.getTemperature(65)); // adjust delay if needed
Serial.print("\t");
Serial.println(sht.getHumidity(28)); // adjust delay if needed
delay(1000);
}


// -- END OF FILE --

0 comments on commit c79bcab

Please sign in to comment.