I am using an Arduino Uno R3 & Sparkfun WiFly Shield WRL-09954 with Alpha 2 (Arduino 1.0) Library
The maximum transfer rate I have achieved is 236 characters per second (ROUGHLY 2400 BAUD)!
I see that others have reported higher transfer rates? I have included my test code below.
I appreciate any advice as to why my transfer rates are so low.
Thanks, Carl
// I am using an Arduino Uno R3 & Sparkfun WiFly Shield WRL-09954 with Alpha 2 (Arduino 1.0) Library
// Maximum transfer rate I have achieved is 236 characters per second (ROUGHLY 2400 BAUD)!
// Others report higher transfer rates?
#include "WiFly.h"
Client client("google.com", 80);
int thruPutCount = 0;
long unsigned int holdMillis;
void setup()
{
Serial.begin(115200);
Serial.println("WebClient example at various baud rates.");
Serial.println("WiFly.begin ...");
WiFly.begin();
Serial.println("WiFly.join ...");
if (!WiFly.join("SSID", "PASSPHRASE")) // *** MODIFY FOR YOUR NETWORK ***
{
Serial.println("Association failed.");
while (1)
{ // Hang on failure. }
}
Serial.println("WiFly.configure ...");
WiFly.configure(WIFLY_BAUD, 38400); // Arduino 1.02 -- Had to modify "delay(10)" in WiFlyDevice::configure to "delay(50)"
Serial.println("connecting...");
if (client.connect())
{
Serial.println("connected");
client.println("GET /search?q=arduino HTTP/1.0");
client.println();
}
else
Serial.println("connection failed");
holdMillis = millis();
thruPutCount = 0;
}
char c;
void loop()
{
c = client.read();
thruPutCount++;
if (thruPutCount >= 100)
{
Serial.print("Chars/ sec: ");
Serial.println( (float) ( 100000/ (millis()-holdMillis) ) ); // 100 chars * 1/1000 secs = 100,000
thruPutCount = 0;
holdMillis = millis();
}
}