In Chapter 4 we will focus on sending information from our Arduino to our computer while a sketch is running. We will also cover doing math with variables as well as begin learning how to control the flow of programs.
Work through the following:
Chapter 4 Assignment:
As you know (at least if you paid attention in math class) the hypotenuse must be the longest side of a right triangle. Write a sketch that will take two values for any two sides of a right triangle provided in variable declaration and will solve for the third side no matter which two were initially provided.
Your sketch must also check to see if person typing in the variable screwed up and declared a value for the hypotenuse that is shorter than one of the other sides.
For example, it should be able to check the following and tell us there is a problem and tell us what the problem is.
float a = 5; float b; float c = 3;