Show Posts
Pages: 1 ... 278 279 [280] 281 282 ... 411
4186  Using Arduino / Programming Questions / Re: 1.7" OLED Display Shield and Arduino 1.0 on: December 06, 2011, 06:19:36 pm
If you are just getting started, roll back to 0022 or 0023.  1.0 has only been, officially, out for a couple of days.

A few weeks on the older branch probably makes more sense.  Just about all tutorials and code examples available right now will work just fine.  The experience you gain will transition nicely to 1.0 (or maybe by that time, 1.1).
4187  Using Arduino / Installation & Troubleshooting / Re: Serial communication Arduino on: December 06, 2011, 03:52:20 pm
The DC voltage for a high (1) is 5V. 

However, if the pin is transmitting it means the signal is toggling 0 to 5 to 0.  On average, this means you would measure a DC voltage of 2.5V.  It is not surprising you see 2.7V.

You really an oscilloscope to see the full voltage.
4188  Using Arduino / Installation & Troubleshooting / Re: Is the driver for windows unable to set certain baud rates on: December 06, 2011, 03:50:19 pm
The problem is probably not with the PC side but with the Arduino itself.  The baud rate is a multiple of the 8u2's clock.  So some baud rates might not divide out in a way that works well.
4189  Using Arduino / Microcontrollers / Re: ATMega 168 Vs 328 on: December 06, 2011, 02:30:22 pm
What are the major differences between these 2 beside the flash side  and ram i?
That's the only difference.

RAM:  1k vs 2k
FLASH:  16k vs 32k
EEPROM:  512bytes vs 1k
4190  General Category / General Discussion / Re: Arduino Uno and Motorola Xoom on: December 06, 2011, 02:22:53 pm
All I would like to do
Keep in mind that there are many (many) layers of software, drivers, firmware, and even hardware at play to make an Arduino work with a PC.  Many of those layers have over 10 years of legacy attached to them.  Tablet operating systems don't necessarily carry of that legacy with them.

connect  my Uno to my Motorola Xoom (via usb , as I have the attachment with the USB port on the end, like the camera attachement).
If your Xoom doesn't have drivers for a USB to Serial device (which is what the Arduino appears as to a host) then connecting it won't do any good.  It is possible it does, but I don't know enough about the Xoom's implementation of Android to know that answer.  Besides, unless you are running an application that takes to the serial port, what would you expect your Xoom to do when an Arduino is connected?

Once connected I just need my "Android App" to turn on and turn off a relay connected to my UNO. I thought it would be possible to do all of this WITHOUT a USB host shield!...
I'm not sure I understand where a host shield comes into play?  A host shield would be used so that you could connect USB devices to an Arduino.   In this case your Arduino is the device and the Xoom is the host.
4191  Using Arduino / Programming Questions / Re: 1.7" OLED Display Shield and Arduino 1.0 on: December 06, 2011, 01:30:58 pm
The code works in Arduino 0.22 but not 1.0.
Can anyone tell me why please?
Yes, 1.0 has major changes compared to 0022. 

You can try adding "#include <Arduino.h>" to the top of your sketch.  However, since the library makes use of the Serial library you probably need to contain the library's author to see if they are working on a version compatible with 1.0.
4192  Using Arduino / Programming Questions / Re: LED display for web data on: December 06, 2011, 01:09:25 pm
and functions aren't used.  I will look into storing variables as program memory. I'm currently using a Duemilanove 382 with an ethernet shield, but would like to use the integrated AruinoEthernet.

You mean a Duemilanove which uses a ATmega328.  That only has 2K of RAM.  Every global variable declared will consume memory as well as each String, such as:
    client.println("GET #########");
will also consume RAM.

This array:  "char defaultText[numLines][40]"  takes up 120 bytes.  That's 12% of your total available SRAM on a single array, not to mention all of the other stuff you are doing.
Then you have this string:  "String charLookup  = " 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*(),-.?></\\|[]_=+:'\"{}";"
That's another 100 bytes, so now 20% of the RAM is gone and your program hasn't even started doing anything yet!

You need to move all of your Strings to PROGMEM (link already provided.)

Every LCD or Serial print needs to come out of PROGMEM, other wise, the string will use up RAM.
4193  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?
4194  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:

Also, this is a cute function:
// 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;
    drawString(x,y,"   MEMORY LOW!  ");

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.
4195  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.
4196  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.
4197  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.
4198  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.


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:
# 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.)
4199  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.
4200  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:
Pages: 1 ... 278 279 [280] 281 282 ... 411