-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add temperatureConvertor class (#14)
* add temperatureConvertor class * add baroToSeaLevelC()
- Loading branch information
1 parent
c45965e
commit 40883a0
Showing
7 changed files
with
330 additions
and
18 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
// | ||
// FILE: temperatureConvertor.ino | ||
// AUTHOR: Rob Tillaart | ||
// PURPOSE: test | ||
// DATE: 2022-01-08 | ||
|
||
|
||
#include "temperature.h" | ||
|
||
temperatureConverter TC; | ||
|
||
void setup() | ||
{ | ||
Serial.begin(115200); | ||
while(!Serial); | ||
Serial.println(__FILE__); | ||
|
||
Serial.println(); | ||
|
||
for (int celsius = -20; celsius <= 125; celsius++) | ||
{ | ||
TC.setCelsius(celsius); | ||
float C = TC.getCelsius(); | ||
float K = TC.getKelvin(); | ||
float F = TC.getFahrenheit(); | ||
float De = TC.getDelisle(); | ||
float Re = TC.getReamur(); | ||
float Ra = TC.getRankine(); | ||
float Ne = TC.getNewton(); | ||
float Ro = TC.getRomer(); | ||
|
||
if (celsius % 20 == 0) | ||
{ | ||
Serial.println(); | ||
Serial.print("\t C \t K \t F \t\t De \t Re \t Ra \t\t Ne \t Ro \n"); | ||
} | ||
|
||
Serial.print("\t"); | ||
Serial.print(C); | ||
Serial.print("\t"); | ||
Serial.print(K); | ||
Serial.print("\t"); | ||
Serial.print(F); | ||
Serial.print("\t\t"); | ||
Serial.print(De); | ||
Serial.print("\t"); | ||
Serial.print(Re); | ||
Serial.print("\t"); | ||
Serial.print(Ra); | ||
Serial.print("\t\t"); | ||
Serial.print(Ne); | ||
Serial.print("\t"); | ||
Serial.print(Ro); | ||
Serial.print("\n"); | ||
} | ||
|
||
|
||
/* | ||
for (int celsius = 0; celsius <= 100; celsius += 100) | ||
{ | ||
TC.setCelsius(celsius); | ||
float C = TC.getCelsius(); | ||
float K = TC.getKelvin(); | ||
float F = TC.getFahrenheit(); | ||
float De = TC.getDelisle(); | ||
float Re = TC.getReamur(); | ||
float Ra = TC.getRankine(); | ||
float Ne = TC.getNewton(); | ||
float Ro = TC.getRomer(); | ||
|
||
if (celsius % 20 == 0) | ||
{ | ||
Serial.println(); | ||
Serial.print("\t C \t K \t F \t\t De \t Re \t Ra \t\t Ne \t Ro \n"); | ||
} | ||
|
||
Serial.print("\t"); | ||
Serial.print(C); | ||
Serial.print("\t"); | ||
Serial.print(K); | ||
Serial.print("\t"); | ||
Serial.print(F); | ||
Serial.print("\t\t"); | ||
Serial.print(De); | ||
Serial.print("\t"); | ||
Serial.print(Re); | ||
Serial.print("\t"); | ||
Serial.print(Ra); | ||
Serial.print("\t\t"); | ||
Serial.print(Ne); | ||
Serial.print("\t"); | ||
Serial.print(Ro); | ||
Serial.print("\n"); | ||
} | ||
*/ | ||
|
||
Serial.print("Done..."); | ||
} | ||
|
||
|
||
void loop() | ||
{ | ||
} | ||
|
||
|
||
// -- END OF FILE -- |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Syntax Colouring Map For temperature | ||
|
||
|
||
# Data types (KEYWORD1) | ||
temperatureConverter KEYWORD1 | ||
|
||
|
||
# Methods and Functions (KEYWORD2) | ||
Fahrenheit KEYWORD2 | ||
Celsius KEYWORD2 | ||
Kelvin KEYWORD2 | ||
dewPoint KEYWORD2 | ||
dewPointFast KEYWORD2 | ||
humidex KEYWORD2 | ||
heatIndex KEYWORD2 | ||
heatIndexC KEYWORD2 | ||
WindChill_F_mph KEYWORD2 | ||
WindChill_C_kmph KEYWORD2 | ||
WindChill_C_mps KEYWORD2 | ||
|
||
|
||
# temperatureConverter class | ||
setKelvin KEYWORD2 | ||
setCelsius KEYWORD2 | ||
setFahrenheit KEYWORD2 | ||
setReamur KEYWORD2 | ||
setRankine KEYWORD2 | ||
setDelisle KEYWORD2 | ||
setNewton KEYWORD2 | ||
setRomer KEYWORD2 | ||
|
||
getKelvin KEYWORD2 | ||
getCelsius KEYWORD2 | ||
getFahrenheit KEYWORD2 | ||
getReamur KEYWORD2 | ||
getRankine KEYWORD2 | ||
getDelisle KEYWORD2 | ||
getNewton KEYWORD2 | ||
getRomer KEYWORD2 | ||
|
||
|
||
# Constants (LITERAL1) | ||
|
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
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
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
Oops, something went wrong.