Show Posts
Pages: 1 ... 282 283 [284] 285 286 ... 405
4246  Using Arduino / Programming Questions / Re: Newbie - Java Question on: November 16, 2011, 06:52:49 pm
One of the examples on the Arduino app itself was the simple blinking LED on pin 13. So I thought that would be a good place to start trying to write in Java.

Write what?  The Arduino runs C++ code complied with avr-gcc.  That complied hex is loaded into the ATmega's program memory (aka flash) with a utility called avrdude over a virtual serial port.  The micro is reset and it starts running.

I'm confused how you writing something in java fits in there.
4247  Using Arduino / General Electronics / Re: How do laser rangefinders work? on: November 16, 2011, 06:14:34 pm
Remember that a timer is just a counter.  So it isn't (relatively) difficult to design and manufacturer a counter that runs at gigahertz speeds.

Also, they don't have to be digital.  You could charge a precision capacitor and measure the voltage, as another example.  (this is how high speed pulse triggers work in modern digital oscilloscopes.)

You could potentially interleave counters to get a higher effective resolution, again, a technique used by modern digital oscilloscopes.  (they have digitizers that run up to 100Gigasamples/s, which are many digitizers interleaved).

I would also imagine these devices are taking many, many readings and averaging to account for some drift in the components used.

Don't get wrapped up in the numbers. The techniques used are simple, just at a very fast speed...

If a timer is that fast then we could use a coil of fibre optic cables as a form of memory storage by measuring the cable and finding the smallest pulse size capable with the clock and then fill up fibre
You could, but that would be an expensive form of memory. If you think of dram, it works in a similar way.  Charge up a cap, measure the voltage.  Periodic refreshing is needed.  Same idea you have, but with light.
4248  Using Arduino / General Electronics / Re: NFC - what's needed? on: November 16, 2011, 03:57:47 pm
There is absolutely no need to cross-post in this (or any) forum:,74087.msg597148.html#msg597148

Your questions can't be answered unless you explain what you are trying to do.  How you are going to use the devices matters in questions like these.
4249  Using Arduino / General Electronics / Re: How do laser rangefinders work? on: November 16, 2011, 03:53:09 pm
Can't do this with DSP with hardware that I know of, at least not with a naive implementation. Any idea how they pull it off?

Why not?  This isn't about DSP as much as it is about accurate timing.  Start a timer, send the light and then stop the timer when light comes back.  Subtract to determine the distance.  Your accuracy is limited by the speed of the timer you run.
4250  Using Arduino / Programming Questions / Re: Twitter Library on: November 16, 2011, 11:30:45 am
I had no problem downloading it either.

I did notice parts of the Arduino web site were broken last night.  Maybe it was a temporary issue?
4251  Using Arduino / Installation & Troubleshooting / Re: Upload issues - Mac OS X 10.4.11, Arduino IDE 0022 on: November 16, 2011, 09:53:20 am
 NOTE: had to delete Arduino 0022 and reinstal.  Appears that first use of Arduino IDE may install
    some libraries elsewhere - simply rebooting into 10.5.8 and running the same IDE as was used
    under 10.4.11 resulted in a missing lib error.
Conclusion: unknown OS X 10.4.11 specific issue

The IDE doesn't install any kind of libraries, system files, or extensions.  Searching the forum, you will find there are known issues with the Uno and 10.4.11.  Sometimes manually resetting works, sometimes it doesn't.
4252  Using Arduino / General Electronics / Re: Chips bought on eBay ... likely to be faulty? on: November 16, 2011, 09:14:58 am
Very few consumer-focused companies do any testing of the incoming components.  The cost to setup the testers is outrageous for the return.   Plus almost no consumer-focused does their own builds anymore.  They all rely on contract manufacturers, few who have the expertise to develop the kind of screening necessary.

These surplus reels of faulty components are coming from the original factory.  Rejects go into a bucket (literally).  When a reeling machine goes offline, someone takes the bucket over to it, reels some parts, and prints a label. 
4253  Using Arduino / Installation & Troubleshooting / Re: External Power = ok , USB Cable = Low Voltage out , USB Transfer is OK on: November 15, 2011, 07:28:36 pm
If USB Voltage is low, then check the voltage drop of the Poly Fuse (gold thing near the USB connector.)  If it is dropping *any* voltage, that means you are drawing at least 500mA from USB.
4254  Using Arduino / General Electronics / Re: Chips bought on eBay ... likely to be faulty? on: November 15, 2011, 07:24:18 pm
Perhaps the devices are sensitive to static discharge?  (Just because you don't feel or see a spark doesn't mean one didn't happen.)  In which case, simple handling might have damaged them.

Would possibly the eBay seller have got a batch of rejected chips and be trying to pass them off as "brand new, in working order"?
This sounds the most likely to me.  It is possible the eBay seller is unwittingly pawning off faulty components.

When buying components from an untraceable source, counterfeits are always possible.
4255  Using Arduino / Programming Questions / Re: ardu source code in HTML format on: November 15, 2011, 03:39:26 pm
[quote author=Fanastron link=topic=79030.msg597623#msg597623 date=1321385018]
I do what u say, but here is the result
No, you didn't. 

Web browsers have no idea what "style=code" means, unless you tell it.

Every (modern) web page loads a stylesheet along with the HTML.  The stylesheets for the forum define what "code" means and how to display it.  You need to take the code section of the forum's stylesheet (and potentially other pieces of CSS that match) and create your own stylesheet.  You can either a) add it to your exist css file, b) create a new one, or c) put it between "style" tags in the HTML's head.
4256  Using Arduino / Programming Questions / Re: Is this a bug? on: November 15, 2011, 10:06:26 am
As for the code, do you mean the original? I didn't want to post 1600 lines of code - anyway, in trying to figure out what was going on, I boiled it all down to the example given - which seems to be acting oddly.

Let me use the analogy of visiting a doctor.  Posting only a bit of code is like going to the doctor and saying "Here is what is wrong with me, please prescribe something."  No Doctor I have ever visited let that pass.

You might be right about the code that is acting up.  The trouble is, if you are running out of RAM then the code snippets you are posting may very well be just fine.  When a microcontroller runs out of RAM its behavior becomes unpredictable.

Attaching your .pde to a post is an option.

Keep in mind the Mega 2560 only has 8K of RAM.  Each string (and variable) you use, consumes RAM.  If you are using the Ethernet library that takes a healthy chuck of RAM as well.
4257  Using Arduino / Programming Questions / Re: ardu source code in HTML format on: November 15, 2011, 09:44:16 am
But how can ı fix the size of the container?
The IDE won't help you do that.  You'll need to find the appropriate HTML and CSS.

This forum has plenty of examples of what you want to do.  You just have to look at the source of a post using the code tags.
4258  Using Arduino / Programming Questions / Re: Problem involving Serial on: November 14, 2011, 04:13:48 pm
I tried both suggestions. Neither worked. Actually, this is the first time I had tried doing anything involving serial. I'm trying to resolve this issue now, since I will be doing other things involving serial.
Your problem is related to programming the Arduino's flash.

The fact that the sketch includes anything involving serial is likely to be unrelated.
4259  Using Arduino / Programming Questions / Re: Problem involving Serial on: November 14, 2011, 02:13:32 pm
The error itself is a generic message.  Google will quickly confirm that.  The error is exactly what it says, avrdude (the program that does the actually programming) wasn't able to talk to the programmer (the bootloader on the Uno.)

Did this error start after you were already doing something else with serial?  Sometimes it is possible for the ATmega328 and the 8u2 (serial to usb converter on the Uno) to get screwed up when serial data is sent too soon.

First, try manually RESETing the board (with the push button) when uploading code.  Press the button 1-2 seconds after the "Sketch Size" message appears.

If that doesn't work, then try disconnecting the board from power.  Press and hold RESET.  Connect to power while holding reset.  Then release RESET 1-2 after the "Sketch Size" message appears.

The idea behind the 2nd method is that it holds the ATmega328 in RESET so that it never sends anything to the 8U2.  This gives the 8U2 a chance to start the re-programming process.

4260  Using Arduino / Project Guidance / Re: "Load mapping" SRAM memory use in Arduino? on: November 14, 2011, 02:03:07 pm
Last thing of mention is that you only want to store things in PROGMEM that are read-only.  Writing to flash does have a limited number of times it can be reliably performed (1,000 writes to any given address on the ATMega family I believe) so keep that in mind before you optimize too deeply.  Reads are unlimited.
PROGMEM (aka FLASH) is rated at 10,000 write/erase cycles.  This is a pretty hard limit to hit in a reasonable amount of time since it is directly tied to the user uploading new code.

The EEPROM (256-1kbytes depending on the ATmega) is well over 100,000 cycles.
Pages: 1 ... 282 283 [284] 285 286 ... 405