Temperature sensor senses and measures temperature, i.e. amount of heat energy generated by an object or a system. It allows us to detect any change in temperature.
Humidity is the amount of water present in air. The humidity sensor measures humidity of the given system. It is different from the moisture sensor. Moisture sensor measures amount of water in any solid or liquid and hence is used to measure moisture present in soil, etc. and not in air.
Download the Temperature_Humidity.zip file. Extract it into Documents-> Arduino-> libraries folder.
Now open Arduino IDE. Go to Files-> Examples-> Temperature_Humidity and open Temperature_Humidity_example code in IDE.
Now connect MYOSA motherboard to your computer. Go to Tools-> Board-> and choose Arduino/Genuino Mega or Mega 2560
Go to Tools-> port and choose COM on which board is connected.
Now upload your code to MYOSA motherboard by clicking upload button from toolbar.
open the Serial Monitor from Tools-> Serial Monitor
Now you can see the Temperature and Humidity values on Serial Monitor.
To initialize the accelerometer sensor:
th.begin();
Get values of Temperature and Humidity.Temperature is measured in Fahrenheit and Celcius units. Humidity is measured in percentage.
float tf = th.getTempF(); // Temperature in Fahrenheit
float tc = th.getTempC(); // Temperature in Celcius
float h = th.getHumidity(); // Humidity