Show Posts
Pages: [1]
1  Using Arduino / Networking, Protocols, and Devices / Re: Connect ethernet shield and SD card module? on: January 12, 2013, 03:27:03 pm
Ive realised it is not a w5100 based board. The library is here http://www.r3cube.com/Drivers-software/etherShield.zip
2  Using Arduino / Networking, Protocols, and Devices / Re: Connect ethernet shield and SD card module? on: January 12, 2013, 03:02:26 pm
Its still not working. I re-checked my wiring and its all connected with nothing crossed.
With zoomkat's example, the SD card fails and then it prints "Ready" and then there is nothing more printed. With the ethernet webserver example, i get server is at 0.0.0.0
Is there a program i can use to log the digital pins?
3  Using Arduino / Networking, Protocols, and Devices / Re: Connect ethernet shield and SD card module? on: January 12, 2013, 02:33:56 pm
Im just about to use ribbon cable to connect them my nano board for testing.
4  Using Arduino / Networking, Protocols, and Devices / Re: Connect ethernet shield and SD card module? on: January 12, 2013, 02:26:26 pm
Im using 4 for the CS on the SD card. the ethernet shield uses 2, 10, 11, 12, 13.
5  Using Arduino / Networking, Protocols, and Devices / Re: Connect ethernet shield and SD card module? on: January 12, 2013, 02:01:39 pm
Have you tried to get them to work separately?

edit: They are going to share three lines on the SPI bus.
Line    Uno    Mega
MOSI   D11    D51
MISO   D12    D50
SCK     D13    D52

Leonardo SPI is not on any digital pins. They are on the ICSP connector only.

Your ethernet shield appears to use the SPI lines on the ICSP connector if it has a 6 pin connector connecting to the ICSP pins on the Arduino.


I can get them to work separately. Idk how to wire it up though.
6  Using Arduino / Networking, Protocols, and Devices / Re: Connect ethernet shield and SD card module? on: January 12, 2013, 12:36:01 am
I want to connect http://www.ebay.com.au/itm/271104615881 with http://www.ebay.com.au/itm/280780639068
7  Using Arduino / Networking, Protocols, and Devices / Re: Connect ethernet shield and SD card module? on: January 12, 2013, 12:30:39 am
Test code for a w5100 shield with SD card.

Code:

//zoomkat 12/26/12
//SD server test code
//open serial monitor to see what the arduino receives
//address will look like http://192.168.1.102:84 when submited
//for use with W5100 based ethernet shields

#include <SD.h>
#include <SPI.h>
#include <Ethernet.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //physical mac address
byte ip[] = { 192, 168, 1, 102 }; // ip in lan
byte gateway[] = { 192, 168, 1, 1 }; // internet access via router
byte subnet[] = { 255, 255, 255, 0 }; //subnet mask
EthernetServer server(84); //server port
String readString;

//////////////////////

void setup(){

  Serial.begin(9600);

  // disable w5100 while setting up SD
  pinMode(10,OUTPUT);
  digitalWrite(10,HIGH);
  Serial.print("Starting SD..");
  if(!SD.begin(4)) Serial.println("failed");
  else Serial.println("ok");

  Ethernet.begin(mac, ip, gateway, gateway, subnet);
  digitalWrite(10,HIGH);

  //delay(2000);
  server.begin();
  Serial.println("Ready");

}

void loop(){
  // Create a client connection
  EthernetClient client = server.available();
  if (client) {
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();

        //read char by char HTTP request
        if (readString.length() < 100) {
          //store characters to string
          readString += c;
          //Serial.print(c);
        }
        //if HTTP request has ended
        if (c == '\n') {

          ///////////////
          Serial.println(readString); //print to serial monitor for debuging

          client.println("HTTP/1.1 200 OK"); //send new page
          client.println("Content-Type: text/html");
          //client.println("Content-Type: image/jpeg");
          //client.println("Content-Type: image/gif");
          //client.println("Content-Type: application/x-javascript");
          //client.println("Content-Type: text");
         
          client.println();

          //File myFile = SD.open("boom.htm");
          File myFile = SD.open("HYPNO.JPG");
          //File myFile = SD.open("BLUEH_SL.GIF");
          //File myFile = SD.open("SERVOSLD.HTM");
          if (myFile) {
            //Serial.println("test.txt:");
            // read from the file until there's nothing else in it:
            while (myFile.available()) {
              client.write(myFile.read());
            }
            // close the file:
            myFile.close();

          }
            delay(1);
            //stopping client
            client.stop();
            readString="";
          //}
        }
      }
    }
  }
}


No, i know how to use it but the ethernet shield and the SD card are separate.
8  Using Arduino / Networking, Protocols, and Devices / Connect ethernet shield and SD card module? on: January 11, 2013, 11:55:57 pm
I bought a new experimental DK electronics ethernet shield because it had a place to solder components on. I then bought a separate SD card. Later i realised that i would need to use the SD card with the Ethernet Shield but they conflict on 11, 12 and 13. Is there a way to connect them both at the same time?
9  Using Arduino / Installation & Troubleshooting / Nano + static = new bootloader? on: January 11, 2013, 06:55:59 am
I touched my nano before and there was a small static discharge from my finger to a pin from the D5 to the D8 area. The nano has lost the program that was on it and wont allow me to upload a new one because of this error:
avrdude: arduino_read_sig_bytes(): (a) protocol error, expect=0x14, resp=0x42
avrdude: error reading signature data for part "ATMEGA328P", rc=-2
avrdude: error reading signature data, rc=-1
Im pretty sure a new boot loader should fix this. How do i connect my other arduino to it?
10  Using Arduino / Installation & Troubleshooting / Re: Arduino Nano damaged. USB wont work. Power issues. on: January 09, 2013, 10:50:01 pm
I just upgraded the 25v 47uf capacitor to a 16v 210uf capacitor and its running. 5v pin is at 4.2v now. 3.3v pin is at 3.3v. The USB port is not under powered. The RX and TX lights would be flashing because of the USB controller resetting from low voltage yeah?
11  Using Arduino / Installation & Troubleshooting / Re: Arduino Nano damaged. USB wont work. Power issues. on: January 09, 2013, 05:48:44 pm
I think it's just a case that all your stuff is drawing more then the 500ma current limit when using USB power.

Note that unlike most arduino boards there is no 500ma thermofuse to protect the PC's USB port from excessive current draw, so beware how much current your nano based project requires and keep it under the 500ma USB limit, or power the nano and/or extra stuff from an external voltage source.

Lefty

My laptop has a current limit of 1A(1000ma). The volt meter reads 4.8v coming through the usb port with the nano plugged in. But after its gone through the circuits the 5v line ends up as 3.2v. The RX and TX lights flash even if the usb is unplugged. The program runs until the RX and TX lights start flashing and then the speaker crackles and the program resets. While the RX and TX lights are flashing, the 5v line goes to 2.3v and the 3.3v line goes to 2.4v. I have a 4.5v battery pack, where do i plug it in? 5v line, vin line?
12  Using Arduino / Installation & Troubleshooting / Re: Arduino Nano damaged. USB wont work. Power issues. on: January 09, 2013, 03:38:12 pm
I just looked at it now and the device connects to the computer if i ground the reset pin. Im able to do a loop back test and i can see what im sending. As soon as i remove the jumper from reset to ground, the computer says usb device not recognised.
13  Using Arduino / Installation & Troubleshooting / Re: Arduino Nano damaged. USB wont work. Power issues. on: January 09, 2013, 03:20:36 pm
I only used the usb power. The voltage readings are the same with the arduino unplugged from the project. The nano seems to be rebooting now. It plays about 1 second of sound and then the rx and tx lights flash even if its connected to a wall plug to usb adapter. Plugging the LCD into an external 3 battery (4.5v) power supply it works fine.
14  Using Arduino / Installation & Troubleshooting / Arduino Nano damaged. USB wont work. Power issues. on: January 09, 2013, 07:18:06 am
I just got my arduino nano V3.0 today. I also got an SD card reader and an LCD screen. I decided to connect a speaker to it and use the SD sound library to play music and display stuff on screen. I had it all working good and i was listening to some music when all of a sudden there was a crackle and then the music glitched a little. I then noticed a low hum in the background of the music that wasnt there before. The LCD screen was dim when i looked at it and the back light was flashing lightly. I looked back at my computer and saw "USB device not recognised." down the corner.

I reset the board using the reset button. The board's LED seemed to flicker for about 20 seconds before it started to display stuff on the screen like it was meant to. The board gets stuck with the LED flickering for upto 3 minutes so far. The speaker is quite, USB wont connect, display shows corrupt characters and the volt meter shows 3.1volts on the 5v pole and 3.0v on the 3.3v pole with nothing connected.

Is there any way to fix this? What is broken? What other information do you need?
Pages: [1]