WiFly Shield Help

Hi. I bought the WiFly shield a few days ago, but I can’t find any working tutorials. I opened the readme that came with the library and I’m using this code:

#include "WiFly.h"

void setup() {
  
  Serial.begin(9600);
  Serial.println("Arduino started.");

  WiFly.begin();
  if (!WiFly.join("Copiague Robotics")) {
     Serial.println("Failed to connect.");
  } else {
    Serial.println("Connected successfully!");
  }
}

However, it’s failing to compile with:

'class WiFlyDevice' has no member named 'join'
In file included from C:\Program Files (x86)\arduino-1.0\libraries\WiFly/SpiUart.h:5,
                 from C:\Program Files (x86)\arduino-1.0\libraries\WiFly/WiFly.h:4,
                 from WiFlyTest.cpp:1:
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/_Spi.h:8:22: error: WProgram.h: No such file or directory
In file included from C:\Program Files (x86)\arduino-1.0\libraries\WiFly/SpiUart.h:5,
                 from C:\Program Files (x86)\arduino-1.0\libraries\WiFly/WiFly.h:4,
                 from WiFlyTest.cpp:1:
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/_Spi.h:23: error: 'byte' has not been declared
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/_Spi.h:29: error: 'byte' does not name a type
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/_Spi.h:30: error: expected ',' or '...' before '*' token
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/_Spi.h:30: error: ISO C++ forbids declaration of 'uint8_t' with no type
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/_Spi.h:37: error: 'byte' does not name a type
In file included from C:\Program Files (x86)\arduino-1.0\libraries\WiFly/WiFly.h:4,
                 from WiFlyTest.cpp:1:
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/SpiUart.h:54: error: expected class-name before '{' token
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/SpiUart.h:58: error: 'byte' does not name a type
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/SpiUart.h:60: error: 'byte' has not been declared
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/SpiUart.h:65: error: 'Print' has not been declared
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/SpiUart.h:70: error: 'byte' has not been declared
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/SpiUart.h:70: error: 'byte' has not been declared
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/SpiUart.h:71: error: 'byte' does not name a type
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/SpiUart.h:75: error: 'boolean' does not name a type
In file included from C:\Program Files (x86)\arduino-1.0\libraries\WiFly/WiFly.h:6,
                 from WiFlyTest.cpp:1:
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/WiFlyDevice.h:11: error: 'boolean' does not name a type
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/WiFlyDevice.h:33: error: 'boolean' does not name a type
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/WiFlyDevice.h:35: error: 'uint16_t' does not name a type
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/WiFlyDevice.h:45: error: 'boolean' does not name a type
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/WiFlyDevice.h:50: error: 'boolean' does not name a type
In file included from C:\Program Files (x86)\arduino-1.0\libraries\WiFly/WiFly.h:8,
                 from WiFlyTest.cpp:1:
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/Client.h:19: error: 'boolean' does not name a type
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/Client.h:21: error: 'byte' has not been declared
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/Client.h:23: error: conflicting return type specified for 'virtual void Client::write(const uint8_t*, size_t)'
C:\Program Files (x86)\arduino-1.0\hardware\arduino\cores\arduino/Print.h:50: error:   overriding 'virtual size_t Print::write(const uint8_t*, size_t)'
In file included from C:\Program Files (x86)\arduino-1.0\libraries\WiFly/WiFly.h:9,
                 from WiFlyTest.cpp:1:
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/Server.h:15: error: cannot declare field 'Server::activeClient' to be of abstract type 'Client'
C:\Program Files (x86)\arduino-1.0\libraries\WiFly/Client.h:14: note:   because the following virtual functions are pure within 'Client':
C:\Program Files (x86)\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: note: 	virtual size_t Print::write(uint8_t)
In file included from C:\Program Files (x86)\arduino-1.0\hardware\arduino\cores\arduino/Arduino.h:212,
                 from WiFlyTest.cpp:3:
C:\Program Files (x86)\arduino-1.0\hardware\arduino\variants\standard/pins_arduino.h:41: error: expected unqualified-id before numeric constant
C:\Program Files (x86)\arduino-1.0\hardware\arduino\variants\standard/pins_arduino.h:42: error: expected unqualified-id before numeric constant
C:\Program Files (x86)\arduino-1.0\hardware\arduino\variants\standard/pins_arduino.h:43: error: expected unqualified-id before numeric constant
WiFlyTest.cpp: In function 'void setup()':
WiFlyTest:8: error: 'class WiFlyDevice' has no member named 'join'

I’m using the Alpha 1 libraries. I’ve tried Alpha 2 as well. Same error.

Any help appreciated!

I recently went through a similar problem when you download the library you need to get the latest branch that supports the Arduino 1 updates.

any solutions for that error? i have the same problem.