Show Posts
Pages: [1]
1  Using Arduino / Storage / Re: MicroSD not able to initialize often on: December 13, 2012, 03:39:51 pm
Cool!  That works, and is so simple even I can understand it.

Thanks SurferTim. smiley
2  Using Arduino / Storage / Re: MicroSD not able to initialize often on: December 13, 2012, 01:25:00 pm
Not quite answering my own question, the following:

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

  pinMode(10, OUTPUT);
  digitalWrite(10,LOW);   

  Ethernet.begin(mac, ip);
  server.begin();
 
  Serial.print("server is at ");
  Serial.println(Ethernet.localIP());
 
  digitalWrite(10,HIGH);
 
  if (!SD.begin(4))
     Serial.println("SD initialization failed.");
   
  digitalWrite(10,LOW);
     
  Serial.print("server is (still?) at ");
  Serial.println(Ethernet.localIP());   
     
}

Seems to work most reliably.   Which is to say, set pin 10 LOW when talking to the ethernet, and HIGH when initialising the SD (it seems it can be left LOW when opening and reading SD files which in my case contain some HTML that's being served up; I haven't tried writing to the SD).  Any other pattern of LOWs and HIGHs mostly stops either the SD or the ethernet or both from working, but you can sometimes leave out the digitalWrite(10,HIGH); before the SD initialisation and things will still work.  Setting 10 HIGH before doing anything ethernet always stops the ethernet in its tracks.

I think I am confused (not for the first time...)
3  Using Arduino / Storage / Re: MicroSD not able to initialize often on: December 13, 2012, 12:39:23 pm
Can I ask exactly how you would rewrite my setup() code above to make it rock solid?  I would be extremely grateful.
4  Using Arduino / Storage / Re: MicroSD not able to initialize often on: December 13, 2012, 12:36:19 pm
I'm not quite sure I understand what's going on here.  But with the digitalWrite LOW it works and with a digitalWrite HIGH it definitely doesn't.
5  Using Arduino / Storage / Re: MicroSD not able to initialize often on: December 13, 2012, 09:54:48 am
This code works on an Arduino Due with an Arduino Ethernet shield and micro SD card:

Quote
byte mac[] = {
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,1,9);

void setup()
{

  pinMode(10, OUTPUT);
  digitalWrite(10,LOW);

    
 // Open serial communications and wait for port to open:
  Serial.begin(9600);
   while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }
 // start the Ethernet connection and the server:

  Ethernet.begin(mac, ip);
  server.begin();
  
  Serial.print("server is at ");
  Serial.println(Ethernet.localIP());
 
  if (!SD.begin(4))
      Serial.println("SD initialization failed."); 
}


Note the digitalWrite(10, LOW).
6  Forum 2005-2010 (read only) / Troubleshooting / Re: How to show better error messages? on: May 12, 2009, 06:58:02 am
This is just to link in these other threads, which are about the same thing:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1242122448
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1235432803
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1233044085
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1225145000

7  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Blank error messages on: May 12, 2009, 06:54:17 am
Thanks all.  

Hacky fix: copy and paste the last command in the list you get from build.verbose into a terminal window and actually see the error messages.

Having raised the issue, the least I can do is to link all these threads together, which I'll do now.
8  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Blank error messages on: May 12, 2009, 06:16:37 am
Thanks - I had actually found build.verbose and upload.verbose in the preferences file and set them true.  It made no difference.  But in response to your post I discovered that, if you edit the file while the development environment is running, it overwrites it with the old values when you quit (which is actually understandable).  Lesson: quit, then edit.

Now I get a list of what it's doing, which is better:

avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega644p -DF_CPU=16000000L -I/usr/local/arduino-0015/hardware/cores/sanguino /usr/local/arduino-0015/hardware/cores/sanguino/wiring_serial.c -o/tmp/build23199.tmp/wiring_serial.c.o
.
.
.
avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega644p -DF_CPU=16000000L -I/usr/local/arduino-0015/hardware/cores/sanguino /tmp/build23199.tmp/Temporary_6723_3259.cpp -o/tmp/build23199.tmp/Temporary_6723_3259.cpp.o

But the bar still goes red at the end indicating that something's wrong, but no indication of what.

So I ran the last command in a terminal window, which - inter alia - gave me

In file included from /tmp/build23199.tmp/Temporary_6723_3259.cpp:18:
/tmp/build23199.tmp/cartesian_dda.h:163:2: error: #endif without #if

which allowed me to fix the problem.  But - despite setting all verbose values true - I still didn't get that rather important message in the development environment.
9  Forum 2005-2010 (read only) / Bugs & Suggestions / Blank error messages on: May 12, 2009, 05:00:48 am
I've had a bit of a search, and I can't find this, but I can't believe it's unique.

When I hit the Verify/Compile button in the development environment and there's something wrong with my program one of three things happens:

I get an error message telling me in which function the error is and what I've done wrong.  smiley

I get an error message telling me in which function some unspecified error is.  smiley-sad

I get no error message, but the error bar in the window goes red to tell me there's an error somewhere or other that could be anything.  >smiley-sad

In the last two cases, how do I find out what's wrong?

I get the same problems with a number of different devices in the Arduino family.  I'm running Arduino-0015 under Ubuntu.
10  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Occasional "Couldn't determine program size" error on: May 12, 2009, 06:59:11 am
This is just to link in these other threads, which are about the same thing:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1242122448
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1235432803
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1233044085
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1225145000
11  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Compiler errors not shown on: May 12, 2009, 06:58:31 am
This is just to link in these other threads, which are about the same thing:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1242122448
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1235432803
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1233044085
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1225145000
12  Forum 2005-2010 (read only) / Troubleshooting / Re: Power, Tx Rx all flash on power up on: September 13, 2010, 05:36:08 pm
Just checked - no debris in the plug or socket.  Blew it out with a compressed air line to make sure.  The other end of the USB cable snakes down behind a load of kit on racks to the back of the computer, so plugging and unplugging that end is a minor-house-move operation. smiley

I can make it work with the quick-connect trick, so I'm OK for now.  Thanks for your help.
13  Forum 2005-2010 (read only) / Troubleshooting / Re: Power, Tx Rx all flash on power up on: September 13, 2010, 05:27:10 pm
Yes - that's right.  A few minutes ago I discovered a fix: plug the USB cable in very very quickly (so quickly that one hurts one's fingers) or have everything already plugged in when you power up the computer.

From this I tentatively deduce that it is actually the plug and socket that's wrong, and that one of the power connections is making contact intermittently as they slide together, causing confusion as the processor powers up.
14  Forum 2005-2010 (read only) / Troubleshooting / Power, Tx Rx all flash on power up on: September 13, 2010, 12:43:40 pm
Hi

I have two (nominally) identical Arduino Megas.   One works fine, but when I plug the other one into the USB the PWR, Tx and Rx LEDs all flash at about 1 Hz for a few seconds, and then all go out.  That one doesn't work (i.e. doesn't establish a USB connection).

Can anyone tell me what that means, please?

Thanks

Adrian
15  Forum 2005-2010 (read only) / News / Arduino chosen for RepRap on: March 29, 2008, 01:13:36 pm
The RepRap project (http://reprap.org) has just chosen the Arduino for its future developments.

RepRap is a 3D printer that makes real solid plastic objects, so you can use it to make lots of useful stuff.  

RepRap can also print most of itself, so - if you have one - you can print another and give it to a friend.  That is to say, RepRap is a self-replicating machine...

Following the principles of the Free Software Movement, RepRap is being distributed at no cost to everyone under the GNU General Public Licence.  

Best wishes

Adrian

Dr Adrian Bowyer
http://staff.bath.ac.uk/ensab
http://reprap.org
Pages: [1]