Question by
KnightRiderGuy · Jan 08, 2016 at 07:41 PM ·
c#if-statementsdatavaluearduino
Do Something If Temperature Reading Changes
Ok I have this temperature sensor hooked up to the Arduino and reading in the temperature data. I'm wondering what the best way to go about having audio triggers for if the temperature does something like this example here.
char type = message[0];
string value = message.Substring(1);
switch (type)
{
case 'T':
//temperature sensor reading
TemperatureText.text = TempSensorData.ToString ();
TempSensorData = value;
//Do Something If Temperature Falls Below 0 Degrees C
//Do Something If Temperature Rises Above 90 Degrees C
break;
Comment