Show Posts
Pages: [1] 2 3 ... 410
1  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet shield is not working with Arduino Duemilanove ATMega328 on: Today at 10:55:02 am
It appears you have a problem with the ethernet shield. Calling the Ethernet.begin() function is causing your Duemilanove to reboot.

Check your w5100 IC for solder bridges. That can cause that problem.
http://s681.photobucket.com/user/grue2/media/Computers/pict10852.jpg
2  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet shield is not working with Arduino Duemilanove ATMega328 on: Today at 10:40:46 am
I don't understand what you mean by "don't have any result". Try the test code I posted above and post the serial monitor output. Does it show the network settings or show "failed"?
3  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet shield is not working with Arduino Duemilanove ATMega328 on: Today at 10:31:34 am
That is not the problem you said you had in the original unedited post.

If connecting to google is the only problem, then try this test sketch to insure you have the correct network settings. Post the results of the serial monitor output.
Code:
#include <SPI.h>
#include <Ethernet.h>

byte mac[] = {  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

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

  // disable SD SPI
  pinMode(4,OUTPUT);
  digitalWrite(4,HIGH);

  Serial.print(F("Starting ethernet..."));
  if(!Ethernet.begin(mac)) Serial.println(F("failed"));
  else {
      Serial.print(F("IP: "));
      Serial.println(Ethernet.localIP());
      Serial.print(F("Subnet: "));
      Serial.println(Ethernet.subnetMask());
      Serial.print(F("Gateway: "));
      Serial.println(Ethernet.gatewayIP());
      Serial.print(F("DNS server: "));
      Serial.println(Ethernet.dnsServerIP());
}

void loop() {
}
4  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet shield is not working with Arduino Duemilanove ATMega328 on: Today at 10:15:29 am
I had problems with the R3 version of the WiFi shield if connected to a Pre-R3 version of an Arduino of any model. Maybe you have the same problem.

The R3 version shields require the IOREF pin (normally overhangs the sockets on the Arduino pre-R3 versions) to have a voltage applied. Since the Mega in my case (Duemilanove in your case) is a 5 volt IO device, I used a small jumper wire to connect the IOREF socket to the 5v socket on the shield. Problem solved. Let us know if that works for you.
5  Using Arduino / Networking, Protocols, and Devices / Re: Wireless Module Serial UART I cant Enter AT- Command mode on: Today at 10:02:38 am
Quote
I could be wrong
No! Say it can't be so.  smiley-cool
I was wrong once. I thought my answer was incorrect, but it wasn't. LOL  smiley-grin
6  Using Arduino / Networking, Protocols, and Devices / Re: Wireless Module Serial UART I cant Enter AT- Command mode on: Today at 08:34:17 am
It appears (I could be wrong) that pulling the AT control pin HIGH or leaving it disconnected will set the device operation to normal. To enter the AT command mode you must pull that pin LOW, do your AT command stuff, then go back to HIGH on that pin to return to normal operation.
Code:
void setup() {
   pinMode(inputPin, OUTPUT);
  digitalWrite(inputPin,LOW);  // enter AT command mode
// do your AT command stuff here, then
  digitalWrite(inputPin,HIGH);  // exit AT command mode
}
7  Topics / Home Automation and Networked Objects / Re: web server arduino "HTML code to use Keyboard button press" on: Today at 08:17:59 am
You should use a text field in a form. Then use Javascript to set the web page to focus on that text field when the page loads. Then use Javascript to determine if a character has been entered in that text field, and submit the form if the correct character is there.
8  Using Arduino / Networking, Protocols, and Devices / Re: Excellent Arduino Ethernet Shield Web Server Tutorial on: Today at 07:58:19 am
My code examples in the playground are not designed for a persistent connection like Ajax uses. Did you modify the code to leave the connection open for the specific file request?
9  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet Communication - Timing Throuble???? on: Today at 07:24:41 am
I don't understand the connection procedure. You connect to the device in setup, then disconnect immediately by calling client.stop(). After the disconnect and if pin D2 is LOW, you attempt to read from the now closed connection in loop. ??

10  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet Communication - Timing Throuble???? on: September 20, 2014, 08:33:01 pm
Post a link to the M12, preferably a page with a datasheet or manual.

edit: and post your entire sketch.
11  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet Communication - Timing Throuble???? on: September 20, 2014, 08:18:07 pm
FF is hex for 255 or -1. That is the return value if there are no characters available in the client rx buffer. I'm not certain why client.available() is returning true if nothing is in the rx buffer.

What version of IDE are you using?
Any other devices connected to the Arduino besides the ethernet shield?
Is there an SD card in the shield's slot?
12  Using Arduino / Programming Questions / Re: Direct port manipulation - SPI CS Pin on: September 19, 2014, 04:22:24 pm
Why do you think you need to do this? Both the SD and TFT libraries allow you to set the CS pin in the begin function or constructor using the digital pin number.
http://arduino.cc/en/Reference/SDbegin
http://arduino.cc/en/Reference/TFTConstructor
13  Using Arduino / Programming Questions / Re: problems reading SD card on Ethernet Shield on: September 19, 2014, 08:26:31 am
The code tag is the '#' button above the message box. Highlight your code and click that button.

The memory allocation for the variable chrFile in this function is released when the GetPath function returns. The function is returning a pointer to memory that has now been released. Don't do that. That memory will probably be overwritten by the next function call before you can access the previous value stored there. Either put the chrFile variable in the calling  function or in global memory.
Code:
char* GetPath(String path){
  int len = ((String)path).length();
  char* chrFile = new char[len+1];

// other unreadable code here

  return chrFile;
}

BTW, I don't use the String data type. I have found it to be unreliable. I use all character arrays.
14  Using Arduino / Programming Questions / Re: problems reading SD card on Ethernet Shield on: September 19, 2014, 08:01:11 am
First, please put your code the the code tags.

I'll take a guess that you probably have a problem with the variables in GetPath going out of scope before you use them.
15  Using Arduino / Programming Questions / Re: problems reading SD card on Ethernet Shield on: September 19, 2014, 07:44:52 am
I don't think that code you posted will compile but, despite that, where does the code stop? What is the last message on the serial monitor?
Pages: [1] 2 3 ... 410