hello everybody,
i have a http server with arduino ethernet shield but i have put "client.println("html code")" in void loop, and it displays the html page in loop... If i put it in void setup, it doesnt work, is it possible to create another void where put the html code?
LorenzoRottigni:
i have a http server with arduino ethernet shield but i have put "client.println("html code")" in void loop, and it displays the html page in loop... If i put it in void setup, it doesnt work, is it possible to create another void where put the html code?
Well, the statement given doesn't put out an HTML page to begin with... that's the most sensible I can say without the rest of your code, the real stuff, that is.
Post your complete program if you want help.
...R
You're using the wrong terminology. It's "function", not "void". The "void" on void setup() and void loop() is the return type on the function, in this case meaning that the function doesn't return anything. And, yes you can certainly add as many functions as you like. Please read https://www.arduino.cc/en/Reference/FunctionDeclaration