Show Posts
Pages: 1 2 3 [4]
46  Using Arduino / Networking, Protocols, and Devices / Re: Arduino WiFi Shield not present on: December 31, 2012, 04:50:15 am
well, the problem is not with the LEDs, the main problem is that the shield fails to establish a successful connection. I don't know if this is SPI connection problem or not! I tried several examples and all of them are compiled successfully but at the end the same message appear when I open the serial!

Which is the problem? In your first message you say that the LEDs aren't coming on and you're trying the list networks functions. That's normal as the LEDs don't light up during that function. Are you now saying that the LEDs come on but you're not getting a connection?

Does only the Error LED light up red? Do you never get a Link LED light up green?

I found with my WiFi connection I often needed to try more than once rather than the whole sketch dying after one try. I therefore modified the code:
int status = WL_IDLE_STATUS;     // WiFi radio's status
int iAttempt = 0;                // Attempt counter

void setup() {
  // Setup serial monitor
  // Wait 3 seconds
  // Some declaring text
  Serial.println("\nWiFi Shield - WPA Connection Testing");

void loop() {
  while (status != WL_CONNECTED) {
     // Attempt to connect to WPA network:
      Serial.print("Attempting to connect to WPA network: ");
      Serial.print("\tAttempt: ");
      status = WiFi.begin(SSID, WiFiPass);
      if (status != WL_CONNECTED) {
        Serial.println("Couldn't establish WiFi connection");
        // Wait 3 seconds before trying again
      // if connected :
      else {
          Serial.println("WiFi connection established\n");
  // Check and display the network connection once every 10 seconds:

I am very verbose in my serial output while testing as it allows me to see where I am in the Arduino and in my code. You can cut out a lot of that smiley-wink
You also don't have to keep track of how many attempts it took. I just like to do that...

After running this let us know precisely where the problem is: which LEDs light up or don't, which error messages display...

47  Topics / Home Automation and Networked Objects / Garage Door : is it open or closed? on: December 30, 2012, 11:13:45 am
I am very new to Arduino but very old to programming. I am very much a software guy and it is the hardware, electronics, aspect of each project that is going to require me seeking out handholding wherever possible...

I may be leaping high... but as part of my first project I want to be able to test if my garage door is currently open or closed. Later I'll go for the ability to open and close it. But for now just the verification part will do.

I have Arduino Unos and I have an Arduino Ethernet PoE and I have an Arduino WiFi shield. The long-term goal will be to use the Ethernet PoE version as I already have Ethernet cabling in the garage and PoE switches.

My question is therefore as regards the physical aspect: what would you recommend as the physical system to verify if the garage door is currently open or closed? What sort of sensor would I attach?

It's a rollup garage door which is already motorised with a big manual push button inside, a couple of radio-based remote controls and a horizontal reader near the floor which tests if there is an object inside the doorway (ie a car) and which deactivates the opening/closing.

I would like to be able to test both situations: open and closed. I assume that's going to require 2 separate sensors: one towards the bottom to detect closed and one up top to detect open. What should I be sensing however? A physical connection? Light coming in or going out (would not work well at night)? Infrared passage?

I assume I will then need to run a wire from each sensor to my Arduino box which I will be, eventually, setting up just next to the manual push button...

Any ideas and suggestions or any scenarios that some of you have already done would be greatly appreciated.

If I'm just biting off way too much before even learning how to chew you can let me know that as well.
48  Using Arduino / Programming Questions / Setting Arduino's date and time? on: December 30, 2012, 10:49:43 am
This could go in the networking forum as it involves the WiFi shield or the storage forum as it involves the SD card... but I thought the fact that it should set the info on the actual Arduino puts it here.

I have the WiFi shield with the built-in SD card unit. Whenever I create a file on the SD card, through the Arduino and the WiFi shield, the date and time of the file creation is set to the standard January 1, 2000 00:00. I have found how to connect to an NTP server and read the current date and time.  But how can I set the current date and time on the Arduino for it to use in it's other operations such as file I/O?

49  Using Arduino / Storage / Re: SD Card - Read available space? on: December 30, 2012, 10:31:38 am
Thank you for your quick reply.

I should have mentioned that I had already successfully tested the card size functionality. I was hoping there was a simple library function call to get the amount of free space on the card...

Another, very kludgy workaround, would be to take the total card size and loop through all of the stored files subtracting their current size from the total size. That would give an indication of how much size is left. That's definitely NOT what I am looking for... especially, as I think of it, as it would have to recurse through folders and subfolders as well!

50  Using Arduino / Networking, Protocols, and Devices / Re: WiFi Shield - Can't set IP Address on: December 30, 2012, 10:28:22 am
I might be answering my own question... according to this thread, going back to October, it is not possible to set a static IP address on the WiFi shield even though it is possible on the Ethernet shield:,126817.0.html

51  Using Arduino / Networking, Protocols, and Devices / Re: Arduino WiFi Shield not present on: December 30, 2012, 10:19:19 am
I have the WiFi shield as well. I can say that it's normal that all the LEDs are off on the WiFi shield. The L9 LED blinks once when initially powering on. But, after that, everything stays off.

None of the WiFi LEDs come on in the SSID scan example. Try using one of the actual connection examples, depending on your connection type (WEP, WPA, ...). In those examples the Link LED will turn green upon connection or the Error LED will turn red. This will at least allow you to see if you've got a software (code) problem or a hardware (shield or shield connection) problem.
52  Using Arduino / Networking, Protocols, and Devices / Re: WiFi Shield - Can't set IP Address on: December 30, 2012, 10:04:28 am
I was going to start a new topic asking this precise question. But I assume it would be better to add it to this existing thread.

I need my WiFi shield to use a fixed IP address on my network. I need to be able to set the shield's IP address, subnet and gateway prior to setting the SSID and password. The Ethernet shield allows for this directly in its .begin() function. I went through the WiFi library and can't find any way to do this.

I am sure I'm missing something as I can't imagine any reason why the Ethernet shield would be able to create a network client connection and the WiFi shield would not...

Any ideas anyone?

53  Using Arduino / Storage / SD Card - Read available space? on: December 30, 2012, 09:55:15 am
I have the WiFi Shield with a 2 GB micro SD card in it. I am very pleased with writing to and reading from the SD card.

However I would like to be able to read how much space is available on the SD card before writing to it or to display / send that information elsewhere.

I went through the library functions and couldn't find anything that does this.

How can I read the amount of available space on the SD card?

Pages: 1 2 3 [4]