Show Posts
Pages: 1 ... 300 301 [302] 303 304 ... 748
4516  Using Arduino / Programming Questions / Re: Programming without Arduino on: June 07, 2013, 08:00:45 am
For uploading you only actually need the Rx part of the serial circuit.

Have you confirmed that your circuit correctly converts the RS232 active and inactive states to the corresponding TTL states?

Do you know what frequency the 328p is running at? (Do you even know for sure that your circuit is complete? If it's configured to use an external clock and you don't provide one, you're wasting your time.)
4517  Using Arduino / Programming Questions / Re: Arduino Function on: June 07, 2013, 07:57:15 am
Do you mean you want to evaluate the function for some specific sequence of values for X, Y, Z, D, Y', Z', D'? Do you have the input values, and if so in what form? What are you planning to do with the result?
4518  Using Arduino / Project Guidance / Re: cmucam on: June 07, 2013, 07:53:48 am
If your BEC outputs the correct voltage for the device and supports the maximum current the device will draw then it would be OK to power it through the BEC.
4519  Using Arduino / Programming Questions / Re: Error: ISO c++ forbids declaration of ... with no type on: June 07, 2013, 07:51:17 am
What does the error "ISO c++ forbids declaration of InPin with no type", where InPin is a int variable, mean?

It means that InPin has been declared with no type, and ISO c++ forbids that.

Presumably you didn't mean to declare it with no type. Perhaps if you posted your code somebody would be able to spot how you ended up doing that.
4520  Using Arduino / Programming Questions / Re: How to input arduino's data to database via wifi on: June 07, 2013, 07:48:06 am
I'm not sure if the arduino supports the POST method

How hard could it be to type "POST" into the HTTP request header?
4521  Using Arduino / Programming Questions / Re: Serial output changing when receiving on Serial1 and sending on Serial2. on: June 07, 2013, 07:41:33 am
Not to put too fine a point on it - that code looks completely nonsensical and most of it seems unrelated to the behaviour you described.

Why don't you just:

Test whether an input character available.

If available, read it, calculate the corresponding output character and output it.

Get rid of the for loops, and the zero sized array, and all the other baggage.
4522  Using Arduino / Programming Questions / Re: Arduino Function on: June 07, 2013, 07:38:05 am
What do you mean by 'solve'?
4523  Using Arduino / Project Guidance / Re: Proximity sensor project on: June 06, 2013, 05:59:45 pm
I think my biggest concern would be that the vehicle is likely to be operating in a very dusty environment and I don't know how well the ultrasonic proximity sensors will work when caked in dirt.
4524  Using Arduino / Project Guidance / Re: Movement, position sensor advice. on: June 06, 2013, 05:32:51 pm
You seem to be ruling out all the practical options of using direct position sensing to measure where the object is. It would be worth making absolutely sure you have to rule those out, because this feels like a problem that could be made much easier with just a bit of lateral thinking. However, without having any idea of the actual constraints you're working within we can only take what you say at face value and accept that you cant attach anything to anything.

Given those constraints, the way I'd solve this is with an external optical sensor which detected the position of the box. Either a simple beam-breaking system or, if you've going to introduce constraints that prevent that, then with a camera and image processing solution.
4525  Using Arduino / Programming Questions / Re: Demo sketch wnt compile on: June 06, 2013, 05:25:58 pm
And you didn't post the code in code tags.
4526  Using Arduino / Programming Questions / Re: This should be a quick fix (tilt return to neutral) on: June 06, 2013, 05:25:02 pm
You have neglected to include the definitions of the global variables you use in your code. I will guess that your tilt sensor is returning float values.

If you want to smooth the returned values, you can just use an decaying average for each value you read from the sensor - that only needs one global/static variable for each value, and no re-reading.

The second part of your problem is that you want to wait until the input returns to center before you accept another input. To do that I'd define an enumerated type with values for each possible position, and a global/static variable holding the current reported position. Each time your function to read the state is called, you will read the device and recalculate the smoothed values, determine the instantaneous position (as an enumerated value) by comparing the smoothed values against your thresholds, and compare the instantaneous position against the reported position to decide whether to update the reported position. Finally, return the current reported position.

I'd implement that with one function to read the sensor and smooth the values, another function to do the threshold comparisons and return the position as an enumerated value, and finally the function which is called to update and return the currently reported position. All together you would be looking at about a dozen lines of code.
4527  Using Arduino / Programming Questions / Re: Comparing two bytes - weird behaviour on: June 06, 2013, 05:15:17 pm

There is something wrong with your code - probably a part that you didn't show us.
4528  Using Arduino / Programming Questions / Re: Two SPI Devices w/ Different Phase on: June 06, 2013, 05:13:02 pm
IMO if the hardware abstraction layer had been designed properly, it would have been possible to subclass and define additional instances of the objects representing the various I/O channels transparently to the libraries that make use of them. The implementation looks almost as if the designers have gone out of their way to prevent that - or at the very least not considered it.
4529  Using Arduino / Project Guidance / Re: Map Builder Robot on: June 06, 2013, 05:09:09 pm
sends data about its position

How does it know its position?
4530  Using Arduino / Project Guidance / Re: Network Monitoring of different computers on: June 06, 2013, 05:07:04 pm
Write locally and read remotely is the better option imo.
Pages: 1 ... 300 301 [302] 303 304 ... 748