Created
February 3, 2017 22:37
-
-
Save BraveTea/f29a2b51357cbcb7dd345773726a2d77 to your computer and use it in GitHub Desktop.
Assigning values to a function()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* what you need to look for here is the "24" 8' DashedLine(24) | |
* and combine this with the "int len" in DashedLine(int len) | |
* those correspond. the 24 is the integer value (called for | |
* with int len) assigned to the function and thus giving | |
* "len" in the function the value of 24 | |
*/ | |
void setup() { | |
Serial.begin(9600); | |
// draw the menu box | |
DashedLine(24); | |
Serial.println("| Program Options Menu |"); | |
DashedLine(24); | |
} | |
void loop() { | |
} | |
void DashedLine(int len) | |
{ | |
int i; | |
// draw the line | |
for (i = 0; i < len; i++) { | |
Serial.print("-"); | |
} | |
// move the cursor to the next line | |
Serial.println(""); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment