Go Down

Topic: WiFly Twitter Display (Read 1 time) previous topic - next topic

kenneth87

Good day,

I'm currently trying to build a wireless twitter display using an arduino, wifly shield and LCD.

I already have a code that works for the ethernet portion but i'm trying to make my project wireless.

Could someone give me a hint to what i might need to alter to get it running?

I'm using an Arduino 1.0 IDE running this version of the library: https://github.com/jmr13031/WiFly-Shield

I have only connected Tx and Rx pin to Arduino pin 2 and 3 respectively. and Vin from arduino to 3.3v and Gnd to Gnd.

Is that right?

this is my code that i used. appreciate the advice!

Code: [Select]
#include <SPI.h>
#include <Ethernet.h>
#include <TextFinder.h>
#include <LiquidCrystal.h>
#include "WiFly.h"

//WIFLY CONFIG---------------------------
//char passphrase[] = "WIFI_PASSWORD";
//char ssid[] = "WIFI_NAME";
//---------------------------------------

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(9,8,7,6,5,4);

byte mac[] = {0xA2, 0xB1, 0x9A, 0xD2, 0xB3, 0xC5}; //mac address

byte ip[] = {192,168,X,XX};

byte server[] = {128,242,240,20}; // Twitter
char serverName[] = "api.twitter.com";  // twitter URL
char tweet[140];

Client client;

TextFinder  finder(client);

void setup()
{
  WiFly.begin(mac,ip);
}

void loop()
  {
// call XML data from twitter(working)
  }

pylon

Quote
I have only connected Tx and Rx pin to Arduino pin 2 and 3 respectively. and Vin from arduino to 3.3v and Gnd to Gnd.


Do you really have a WiFly shield (with the RN-131C)? These use an SPI2UART chip and don't have RX/TX pins. The software is also communicating over the SPI bus and not the USART of the Arduino.

kenneth87

yup i do! but it says on the pin side there are Tx and Rx pins for me to connect. in that case, what would be a suitable board for me to use to enable wireless connectivity instead of ethernet?

cheers mate!

kenneth87

sorry pylon i realized there are two board out there. mine is this board. https://www.sparkfun.com/products/9954

cheers!

florinc

There is a TwitterClient example in the Ethernet library coming with Arduino 1.0, very easy do adapt to your WiFly shield (WiFly library was adapted after the Ethernet library).

kenneth87

thanks florinc,

got my wifly connected to arduino pin for pin and now i'm running and it gets stuck on WiFly.begin();

any ideas?

kenneth87

just a question for florinc and pylon,

I noticed there are two different shields, one is a WiFly shield and the other is the original Arduino WiFi shield.

what is the difference? are both just plug and play? will it be better if i got the Arduino wifi shield for my arduino itself?

florinc

Quote
got my wifly connected to arduino pin for pin and now i'm running and it gets stuck on WiFly.begin();

Did you specify the correct credentials (ssid, password) for your wifi network?
Are you currently using the sparkfun wifly shield?

kenneth87

Yup using sparkfun's wifly shield. It communicates thru uart am i right?

florinc

If this is the WiFly shield you have
https://www.sparkfun.com/products/9954
then it uses SPI.

pylon

Quote
sorry pylon i realized there are two board out there. mine is this board. https://www.sparkfun.com/products/9954


As I told you: this board is using the SPI bus to communicate with the Arduino. The communication with the WiFi module is through a UART interface because on the shield Sparkfun integrated a SPI2UART chip.

How do you connect the shield to the Arduino? Stacking it on? Can you post a picture of it?

Go Up