 View *v;
 Controller *c;
 
-const String ssid = "AxiomMarketsLLC";
-const String pwd = "@xiomr001z";
+const char ssid[48] = "AxiomMarketsLLC";
+const char pwd[48] = "@xiomr001z";
 const int port = 8000;
 const int pinButton = 0;  
 const int pinEncoder = 2; 
+
+
+void check_wifi() {
+  // check for the presence of the shield:
+  if (WiFi.status() == WL_NO_SHIELD) {
+    Serial.println("WiFi shield not present"); 
+    // don't continue:
+    while(true);
+  } 
+
+  if( WiFi.firmwareVersion != "1.1.0" ) {
+    Serial.println("Please upgrade the firmware");
+  }
+  
+  while(WiFi.status() != WL_CONNECTED){
+    Serial.print("Attempting to connect to SSID: ");
+    Serial.println(ssid);
+    // Connect to WPA/WPA2 network. Change this line if using open or WEP network:    
+    WiFi.begin(ssid,psw);
+    delay(1000);
+  }    
+}
+
+void wifi_handler() {
+  if(WiFi.status() != WL_CONNECTED){
+      check_wifi();
+    }
+}
 
 void setup() {
   // put your setup code here, to run once:

  p.push_back(Person("Larry", true));
  p.push_back(Person("Dipesh"));
  p.push_back(Person("Ming"));
  
  s = new State(p);
  c = new Controller(pinButton, pinEncoder, p.size());
  v = new View(ssid, pwd, port, s->getInList(), s->getOutList());

#include <WiFi.h>

#include <rgb_lcd.h>
#include <stdlib.h>
