2 Replies Latest reply on May 16, 2014 1:33 AM by conor100

    Unread email counter Galileo project

    conor100

      Hi Guys,

       

      I'm following this unread email counter project https://learn.sparkfun.com/tutorials/galileo-unread-email-counter/the-arduino-sketch

       

      I have a quick question regarding the Wifi connection code in the Arduino sketch.

       

      I have an WEP open wifi network and I can successfully connect to it with the example WifiWebClient sketch that comes with the board.

       

      The code below is from the Arduino sketch that sparkfun provided for the project. Would anybody know what they mean by "change this line if using an open or WEP network"? Change what exactly?

       

      At the moment if will not connect

       

      Thanks

       

       

      // initWiFi() initializes WiFi, connecting to the ssid/passkey
      // combo defined up above.
      // This function will attempt 3 connections to WiFi. If we
      // succeed a 1 is returned, and the IP address is printed.
      // If connections fail, a 0 is returned.
      uint8_t initWiFi()
      {
        byte timeout = 0;
        while ((status != WL_CONNECTED) && (timeout < 3))
        {
          Serial.print("Setting up WiFi : attempt ");
          Serial.println(timeout + 1);
          // Connect to WPA/WPA2 network. Change this line if using 
          // open or WEP network:    
          status = WiFi.begin(ssid, pass);
          //delay(10000); // Wait 10 seconds between connect attempts
          timeout++;