How to Arduino
View
Options
Preview new Authoring Experience
History
1
2
3
4
5
6
7
8
9
Introduction
Details
Guide Steps
Review
Quiz
Ranges help to eliminate junk data that sometimes shows up on the screen. Overall, it makes the data look precise and organized. This is also before the set-up.
if (distance> x) {distance=x;} //states that if the distance calculated is greater than a certain number, then the ranges causes the distance to equal that certain number (establishes "x" as the maximum number)
if (distance<y) {distance=y;} //states that if the distance calculated is less than a certain number, then the range causes the distance to equal that certain number (establishes "y" as the minimum number)
return (distance); //returns the desired distance
« Previous
Next »
Your contributions are licensed under the open source Creative Commons license.
Next line
Previous line
Insert a new line below
Insert a new line above
Indent current line
Unindent current line
Delete current line
Navigate to next step.
Navigate to previous step.