Arduino Uno + Wireless proto shield + Wifly module

(1/13) > >>

sponder:
Hi Arduino community!!

Let me do a quick introduction here since i'm new, and this would be my first post on these forums.
-- a few years back i ran into this project controlling RGB leds using a PIC microcontroller. This project really triggered an interest in finding out how this stuff works, and how to program these microcontrollers.
So, a few books (mainly on c for PIC's) later, and a few projects later, i decided to try out Arduino. (Arduino is kind of hard to miss once you get to play with microcontrollers)
So i bought myself a Arduino Uno r3 .
After doing a few tutorials (bought some getting started books on arduino as well as the Arduino Cookbook.) it was time to do something a little more advanced.
To make things a bit more interesting, i bought a Wifly module to put into a Wireless proto shield
I would like to start off easy (hello world), by controlling a led:
- either wireless by making a socket to a server app. (got one by following ms c# tutorials  8) )
- or control the led through serial, and letting the arduino host a webpage showing the status of the led.

Hooking up the Wifly module wasn't very difficult, i hooked the Wifly module up to the Arduino using the Wireless proto shield, and as per instructions in the manual, i got into command mode, scan all the WLANS in my appartment, and associating with my own SSID. The unit got an IP straight away, and it responds to ping requests. So i figure the module is connected to my WLAN!

Anyway, i soon found out that there are some compatibility issues with the Wifly library and Arduino 1.0
The example code did not compile, and i don't have the skills (yet XD) to fix this myself.
after searching the internet for help i finally found a library which is supposed to be compatible, and made a VERY simple sketch:
after the
#include "WiFly.h"
#include "Credentials.h" //file modifed obviously..
in the setup i have the serial.begin, and in the main loop i just write "hi" to the serial port with a delay before looping.
If i upload this sketch i see the "hi" messages coming into my terminal.
But, once i do a WiFly.begin(); in the setup part (as in the examples) i can still compile and upload the code, but the arduino seems to get stuck. The lights of the wifly unit blinks as it's telling us it's connected to the network (still can ping the unit), but it never starts sending out the "hi" message to the serial port.
If i comment out the WiFly.begin(); the unit starts sending the mssg to the serial port again.
So it seems that the arduino hangs on the WiFly.begin(); method.
Can someone please tell me how to troubleshoot this? or, get me up and running using the Wifly shield using Arduino 1.0?
Any help would be very appreciated!
Thanks in advance,

Sander.

PaulS:
Quote

Can someone please tell me how to troubleshoot this? or, get me up and running using the Wifly shield using Arduino 1.0?
Without seeing your code, no, I'm afraid not.

sponder:
thanks for your answer.
The code i used couldn't be more simple:
To see where it hangs i simply stripped out everything :)
The code which does give me the mssg to the terminal:
Code:

#include "WiFly.h"
#include "Credentials.h"


Server server(80);

void setup() {
//  WiFly.begin();
  Serial.begin(9600);

}

void loop() {
  Serial.print("Ping");
  delay(100);
}
While this doesn't.
Code:

#include "WiFly.h"
#include "Credentials.h"


Server server(80);

void setup() {
  WiFly.begin();
  Serial.begin(9600);

}

void loop() {
  Serial.print("Ping");
  delay(100);
}
in both cases i can ping the unit though..

thanks again!

sponder:
Well, it would be a pretty cool device if i could get it to work.
Any advice for a newb like myself to find a working library?
I'm not the only one without the issue that the library isn't working with arduino > v22
I know i'm not providing much info here, but i don't really know what i could test / try to come up with additional info.
Would my conclusion be correct to say that it is the Wifly library which does compile is the cause of the unit hanging? (since unit does not hang without the Wifly.Begin())
Any other tips how to proceed?
Many thanks!

dhunt:
Why not skip using the library to start with and just configure the wifly using the serial monitor? Are you wanting to do anything that would require changing the config on the fly? E.g switching between TCP and UDP protocols, sending packets to more than one host? If not then you don't need the wifly library.

Once the wifly is configured it will send anything the arduino writes to its serial port as a UDP or TCP packet to the configured host address and port. The wifly will also send the payload of any packets it receives to the Arduino's serial port.

Navigation

[0] Message Index

[#] Next page