Pages: [1]   Go Down
Author Topic: WiFly Twitter Display  (Read 1047 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 45
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
#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)
  }
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 111
Posts: 5236
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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

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!
Logged

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

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

cheers!
Logged

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1411
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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).
Logged

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

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?
Logged

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

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?
Logged

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1411
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

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

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

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1411
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Switzerland
Offline Offline
Faraday Member
**
Karma: 111
Posts: 5236
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Pages: [1]   Go Up
Jump to: