Show Posts
Pages: 1 ... 279 280 [281] 282 283 ... 411
4201  General Category / General Discussion / Re: Arduino Uno and Motorola Xoom on: December 06, 2011, 12:07:25 pm
Does the Xoom's operating system support USB-based serial port devices?
4202  Using Arduino / Programming Questions / Re: LED display for web data on: December 06, 2011, 12:00:41 pm
Here is the relevant code without the libraries and variable section
The variable section is usually all that is needed when "this section of code works by itself but not with this other section." 

You have a *bunch* of constant character arrays (Strings) throughout your program and you are using the Ethernet library.  This significantly limits your RAM.  Which Arduino board are you using?  You might want to move ALL of your strings into PROGMEM:  http://www.arduino.cc/en/Reference/PROGMEM

Also, this is a cute function:
Code:
// Warn if we're running out of RAM
void low_memory_alert(){
  for(int i=0; i < 3; i++){
    int y = 1;
    int x = 0;
    disp.clear();
    drawString(x,y,"   MEMORY LOW!  ");
    disp.syncDisplays();
    delay(500);
    disp.clear();
    disp.syncDisplays();
    delay(500);
    disp.clear();
  }
}

When you are low on memory, you create a couple of variables and throw some stuff on the stack (the for loop)?  That seems silly.  But not nearly as silly as the fact that nothing in the program calls this function.
4203  Using Arduino / Programming Questions / Re: Mac - avrdude - Programmer not responding on: December 06, 2011, 11:48:13 am
I have the same problem. And until now it is not solved yet. smiley-confuse smiley-confuse

Uh, which problem?  The avrdude issue (for which there are tons of articles already on it) or the current issue?  The current issue is almost always a wiring problem.
4204  Using Arduino / Programming Questions / Re: Sketch not compiling under 1.0 on: December 06, 2011, 11:46:45 am
The sketch compiles under 0023, so I'm initially rulling that out.

Ruling what out? 

There were a significant amount of changes in 1.0 so it isn't a surprise that a library not specifically written for it, works.
4205  Community / Website and Forum / Re: This is an old picture, right? on: December 05, 2011, 08:13:33 pm
About the other comments, I'm really glad you're all so much smarter than me, you never make mistakes. It must be a great feeling.

Massimo,  the "mistakes" you made give Arduino a charm that almost no other project has achieved to this day.  I sincerely hope you understand that all of us who appreciate the platform couldn't have done the original design better than you.
4206  Using Arduino / Installation & Troubleshooting / Re: Problems uploading sketch from Macbook Pro on: December 05, 2011, 07:14:41 pm
I got a problem similar to ScottG:
Similar, but completely different.  The original poster is getting the generic sync error.  You are getting a very specific error.

ERROR MESSAGE:
___________________________start__________________________________________________

Serial port '/dev/tty.usbmodemfd121' already in use.  Try quiting any programs that may be using it.
Something is holding the serial port open.  Does this always happen or just after one upload works?

Drop to a terminal and run:
Code:
# lsof | grep usbmodem

This will list any applications/processes that currently have the modem/serial port open.  (Many times cellular data devices are the culprit.  They just like to latch on to anything that looks like a serial device.)
4207  Using Arduino / Programming Questions / Re: Float addition oddity on: December 05, 2011, 07:08:30 pm
I was able to get around the issue by separating the decimal part into a float value and the integer part into a long.
A side issue though - how does one display a 64 bit value in Serial.print ?

You can't use Serial.print as-is to print a 64-bit value.  The largest value that Arduino supports is a float which is 4 bytes.  That's 32 bits.
4208  Using Arduino / Project Guidance / Re: Help with eBay UNO and Nano purchase on: December 05, 2011, 04:58:13 pm
I'm just about to get starting learning Arduino, using the Orielly book.  I need to purchase an UNO and Nano.  I don't want to get a clone because I need to be able to follow EXACTLY with the book as I have zero electronics experience.

Actual distributors are listed here, you'll notice eBay isn't one of them:
http://arduino.cc/en/Main/Buy
4209  Using Arduino / Project Guidance / Re: Why won't my Arduino light up? Pics of my project included on: December 05, 2011, 04:09:15 pm
yeah, i see what you're saying.  bulb is too highly rated in wattage right?  

I have never once asked about Watts / Power.  I asked about and compared VOLTAGE.

Voltage is amount of pressure.  Current is the amount of electron flow.  Power is the product of both.

If you used a water analogy, a 120V light bulb connected to a 7V supply would be like pouring a bottle of water into one end of a fire hose.  What would you expect to come out the other end?  It would be practically nothing compared to what you would see when the same hose was connected to a fire hydrant. 
4210  Using Arduino / Project Guidance / Re: Why won't my Arduino light up? Pics of my project included on: December 05, 2011, 03:57:49 pm
Not sure. Package just says 4W/120V.  I have a second bulb (not in picture) that I can try that says 15W/120V.

So you are using a bulb rated for 120V (AC or DC?) with a 7.5V DC supply.

Hmmm.  Anything strike you as odd about those numbers?

4211  Using Arduino / Programming Questions / Re: coverting a concatenated string to float on: December 05, 2011, 03:54:31 pm
float heading = atof(compassheadingstring);

For reference:
http://www.cplusplus.com/reference/clibrary/cstdlib/atof/
4212  Using Arduino / Project Guidance / Re: Why won't my Arduino light up? Pics of my project included on: December 05, 2011, 03:44:29 pm
What is the voltage and current rating of the bulb?
4213  Using Arduino / Project Guidance / Re: Why won't my Arduino light up? Pics of my project included on: December 05, 2011, 03:33:08 pm
1.  Does the Arduino power up when just the external power adapter is attached?  If not, it could indicate the polarity is reversed on the plug.

2.  Does the light work if you connect it directly to Vin and Gnd?

3.  What code you using?
4214  Using Arduino / Programming Questions / Re: Float addition oddity on: December 05, 2011, 03:01:40 pm
So you are saying that the integer part positions can occupy the floating point positions?
That's the definition of floating point.  The decimal point can "float" throughout the number, it doesn't matter which side of the decimal the significant figures happen to be on. 

I've not seen this kind of behavior before.
You probably have seen this behavior before and not realized.  On other platforms the floating point data type might be large enough that you didn't run into this "issue."
4215  Using Arduino / Programming Questions / Re: arduino shuts down.. serial overflow? on: December 05, 2011, 02:58:37 pm
So I am using the TVout library, though I'm not sure you need to know much about it to solve my problem. Basically the arduino program works for about 1 second then shuts off. Is this a serial overflow or something?
What do you mean by "shuts off"?  Does your program seem to stop running or does the Arduino board actually manage to power down?

Code:
   if (Serial.available ())
    {
    TV.draw_circle(Serial.read() - 6, Serial.read() - 6, 6, 1 ); 
You should really be checking that Serial.available() is greater than 0.  While syntax is correct, you should keep in mind that Serial.available returns the number of characters in the serial receive buffer.

As AWOL points out, you are calling Serial.read() twice.  Each call to Serial.read() removes 1 byte from the buffer.  So if there was only one byte in the buffer, the 2nd call to Serial.read() will result in -1.  

Either you meant to read 2 bytes in which case you could wait until (Serial.available() > 2), or you wanted to use the same byte twice in which case you should create a variable like char byteIncoming = Serial.read().


Code:
 Serial.flush();
There really is no reason to call Serial.flush().  And as of 1.0 flush actually flushes the transmit buffer, not the receive buffer.
Pages: 1 ... 279 280 [281] 282 283 ... 411