Show Posts
Pages: 1 [2] 3 4 ... 25
16  Forum 2005-2010 (read only) / Troubleshooting / Re: Function call overhead?? Speed problem on: August 26, 2009, 08:34:03 pm
I think madworm was trying to say this is hard to diagnose with pseudo code that won't compile.  Can you make example sketches that display the problem?  If it can't be reproduced in a simple example, it's hard to say it's not a problem elsewhere in your code.

I do believe the floating point calculations definitely will slow things down.  If you search around a bit, there are several clever methods to avoid having to use it.
17  Forum 2005-2010 (read only) / Troubleshooting / Re: Trouble with Ethernet Shield as a client on: August 28, 2009, 12:10:21 am
Are you sure about that ip?

Code:
byte server[] = { 64, 233, 187, 99 }; // Google

That doesn't ping for me.

Also, when posting code if you use the # icon it makes it much easier to read  smiley-wink
18  Forum 2005-2010 (read only) / Troubleshooting / Re: Arduino Ethernet Shield on: August 28, 2009, 12:15:11 am
Can you explain more about exactly what you want to do?
19  Forum 2005-2010 (read only) / Troubleshooting / Re: NewSoftSerial doesn't work on: August 12, 2009, 01:22:41 pm
Did you remember to connect the ground from the device to the arduino?
20  Forum 2005-2010 (read only) / Troubleshooting / Re: New laptop... Can't make Arduino go... on: July 28, 2009, 11:28:49 pm
You could try deleting or renaming the java folder in the Arduino folder as mentioned here.  This has worked for me before on a couple machines.
21  Forum 2005-2010 (read only) / Troubleshooting / Re: Arduino and Vista - need help on what to do next on: January 08, 2009, 09:49:38 pm
If you are missing entire directories, it sounds like something went wrong with your download.  Have you tried downloading it again?  Are you sure you extracted all files and folders from the zip?  Creating empty files will not make it work, obviously you need the data too!
22  Forum 2005-2010 (read only) / Troubleshooting / Re: Trouble with a Sanguino on: November 21, 2008, 06:50:38 pm
Providing information about your computer/operating system would make it easier for people to help you.
23  Forum 2005-2010 (read only) / Troubleshooting / Re: Test sketch not uploading on different compute on: April 16, 2008, 05:17:35 pm
Did you install the ftdi drivers?
24  Forum 2005-2010 (read only) / Troubleshooting / Re: LCD Help. on: November 30, 2007, 06:00:34 pm
This should get you pretty close to what you want.

Code:
int val[10];               // variable used to store data from serial port
int ByteCount = 0;

void setup() {
  Serial.begin(9600);         // connect to the serial port
  Serial.println("Arduio Online");
}

void loop() {
  if (Serial.available() > 0) {
    delay(100);
    while (Serial.available() > 0) {
      ByteCount ++;
      val[ByteCount] = Serial.read();
    }
  }
  
  if (ByteCount > 0) {
    for (int i = 1; i <= ByteCount; i++) {
      if (val[i] >= '0' && val[i] <= '9' ) {
        val[i]= val[i] - '0';
        Serial.print(val[i]);
      }
    }
    Serial.println();
    ByteCount = 0;
  }
}
25  Forum 2005-2010 (read only) / Troubleshooting / Re: usb port speed (shift out) too slow? on: August 20, 2007, 05:50:47 pm
I suspect you are running into some timing issues associated with the digitalwrites in the old style shiftout.  Shiftout is now included in Arduino, take a look here to see an example.  The 595 tutorial has not been updated yet.
26  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: SD lib:SD.exists() returns TRUE if SD is removed on: January 10, 2011, 11:23:08 am
That's still something that is better handled by your application.  If needed you could attach an interrupt to the CD pin and handle it that way.  But as was mentioned, if the card is pulled while an action is in process you may still have problems.
27  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Strange atol results with char array on: September 14, 2010, 09:31:46 pm
Good to know.

Any reason why the compiler should not add the null terminator?  Basically, I'm wondering if this is a bug or a feature.
28  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Strange atol results with char array on: September 14, 2010, 05:58:02 pm
Interesting, that does work.  Thank you.  From looking at the array reference page I thought that the compiler added that when the array was declared.

http://arduino.cc/en/Reference/Array

It also works if I use:
Code:
char testChar1[3] = {'5', '0'};
char testChar2[3] = {'9', '9'};
29  Forum 2005-2010 (read only) / Bugs & Suggestions / Strange atol results with char array on: September 14, 2010, 05:34:07 pm
I'm getting some strange results when using atol depending on when I declare an array.

Code that fails:
Code:
long testVal1;
long testVal2;

void setup()
{
  Serial.begin(9600);
  Serial.println("Ready");
  
  char testChar1[] = {'5', '0'};
  char testChar2[] = {'9', '9'};
  testVal1 = atol(testChar1);
  testVal2 = atol(testChar2);

  Serial.println(testVal1);
  Serial.println(testVal2);

}

void loop()
{

}

Results:
Code:
Ready
5099
99

Code that works:
Code:
long testVal1;
long testVal2;

void setup()
{
  Serial.begin(9600);
  Serial.println("Ready");
  
  char testChar1[] = {'5', '0'};
  testVal1 = atol(testChar1);
  char testChar2[] = {'9', '9'};
  testVal2 = atol(testChar2);

  Serial.println(testVal1);
  Serial.println(testVal2);

}

void loop()
{

}

Results:
Code:
Ready
50
99

Am I missing something?
30  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Support for ctrl+ins and other std windows keys on: August 09, 2010, 09:28:13 pm
Tim, I'm not trying to be negative, I'm trying to point your energy in the right direction.  The Arduino IDE team has already stated that the way to get this into the IDE is via Processing.  I don't use these shortcuts, but I can't see how they will hurt to include them.  If you hang around for a while you will find that nothing happens overnight when it comes to the IDE.  This is generally a good thing that prevents patches from creating more bugs.  Here is a link to the Processing site:
http://processing.org/
Pushing over there will get your shortcuts in faster than here.  That is all I was trying to tell you.  If you look at my post count, you'll see that I do not post simply to elevate my status.
Pages: 1 [2] 3 4 ... 25