Hello I have looked and search the web and several forums but I have not found a place that says what variable types work in control structures. I am trying to use an if statement with a double type variable and it wont execute. I changed the variable to an int type and it worked fine. Do control structures only work with int type variables? I am trying to run a variable over all the possible variations and find the one that best fits what I need. The 'a' variable is the one that was a double and now I have made an int by changing it from a decimal to an integer. I just want to know.
void loop()
{
count = count + 1;
if (count == 100)
{
count = 0;
a = a + 1;
Serial.println("");
Serial.println("");
}
if (count == 99)
{
if (a == 99)
{
Serial.end();
}
}
Thank you. For some reason if you set a variable as a double type it will not look at it but if you set it as a float type it works just fine. Thanks again.