Go Down

Topic: Library for Due and WiFly GSX Breakout from SparkFun (Read 2158 times) previous topic - next topic

gallegojm

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!

gallegojm

I update the library, adding two functions that allow to connect to a web server.
Functions are:
Code: [Select]

    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.

elnhege

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

gallegojm

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: [Select]
#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

elnhege

Yes, that was the problem, now it works.

Thanks again.

Go Up