Show Posts
Pages: 1 2 [3] 4 5 ... 746
31  Using Arduino / Project Guidance / Re: Real Time Image processing timing problem on: April 16, 2014, 04:46:13 pm
Sorry if my english is bad I hope I'm clear.

Your English is fine but it sounds like a complicated system and it is unclear exactly how you intend it to work.

I assume you're asking about the Arduino part of your solution. Can you describe what the Arduino does currently (in terms of the sequence of inputs it receives and actions it takes) and then describe what you want it to do in the same terms?
32  Using Arduino / Project Guidance / Re: send url using a switch.? on: April 16, 2014, 04:43:09 pm
If you post your code, perhaps somebody will be able to spot the cause of your problem.
33  Using Arduino / Project Guidance / Re: Blocking -VDC on: April 16, 2014, 04:41:01 pm
I need to read what direction a shaft is spinning ... I have found some information on rotary encoders but have not found one that seems like it will be durable enough

A rotary encoder seems like a much more obvious solution than a motor/dynamo etc. What environment will it be in? I would have thought that even simply putting an encoder wheel wherever you were proposing to put the motor would give you a simpler and more reliable solution, but depending what you are trying to measure the rotation of there may be even better possibilities open to you.
34  Using Arduino / Project Guidance / Re: Speed Calculator Project on: April 16, 2014, 02:26:54 pm
I could tell where the vehicle is coming from (i.e which direction), the speed, and vehicles/min

Will the above code do this? 

No, I don't think so.

I think you want to detect the initial rising edge for each input, and record the time it happens, and then when you have seen both rising edges compare the two times to work out direction and speed. Then wait for long enough for both inputs to settle, and finally go back to the idle state where you're looking for the next rising edge. It could look roughly like this:

// incomplete, uncompiled

int leftValue = analogRead(leftSensorPin);
if((leftTime == 0) and ((leftValue < 400) or (leftValue > 600)))
   // left pulse detected
    leftTime = millis();
if((rightTime == 0) and (digitalRead(rightSensorPin) == HIGH))
    // right pulse detected
    rightTime = millis();
if((leftTime > 0) and (rightTime > 0))
    // both signals detected, determine direction and speed
    speed = distance / (rightTime - leftTime); //positive speed means left-to-right, negative means right-to-left
    count++; // I don't know whether you want to count each direction separately

    delay(500); // wait long enough for both sensors to settle down
    leftTime = 0;
    rightTime = 0;
35  Using Arduino / Project Guidance / Re: send url using a switch.? on: April 16, 2014, 11:13:23 am
Create a function containing the client logic from your example client sketch. (Leave out the exit() call at the end of the function.)

Put the function (and any global data it requires) in your web server sketch.

Make any changes you need to that so that it carries out the HTTP request that you want.

Call that function at the point you want that request to be performed within your web server sketch.
36  Using Arduino / Project Guidance / Re: Log FuelFlow -Reading 4 frequency inputs (digital on/off) and logging to SD card on: April 16, 2014, 11:07:40 am
EDIT: added updated sketch

Are you sure you attached the right version? I don't see the changes you described above.
37  Using Arduino / Programming Questions / Re: Boat autopilot - PID not centralizing rudder. on: April 16, 2014, 08:57:24 am
As long as the wind vane (PIDInput) is a bit in front of the jib (and the rest of the boat), it should not be affected by the boat itself.

See Robin2's first paragraph in Reply#24.
38  Using Arduino / Programming Questions / Re: Pulse train comparrison/matching on: April 16, 2014, 08:54:06 am
Are you saying that when there is no smoke detection there is no signal, and when there is smoke detection there is the signal you displayed above?

Does the device also put put any other signals that you need to identify as NOT being a smoke detection signal?
39  Using Arduino / Programming Questions / Re: multiple buttons on analog input on: April 16, 2014, 08:51:39 am
Look at the StateChangeDetection example sketch.
40  Using Arduino / Programming Questions / Re: Webcam on: April 16, 2014, 08:49:54 am
Well, to be more precise, I can't use wifi because my project is a boat or ship, and I'm using GPS, so, I'll need an open area for it, and most likely, I might not find a wifi in that area, so, what's the plan in this case ?!!.

Did you read the second paragraph in my reply, that started "If that isn't possible ..."?
41  Using Arduino / Programming Questions / Re: Reading / Printing Dallas OneWire Temperature Sensors on: April 16, 2014, 08:48:16 am
use memcpy() to copy the address from one place to another.

That definitely looks as if PaulS has spotted the problem. However, rather than copy the address via a temp variable, I suggest you put the result in the right variable in the first place. The best way to do that is to put your address variables in an array and use the device index as the array index.
42  Using Arduino / Project Guidance / Re: Video-out to a 640x480 LCD display on: April 16, 2014, 08:43:12 am
You won't be able to do that using an Arduino microcontroller. You need far more memory and processing speed than a microcontroller can provide. You might be able to do it using one of the recent hybrid Arduinos which have a small PC embedded but a compact computer such as RPi or BeagleBone Black would seem like a more sensible approach. Even so, you will probably end up needing to create your own video adapters to connect between the input and output devices. This strikes me as an extremely advanced project.
43  Using Arduino / Project Guidance / Re: Speed Calculator Project on: April 16, 2014, 08:37:35 am
There are a couple of ways you could tackle this problem.

If you know which order you expect the two events to occur, you can use a simple blocking approach. This is simplest to understand but gives you a fairly restrictive solution. Restructure your code so that it works like this:

Wait for first input event to occur.
Record time of first event.
Wait for second input event to occur.
Record time of second event.
Do any calculations you need from these times.
Wait long enough for both sensors to have returned to idle state.

The second approach is to use a non-blocking approach. This is a bit more complicated but gives you a much more powerful solution. With this approach you would poll both inputs, and use the sort of logic demonstrated in the debounce example sketch to ignore subsequent changes in the input until it had settled.

44  Using Arduino / Project Guidance / Re: Arduino using telnet on: April 16, 2014, 08:25:16 am
Was my answer to the OP's question incorrect as he implies ?

I think you answered the question that was asked - but the OP has now asked a completely different question.
45  Using Arduino / Project Guidance / Re: Simple Finger Switch on: April 16, 2014, 08:22:22 am
It may be that in your previous testing you had a hidden wiring fault which left the input pin floating when you weren't touching it. In that case it would be very easy for merely touching the wire to alter the input state - but it would be very difficult to get that working reliably. It would be possible to set up a capacitive sensing input, but not using the sort of pull-up circuit you have been using until now.
Pages: 1 2 [3] 4 5 ... 746