Pages: 1 2 [3]   Go Down
Author Topic: First steps with WiFly and Arduino  (Read 5871 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

Yes that worked perfectly, thanks very much, I read the diagram I was looking at wrong (http://www.flickr.com/photos/oskay/3614014331/).

So I'm testing with software serial in my WiFly code now and it seems that the begin() command being sent to the WiFly is where everything stops.  I've stripped it down to keep it simple (i.e. just starting up the wifi) and in the code below it never gets as far as the loop().  Physically all the connections on the arduino to the shield and RN-XV look good, the switch is on xbee and I have no problems configuring the RN-XV from CoolTerm on my computer so I think this elimintates any issues with connections.  Maybe I'm forgetting to include a key library that's needed or could there be something wrong wih the WiFlySerial.h library?

Thanks in advance
Garrett

Code:
#include <Arduino.h>
#include <Time.h>
#include <SoftwareSerial.h>
#include <Streaming.h>
#include <PString.h>
#include <WiFlySerial.h>


//various buffer sizes
#define REQUEST_BUFFER_SIZE 180
#define TEMP_BUFFER_SIZE 60

//server hosting GET example php script
#define MY_SERVER_GET "http://www.asquare.org/"
#define MY_SERVER_GET_URL "in-progress/arduino-test/counter/index.php"


//WiFly pins
#define ARDUINO_RX_PIN  2
#define ARDUINO_TX_PIN  3

WiFlySerial wifi(ARDUINO_RX_PIN, ARDUINO_TX_PIN);
char bufRequest[REQUEST_BUFFER_SIZE];
char bufTemp[TEMP_BUFFER_SIZE];


//sotware serial pins for testing
SoftwareSerial mySerial(4, 5);



//loop counter
int iLoopCounter = 0;

//start time
unsigned long startTime = 0;


void setup()
{
  //set up serial
  //Serial.begin(9600);
 
  //set the data rate for the SoftwareSerial port and send a message to test
  mySerial.begin(9600);
  mySerial.println("Software serial working");
 
  //start up WiFly
  wifi.begin()
 
  //I tried testing with this in the hope it would send back an error code of some sort but nothing
  //mySerial.write(wifi.begin());
 
}


void loop()
{
  //to test
  mySerial.println("test");

  //to prevent spamming serial monitor too much
  delay(250);
}
Logged

Pages: 1 2 [3]   Go Up
Jump to: