Show Posts
Pages: 1 2 3 [4] 5 6 ... 399
46  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet + SD R3, MEGA 2560 R3 webserver, SD fails after ethernet calls (SPI) on: August 12, 2014, 03:19:06 pm
Quote
You still set pin 10 high after Ethernet.begin(). Please don't do that. The Ethernet library takes over the control of the chip-select.
That is my fault. It is a compensation for a bug in an old version of the ethernet library. I will correct that in the playground version of my sketch.

edit: Here is that code's output if the files exist on the SD card.The index.htm file loads a defcss.css file, and the web browser loads the favicon.ico file.
Quote
Starting SD..ok
192.168.2.2
Ready

Client request #1: GET / HTTP/1.1
file = /
file type =
method = GET
params =
protocol = HTTP/1.1
Home page SD file
filename format ok
SRAM = 6114
file found..opened..send..closed
disconnected

Client request #2: GET /defcss.css HTTP/1.1
file = /DEFCSS.CSS
file type = CSS
method = GET
params =
protocol = HTTP/1.1
SD file
filename format ok
SRAM = 6114
file found..opened..send..closed
disconnected

Client request #3: GET /favicon.ico HTTP/1.1
file = /FAVICON.ICO
file type = ICO
method = GET
params =
protocol = HTTP/1.1
SD file
filename format ok
SRAM = 6114
file found..opened..send..closed
disconnected
47  Using Arduino / Networking, Protocols, and Devices / Re: Networking question on: August 12, 2014, 09:33:53 am
That method could be in violation of Twitter's terms of service unless the bounce server operator has written permission from Twitter to do that.
http://forum.arduino.cc/index.php?topic=173695.msg1657940#msg1657940
48  Using Arduino / Programming Questions / Re: Arduino Mega + Ethernet shield crashing on: August 12, 2014, 09:01:07 am
http://www.cplusplus.com/reference/cstring/strlen/

Then use a for loop to send each character in the character array to the display.
49  Using Arduino / Networking, Protocols, and Devices / Re: Networking question on: August 12, 2014, 08:57:51 am
That is a server bounce.
Quote
Be advised that this library does not tweet directly from your Arduino. It sends your tweets to a website, which then tweets it from there.
50  Using Arduino / Programming Questions / Re: Arduino Mega + Ethernet shield crashing on: August 12, 2014, 08:53:02 am
Use dtostrf(). It will convert your float to a string. Then you should be able to send each character of that string to your lcd display.
http://www.atmel.com/webdoc/AVRLibcReferenceManual/group__avr__stdlib_1ga060c998e77fb5fc0d3168b3ce8771d42.html
51  Using Arduino / Networking, Protocols, and Devices / Re: Networking question on: August 12, 2014, 08:24:10 am
Twitter now requires SSL, so I do not believe you will be able to access the Twitter page without a server bounce (relay).

The email part you should be able to check with telnet from your localnet. If you can connect and send email with telnet, then you should be able to send with the Arduino.

I have code that sends email like an email server sends to another email server. It works if the receiving server isn't blocking your ip address. Many email servers will not accept email from a non-commercial ip address. If you get your IP by dhcp, you are probably a residential account and you may get blocked. This code will tell you:
http://playground.arduino.cc/Code/Email
52  Using Arduino / Programming Questions / Re: Arduino Mega + Ethernet shield crashing on: August 12, 2014, 08:02:59 am
OK, good. If you checked them one at a time, that is the correct way to do it.

Strip out the extra stuff and repost your code. I still recommend staying away from the String data type. I use character arrays instead. It makes your code much more stable.

You might need to use dtostrf() to convert the float to a string, then use atoi() to convert the whole number part of the float to an integer. Do you know what the maximum value of the float will be?
53  Using Arduino / Networking, Protocols, and Devices / Re: Networking question on: August 12, 2014, 07:55:37 am
That depends on your email server. The ethernet and WiFi libraries do not support TLS or SSL, so if your email server will accept email from the Arduino without the security, then you can.
54  Using Arduino / Programming Questions / Re: Arduino Mega + Ethernet shield crashing on: August 12, 2014, 07:43:52 am
Your code is too confusing to debug.

I recommend starting with the basic UDP packet receive with the serial monitor. Then you can add the lcd display once you are certain the UDP part is functioning the way you want.

I recommend staying away from the String data type.
55  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet + SD R3, MEGA 2560 R3 webserver, SD fails after ethernet calls (SPI) on: August 12, 2014, 07:25:41 am
@Peter_n: My code works. That was the point. It doesn't do anything with the SPI slave selects that doesn't need to be done, and it initializes the SD card only once.

If complexity scares the OP, then maybe this is not not right project to undertake.
56  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet + SD R3, MEGA 2560 R3 webserver, SD fails after ethernet calls (SPI) on: August 12, 2014, 07:16:16 am
I use a Mega with the ethernet shield and I do not have the problem you describe. Here is my code.
http://playground.arduino.cc/Code/WebServerST

This code does not send one byte at a time. It sends the data in 64 byte packets. Look for this code:
Code:
                   while(myFile.available()) {
                    tBuf[clientCount] = myFile.read();
                    clientCount++;
                    tBuf[clientCount] = 0;

                    if(clientCount > 63) {
                      client.write((byte*)tBuf,64);
                      clientCount = 0;
                    }

                  }
                  if(clientCount > 0) {
                    client.write((byte*)tBuf,clientCount);
                  }
                }

                myFile.close();
I send pictures with this and it does fine.
57  Using Arduino / Storage / Re: Micro sd from 5v on: August 11, 2014, 02:25:52 pm
The ethernet shield uses a 74LVC1G125DCK for the logic level converter and a MC33269ST-3.3 for the voltage regulator.
58  Using Arduino / Networking, Protocols, and Devices / Re: SCL/SDA on: August 11, 2014, 11:43:21 am
Hi, I'm just wondering if it's okay to connect multiple boards to the same SCL and SDA ports on the Arduino?
Yes, if they are both I2C (same protocol) and have different device numbers.
59  Using Arduino / Networking, Protocols, and Devices / Re: Email Send Error on: August 11, 2014, 11:21:40 am
That server IP is no longer valid for Gmail.
Code:
// change this
IPAddress server( 173, 194, 69, 26 );//( 173, 194, 69, 26 )
// to this
IPAddress server( 173, 194, 64, 108 );
You really should use a domain name (DNS) to determine the IP address. Use smtp.gmail.com as the server.

60  Using Arduino / Storage / Re: Micro sd from 5v on: August 11, 2014, 10:34:53 am
Do you mean this uSD board?
http://www.adafruit.com/products/254
IC1 is the logic level converter, and IC2 is the voltage regulator.
Pages: 1 2 3 [4] 5 6 ... 399