Wifi shield (WLS06201P) + Arduino Leonardo

On 2012-09-06 I asked at the product page if the wifi shield is compatible with Arduino Leonardo. Your answer was yes, then I ordered one.

I received today the wifi shield, but the example from the wiki it is not working with the Leonardo. The sketch does not return from the Wifly.setConfig().

I also have a Duemilanove, that it works ok with the wifi shield.

Dou you have any example how can I send data to Cosm with the Wifly library ?

Hi ,
Sorry that the Wifi Shield can not work with Leonardo at current libraries , we will update it soon .
For the issue that send data to Cosm , there is a tutorial at the link
You can refer to the it and just change some code of wiki library (you need a count of Cosm and a feed), here is a example that i used before .


Wifly.print(“PUT /v2/feeds/66456.csv HTTP/1.1”);
Wifly.print(“Host: api.cosm.com”);
Wifly.print(“X-ApiKey: fUDV9Y3mowuUP1ISx27DTJCeCleSAKxuWWQwMW1aRHRjTT0g”);
Wifly.print(“User-Agent: test”);
Wifly.print(“Content-Length: 20”);
Wifly.print(“Content-Type: text/csv”);
Wifly.print(“Connection: close”);
More details , it is better to refer to the Cosm website :smiley:


Thank you Deray,

I am already used to Cosm with an ethernet shield.

I did connect with sucess using Wilfy.writetosocket instead of print.

But when a plug some sensors doesn´t connect anymore to api.cosm.com. The sensors are from the Sparkfun weather meter. I am using 2 inputs (A5 and D2), GND and 5V.

Any idea ?

oops… my mistake

I can´t use D2. Changed to another pin, and it´s working.

(I am using an Arduino UNO now)