Skip to content

Instantly share code, notes, and snippets.

@myarduinosale
Created January 27, 2023 08:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save myarduinosale/000dfe38b975943a4afa70512bf16d6d to your computer and use it in GitHub Desktop.
Save myarduinosale/000dfe38b975943a4afa70512bf16d6d to your computer and use it in GitHub Desktop.
M1505_Arduino
#include "Wire.h"
#include "SHT2x.h"
uint32_t start;
uint32_t stop;
SHT2x sht;
void setup()
{
Serial.begin(115200);
sht.begin();
uint8_t stat = sht.getStatus();
}
void loop()
{
start = micros();
sht.read();
stop = micros();
Serial.print("อุณหภูมิ :");
Serial.print("\t");
Serial.print(sht.getTemperature());
Serial.print("°C");
Serial.print(" ความชื้น :");
Serial.print("\t");
Serial.print(sht.getHumidity());
Serial.println("%");
Serial.println();
delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment