Show Posts
Pages: 1 ... 179 180 [181] 182 183 ... 390
2701  Using Arduino / Networking, Protocols, and Devices / Re: Problems whit Ethernet Shield (W5100) on: April 01, 2013, 11:43:52 pm
Did the DhcpAddressPrinter sketch get an ip? If not, try the test sketch on this post. It will check the SPI connection between the Arduino and the shield.
http://arduino.cc/forum/index.php/topic,156082.msg1169948.html#msg1169948
Does it display 192.168.2.2?

edit: The pic of the shield didn't show up. Can you post a link to the ethernet shield you are using? Does it have a 6 pin header on the bottom that connects to the ICSP pins on the Mega?
2702  Using Arduino / Storage / Re: SD Card Initialization Help on: April 01, 2013, 09:26:53 pm
I see. If the digital pins on that Mega board are 3.3v, then he is one of the lucky ones. But looking at that board, I'm not sure if it is even wired correctly for the code I would suggest.
2703  Using Arduino / Storage / Re: SD Card Initialization Help on: April 01, 2013, 09:04:59 pm
Actually, Retroplayer, I thought that too, but it is worse than that. The schematic fat16lib posted a link to above shows those 10K resistors are pullup resistors, not in series with the inputs. The 5v outputs of the Arduino are connected directly to the 3.3v inputs of the SD card.
2704  Using Arduino / Networking, Protocols, and Devices / Re: How to access smtp.gmail.com or other to send email on: April 01, 2013, 06:02:50 pm
I will point out one the first of many problems with this code. This is incorrect.
Code:
  Ethernet.begin(mac, ip,gateway,subnet);
http://arduino.cc/en/Reference/EthernetBegin

Of course, you won't know why the rest fails. You are not reading the response from the email server. I posted a link to the code I use a few posts ago.
2705  Using Arduino / Programming Questions / Re: Receiving strings in F() as parameters. on: April 01, 2013, 10:14:06 am
This worked for me. I just did what it told me to do.
Code:
void addToBlackBox(const __FlashStringHelper* in)
{
  blackBox = SD.open("BB.TXT", FILE_WRITE);
  blackBox.println(in);
  blackBox.close(); 
}
BTW, that is a double underscore preceeding FlashStringHelper.
2706  Using Arduino / Storage / Re: SD Card Initialization Help on: April 01, 2013, 06:48:59 am
I would see if fat16lib or someone else has more to add to this thread. It may or may not be that problem. It might help other users if you posted the make, model, and size of the SD card you have in the module, and anything you have done to it, like reformatting. Most of that can be corrected.

If it is the new rc component of that circuit, you will probably need to get another type of SD module. To insure the best performance, get one with a logic level converter, not the voltage divider.
2707  Using Arduino / Storage / Re: SD Card Initialization Help on: April 01, 2013, 06:39:27 am
Yes, those resistors (R1-R4) in the bottom picture. Unless my eyes are failing (that is possible..I'm old!), those particular resistors are 10Kohm. That will add a considerable rise and fall time delay.
2708  Using Arduino / Storage / Re: SD Card Initialization Help on: April 01, 2013, 06:26:51 am
I have heard on this forum that some of the SD card modules with the voltage divider circuit rather than a true logic level converter can cause problems. As I recall, it is a signal rise and fall time challenge with the larger, newer uSD cards due to the rc component of the circuit. Maybe fat16lib or someone else can add more to that.

Mine has a logic level converter.
2709  Using Arduino / Storage / Re: SD Card Initialization Help on: April 01, 2013, 06:09:12 am
Can you post a link to that SD card?
2710  Using Arduino / Networking, Protocols, and Devices / Re: Multibyte SPI read with Dimitech 2820L Global Orientation Module on: April 01, 2013, 04:46:59 am
...and explain how you are powering that module. If you are using the 3.3v bus on the Arduino, it may not provide enough current.

edit: Insure you have a good ground connection to the Arduino for all those devices.
2711  Using Arduino / Storage / Re: SD Card Initialization Help on: April 01, 2013, 04:30:15 am
Did you reformat the card? I use a SanDisk 2GB card, and it needed nothing. I just stuck it in, and it worked.

Have you tried the standard SD library as a test?
Code:
#include <SD.h>

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

  Serial.print("Starting SD...");
  if(!SD.begin(12)) Serial.println("failed");
  else Serial.println("ok");
}

void loop() {
}
If you have any other devices connected to the Mega, disconnect them for this test. Insure the SD card slave select is connected to D12.

edit: How are you powering that SD module? If you are using the 3.3v bus on the Arduino, there is not enough power available on that bus to power a SD card. That bus is limited to about 50ma, and the newer SD cards require about 100ma to read/write.
2712  Using Arduino / Networking, Protocols, and Devices / Re: Eternet Shield + Mega 1280 Problem !!! on: April 01, 2013, 04:13:16 am
You do not need that wiring hack. That would only apply to ethernet shields without the ICSP connector socket. That is the connection for the SPI data lines. Your original problem was probably code related.
2713  Using Arduino / Networking, Protocols, and Devices / Re: Sudden unreliability with my network-enabled Arduino project on: March 31, 2013, 08:41:12 pm
Thanks for the info. It is good to hear that fixed it for you. That may help someone else.
2714  Using Arduino / Networking, Protocols, and Devices / Re: Multibyte SPI read with Dimitech 2820L Global Orientation Module on: March 31, 2013, 08:38:38 pm
Nick has a good idea. Insure you have all connections correct, and a photo or diagram for us would be helpful. If that is all correct, then...

See if disabling sleep mode does any better. I reduced the SPI speed even more also. The datasheet states there is a typical 170ns delay required after sending the address byte before the device will be ready, so I added another 1us delay after sending the address byte.
Code:
void setup()
{
  pinMode(10, OUTPUT); // we use this for SS pin
  digitalWrite(10, HIGH);

  SPI.begin(); // wake up the SPI bus.
  SPI.setBitOrder(MSBFIRST);
  SPI.setDataMode(SPI_MODE1);
  SPI.setClockDivider(SPI_CLOCK_DIV16);
 
  // disable sleep mode
  digitalWrite(10, LOW);
  delayMicroseconds(1);
  SPI.transfer(0x30); //address byte
  delayMicroseconds(1);
  SPI.transfer(0x43); //Write status
  SPI.transfer(0x03); //Set status to active (no sleep)
  digitalWrite(10, HIGH);

  // wait 1us
  delayMicroseconds(1);

  // set GPS mode
  digitalWrite(10, LOW);
  delayMicroseconds(1);
  SPI.transfer(0x30); //address byte
  delayMicroseconds(1);
  byte data1 = SPI.transfer(0x73); //GPS Mode Register
  byte data2 = SPI.transfer(0x02); //Set 10Hz update mode
  digitalWrite(10, HIGH);
 
  delay(1000);

  Serial.begin(9600);
  Serial.print("Data1 = ");
  Serial.println(data1, HEX);
  Serial.print("Data2 = ");
  Serial.println(data2, HEX);
}
Does it still print the FF?
2715  Using Arduino / Storage / Re: Micro SD and GSM/GPS/GPRS shield with Mega 2560 interface problem on: March 31, 2013, 11:19:51 am
Just glancing at the specs, that uSD unit has a choice of power supplies. One is the digital pin and the other is the ICSP connector. I would use the ICSP connector power. It should have the power to write. Here is the page it is on:
http://www.cooking-hacks.com/index.php/documentation/tutorials/arduino-micro-sd
Look at "Step 2 : Powering the module".
Pages: 1 ... 179 180 [181] 182 183 ... 390