newbie with a code question for combined DHCP/DNS/NTP

I've combined a number of code segements and libraries to achieve a combination of DHCP/DNS/NTP. I'm working to add a client connection to a website to allow a PHP/MYSQL database to be updated from the arduino.

As I'm layering code, what would seem the easiest addition, that of a client call to a web site, in this case google fails to compile for:

master_ether.cpp: In function 'void loop()':
master_ether:211: error: 'client' was not declared in this scope
master_ether:216: error: 'client' was not declared in this scope

Could anyone provide a suggestion?

master_ether.pde (10 KB)

Client client(theserver, 80); is declared in setup() so one cannot reach it inside loop()
=> define Client client global, outside setup and it will be reachable again

Thats a very big setup() consider defining functions to get some overview.

  • setupDHCP()
  • setupNTP()
  • etc

I noticed you use quite a lot of "long" strings, there might be a RAM shortage nearby. MInimizing these strings will help prevent this. (it might not be a problem yet)

Rob

Thanks! That fixed it. Yup, I'm playing and learning; so I'll try to minimize the strings and I'll work on learning about functions.

Bill

You are welcome,