I am working on an assignment for an embedded software course, but I'm having the strangest problem.
Using the code below:
void decidePotato(float held)
{
printf("Deciding Potato, held for %f seconds \n", held);
if (held >= 1.99)
{
printf("Held for more than 1.99s \n", held);
returnPotato();
}
printf("I evaluated the if statement above \n");
}
I get the following output:
Deciding Potato, held for 0.010000 seconds
I dont even see the "I evaluated the if statement above" message, so the program somehow got stuck evaluating that if statement. And it remains stuck until I reprogram the board How is that even possible?