Show Posts
Pages: 1 ... 308 309 [310] 311 312 ... 746
4636  Using Arduino / Project Guidance / Re: First project (not for the faint of heart) on: May 30, 2013, 08:33:24 am
What you're describing sounds remarkably similar to Firmata embedded in a web page, so you might want to look at that before you start designing your own version.
4637  Using Arduino / Programming Questions / Re: Cannot Change TCP Port on EtherTen on: May 30, 2013, 02:57:08 am
including ability to ping the IP address assigned to the Arduino.

Do you mean literally running the 'ping' command from a command prompt? I wouldn't expect that to be affected by the TCP port change. Are you carrying out the ping from a machine in the same network as the Arduino?
4638  Using Arduino / Programming Questions / Re: enable and disable a code on: May 30, 2013, 02:54:52 am
You have to decide how the two sets of behaviour will be combined.

For example, you might decide that the LED turns on at 100% brightness when the LDR input passes the threshold, and turns on at a brightness proportional to the analog input the rest of the time.

Then you need to write code to implement your chosen behaviour. For example:
if(ldrValue > ldrThreshold)
4639  Using Arduino / Programming Questions / Re: sudden change after hours - because of interrupt? on: May 30, 2013, 02:49:10 am
I assume know that cmd never can be larger.

My correction.
4640  Using Arduino / Project Guidance / Re: Stepper Motor + PulseIn (Arudino Pro Mini 328 16MHz) on: May 30, 2013, 02:46:00 am
PulseIn() is handy but forces you into a blocking design, which makes it awkward to do anything else at the same time.

An alternative is to use a pin change interrupt on the input: when the pin goes high record the time, when it goes low subtract the previous time from the current time to get the pules duration. Store the duration in a volatile variable so that it can be shared with the code called from loop(). At the point in loop() where you would normally call pulseIn(), just use the stored duration instead.
4641  Using Arduino / Project Guidance / Re: Simple project help on: May 30, 2013, 02:37:25 am
with the original board still in place be able to control the rc car with the arduino and in a sence "Hack" It

If by this you mean that the Arduino will override the original control system then the two control systems would be fighting each other and whichever had the more powerful drivers would win. It might work, it might not. It might damage something, it might not. If you want to modify the behaviour of an RC car then I think it would make more sense to wire the Arduino to pairs of male/female sockets for the RC servo connectors and pass the signals through the Arduino so that your sketch has an opportunity to modify them.

4642  Using Arduino / Project Guidance / Re: Manage SD files remotely from PC. on: May 29, 2013, 06:32:03 pm
But, I Not find "Arduino FTP Server"

Google says that somebody here is working on an Arduino 'Tiny FTP Server' which seems like the sort of thing you're after. There's no firmware there but hints that it is / will be published in a separate article. As long as your network adapter is capable of supporting two simultaneous TCP connections I don't see any reason why you couldn't write your own FTP server - the protocol isn't especially complex.
4643  Using Arduino / Programming Questions / Re: Reading 5 Serial port hex values and sending the hex read values to Serial1. on: May 29, 2013, 12:49:12 pm
There are umpteen ways to tackle the problem, but I'd do it like this:

I assume that you are free to define whatever encoding scheme you want, and that you have enough bandwidth available that you can afford this to have a small overhead.

Define a flag character - let's say zero (0x00) for the sake of argument.

Each message consists of a start flag character followed by five encoded bytes. The encoding scheme is that non-zero values are transmitted as-is, and zero values are escaped by preceding them with another zero byte. There are various error scenarios that can occur and they can be handled by some relatively simple rules, such as:

One flag character within a message is not valid and indicates that the message is corrupt; discard the current message and all subsequent input up to the next flag character.
After receiving a complete message, discard all subsequent input until the start flag is received, indicating the start of the next message.
4644  Using Arduino / Project Guidance / Re: Manipulating RPM signals using arduino on: May 29, 2013, 12:37:43 pm
I still have the issue of creating TWO seperate waves simultaneously, because only 1 tone() function runs per code.

No, tone() won't do it because it is a blocking function and can only output one signal at a time.

Your options are (1) use software to output both signals using the non-blocking approach demonstrated in 'blink without delay' - this is my recommendation, (2) set up timer interrupts to trigger your code at the required intervals and write interrupt handlers that switch the outputs to generate your output signals, (3) set up timers to generate the signals directly.
4645  Using Arduino / Project Guidance / Re: Please Help!! on: May 29, 2013, 12:34:06 pm
Thanks for the reply Peter im using a wave shield which is the problem

Presumably you know which one, and presumably it came with examples demonstrating how to use it. I suggest you run the examples and confirm everything works as you expect, then look at ways to incorporate them into your sketch.

And yes, the title of this thread is very poor and conveys no useful information. I suggest you change it to indicate the nature of your request.
4646  Using Arduino / Project Guidance / Re: a simple sample machine (as independent as possible) - any ideas ? on: May 29, 2013, 12:31:09 pm
My first thought is that big child-friendly buttons that illuminate when pressed could be implemented entirely in hardware, and the buttons and enclosure are the only part I'd expect to spend any money on. My second thought was that if you simply use each button to switch on some sort of cheap playback device then you could do it without any complex electronics. That could be a cheap old laptop with certain keys wired up to the switches and running a software synthesizer application, or something like those recordable greetings cards that play a short low quality sound track when they're opened.
4647  Using Arduino / Programming Questions / Re: sudden change after hours - because of interrupt? on: May 29, 2013, 11:23:45 am
The arrays are globals and have a constant to define size (more than 2x bigger than needed...).

Not all of them are globals, and not all of them are sized with a constant (and none of them explicitly allow space for a null terminator).

You only need one bug to cause the problem so you need to systematically eliminate potential bugs from all of your code. The techniques I described are intended to do that by addressing the risk of array overflow.
4648  Using Arduino / Programming Questions / Re: struct typedef compilation error on: May 29, 2013, 11:19:10 am
Why doesn't it apply to functions with only primitive arguments?

Because the IDE 'feature' that generates automatic function prototypes was not designed properly.
4649  Using Arduino / Programming Questions / Re: Communication with VS c++ 20100 on: May 29, 2013, 11:16:00 am
clearly there is something wrong with my code but clearly i can not figure out what exactly...

Apparently that was too subtle, so let me try it this way:

If you want help solving a problem with your code, you need to POST YOUR CODE.
4650  Using Arduino / Project Guidance / Re: Robotic Computer on Wheels on: May 29, 2013, 11:12:35 am
I love the concept, but having seen a few hospital wards and treatment centers and also having seen how difficult it is to make an autonomous robot work reliably even under ideal conditions, the idea strikes me as completely impractical.
Pages: 1 ... 308 309 [310] 311 312 ... 746