Show Posts
Pages: 1 2 [3] 4 5 ... 360
31  Using Arduino / Networking, Protocols, and Devices / Re: Seeed Ethernet + Mega 2560 ICSP on: April 12, 2014, 08:01:32 pm
The W5100 slave select for that unit is D10.
http://www.seeedstudio.com/wiki/Ethernet_Shield_V1.0
The default slave select for the SPI on the Uno is D10. The default slave select for the Mega is D53. But that does not change the slave select for the W5100. It is still D10 on that shield.

32  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet + 2 SPI devices on: April 12, 2014, 06:12:11 pm
Same as above. Use a slave select for the RC522 that is not D10 or D4. The solution for adilutan was using D7.

33  Using Arduino / Networking, Protocols, and Devices / Re: Seeed Ethernet + Mega 2560 ICSP on: April 12, 2014, 06:09:06 pm
If you are using the ICSP pins for the SPI data lines, then all should be the same as the Uno. D10 is still the w5100 slave select.
34  Using Arduino / Networking, Protocols, and Devices / Re: Mega 2560 and Ethernet dose not work. Please help me. on: April 12, 2014, 12:13:13 pm
If the serial output shows "disconnecting" without a "Timeout" message, that means the server closed the connection.

If you are downloading a large file or a lot of data, and want to display it on the serial monitor, I suggest increasing the speed of the serial connection. I normally use 115200 instead of 9600.
35  Using Arduino / Networking, Protocols, and Devices / Re: Mega 2560 and Ethernet dose not work. Please help me. on: April 12, 2014, 11:21:41 am
Is it your server, or do you have a web hosting company host it for you?
36  Using Arduino / Storage / Re: very strange! on: April 12, 2014, 06:42:05 am
The mega has EEPROM onboard.
http://arduino.cc/en/Reference/EEPROM
37  Using Arduino / Programming Questions / Re: SPI SD Shield on: April 12, 2014, 06:25:03 am
SD.begin() should be run only once in the setup function. After that, it is "open, write, close".
38  Using Arduino / Networking, Protocols, and Devices / Re: Mega 2560 and Ethernet dose not work. Please help me. on: April 12, 2014, 06:19:47 am
If the code above is what you are running, then it will do nothing after the dhcp assignment. You need to connect to a server and send a request, then read the response.

Here is my client code in the playground.
http://playground.arduino.cc/Code/WebClient
39  Using Arduino / Networking, Protocols, and Devices / Re: using nRF24L01 and Wiznet ethernet shield on the same Arduino on: April 10, 2014, 05:58:35 pm
Post your code.
40  Using Arduino / Networking, Protocols, and Devices / Re: Mega + Wifi shield get request timeout on: April 10, 2014, 06:02:28 am
Then you probably haven't done the wifi firmware upgrade.
41  Using Arduino / Programming Questions / Re: Impossible to use wifiClient on: April 09, 2014, 09:40:09 pm
Have you upgraded the firmware? Check with this code after Serial.begin() in your setup. If upgraded, it should show version 1.1.0.
Code:
  // check for the presence of the shield:
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present");
    // don't continue:
    while(true);
  }

  // check firmware version
  Serial.print(F("Firmware version: "));
  Serial.println(WiFi.firmwareVersion());
42  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Wi-Fi shield occasionally not detected on: April 09, 2014, 09:28:44 pm
Is it an R3 Uno also? No extra pins overhanging?
Do you have a SD card in the shield's slot?
43  Using Arduino / Storage / Re: SD card write very random, mostly not working on: April 09, 2014, 07:15:19 am
Have you tried the SD without all those other devices connected to the Arduino? Have you considered the possibility it may be a power problem? Or one of those other devices is interfering with the SD in some way?

Did you bother to try each device separately before throwing that sketch together? I recommend starting with the ethernet shield. Get the w5100 and the SD working, then add one device at a time, insuring each device works with your current setup before adding another.
44  Using Arduino / Networking, Protocols, and Devices / Re: Mega + Wifi shield get request timeout on: April 08, 2014, 08:42:00 am
A couple things. The GET should have only the page in the request, and the domain should go in the Host parameter.
Code:
if (client.connect(server, 80)) {
    Serial.println("connected to server");
    // Make a HTTP request:
    client.println("GET /page-traffic-light/ HTTP/1.0");
    client.println("Host: energyelephant.com");
    client.println("Connection: close");
    client.println();
  }

You should read until the server closes the connection like this. This is the "Perfect World" version. The "Real World" version has a timeout feature to prevent a lockup if the connection breaks or the server stalls.
Code:
while(client.connected() {
  while (client.available()) {
     char c = client.read();
     Serial.write(c);
   }
}

edit: Oops! I forgot the protocol in the GET line. HTTP/1.0
45  Using Arduino / Storage / Re: SD card write very random, mostly not working on: April 08, 2014, 07:51:27 am
Quote
In addition to PaulS, you must disable the w5100 SPI
Hey. No, wait. You don't have to disable me!
LOL  smiley

I'm using both the W5100 and the SD card SPI, do I need to explicitly activate/deactivate each system before and after using it?
You must disable all SPI devices before starting any of them, or you will have problems. Try adding my mods to your code. Once they are started, the library functions will control the slave selects, but until you have them all running, you must disable them before calling any begin functions.

I did not disable the SD card (D4) because you are going to immediately start it, and that will leave that slave select disabled after the SD.begin(4) call.

Pages: 1 2 [3] 4 5 ... 360