Pages: [1]   Go Down
Author Topic: Library for Due and WiFly GSX Breakout from SparkFun  (Read 1882 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 3
Posts: 63
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I had a WiFly working with an Arduino Mega 2560 thanks to the library WiFlySerial from Tom Waldock. But this library use the SoftwareSerial library that is not compatible with Due processor.

For making WiFly work with Due, I use serial communication port Serial1 and I wrote WiflySerial1 library.
It is less complete than (but highly inspirited from) Tom' work.
You can download it at
http://code.google.com/p/wiflyserial1/
Comments and feedback are welcome!
Logged

Offline Offline
Jr. Member
**
Karma: 3
Posts: 63
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I update the library, adding two functions that allow to connect to a web server.
Functions are:
Code:
    boolean openConnection( char* host, int port = 80, unsigned long connectWaitTime = CONNECT_WAIT_TIME )
    boolean isConnectionOpen()
I add a example WiflyWebClient that show the use of those functions.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello Jean-Michel,

First of all thank you for this library, I already used the previous version with the webserver to test the WiFly shield on my Arduino Due. It works very well!

In fact I was just looking how to add client functionality when I saw your update.  So I tried it immediatly, unfortunately I got a compilation error:
....Arduino/libraries/WiflySerial1/WiflySerial1.cpp: In member function 'boolean WiflySerial1::openConnection(char*, int, long unsigned int)':
....Arduino/libraries/WiflySerial1/WiflySerial1.cpp:438: error: 'itoa' was not declared in this scope

I did not have time to dig in to it now, but I will try tomorrow , I asume a library (for itoa) has to be added.

Best regards,
Henk
Logged

Offline Offline
Jr. Member
**
Karma: 3
Posts: 63
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
....Arduino/libraries/WiflySerial1/WiflySerial1.cpp: In member function 'boolean WiflySerial1::openConnection(char*, int, long unsigned int)':
....Arduino/libraries/WiflySerial1/WiflySerial1.cpp:438: error: 'itoa' was not declared in this scope

This error occurs when compiling for Due.
Not for Mega 2560, and I test the last modifications with a Mega...  smiley-roll-blue
A search in the forum and I get the solution: just add
Code:
#include <itoa.h>
in file WiflySerial1.h
This line don't hurt when compiling for Mega 2560 so I shall add it to next version
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, that was the problem, now it works.

Thanks again.
Logged

Pages: [1]   Go Up
Jump to: