-
-
Save myarduinosale/000dfe38b975943a4afa70512bf16d6d to your computer and use it in GitHub Desktop.
M1505_Arduino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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