Show Posts
Pages: 1 2 3 [4] 5 6 ... 52
46  Using Arduino / Programming Questions / Re: clear screen/ flushing the serial monitor. on: September 19, 2012, 09:45:09 am
The serial monitor does have a maximum buffer size, and once it hits this size, it will grow no larger (instead, dumping old data in the window as new data comes in).  This max buffer size is relatively large with respect to occasional serial data coming in, but it shouldn't cause any sort of memory issue unless you are working on a seriously memory constrained computer.
47  Using Arduino / Programming Questions / Re: Creating Libraries from sketches? on: September 19, 2012, 09:01:32 am
A couple recommendations:

Using delay() in any sort of sketch that needs to be responsive and handle multiple tasks is just a bad idea.  Don't do it.  Blink without delay is the proper way of timing actions without blocking other activities.

Implement a state machine for your rover.  Google it, Wiki it (don't get caught up in complicated state machine patterns, you just need a switch/case based state machine).  If you have trouble with implementation come back and ask some questions.  The state machine itself should be pretty simple.  Incorporating it with millis() based timing (ie Blink without delay) is a little more involved, but still not really complicated.
48  Using Arduino / Programming Questions / Re: Creating Libraries from sketches? on: September 19, 2012, 08:17:07 am
My calculations would make it about 2.5 seconds, as the loop should run for 25 cycles... (the loop is stepping in 10s...)

I'll try running it later, and timing it to see if there is a point at which it moves to the next function...

Many thanks

So for 2.5 seconds, your rover is going to accelerate forward with no ability to abort?  Does that really seem like a good idea?
49  Using Arduino / Programming Questions / Re: Get out of a loop / goto: on: September 19, 2012, 07:17:45 am
It has to delay for 15 seconds it will just scroll through each display at lighting speed and no one would see anything.

I understand that, and what I'm telling you is that if you delay(15000), you will not be able to do anything else at all during those 15 seconds.  There are other methods of causing portions of your sketch to wait 15 seconds while the rest of the sketch continues to execute.  Blink without delay is one of those methods.  Look at it.  Learn it.  Use it.
50  Using Arduino / Programming Questions / Re: toward RC CAR on: September 19, 2012, 07:15:23 am
if(joyh >= 410 || joyh <=450)

This should be:

if(joyh >= 410 && joyh <=450)

The former will be true for ALL values of joyh, the latter will only be true when joyh is between 410 and 450.
51  Using Arduino / Programming Questions / Re: Get out of a loop / goto: on: September 19, 2012, 07:04:14 am
Using an actual loop instead of goto is the first step.

The second step is to NOT use delay().  While you 'delay()', you can do nothing else.  So, since you want to do something else (in this case, monitor for a button push), you have to eliminate all your delays.

Look at the blink without delay sample for the recommended method of doing this.

On a side note, I think it's a little absurd that the TVout library implements it's own method of delay().  Utterly pointless.
52  Using Arduino / Motors, Mechanics, and Power / Re: Need your approval for right motor shield on: September 18, 2012, 07:04:09 am
.6A is greater than .4A.  So why would you worry about the motor burning out the controller?
53  Topics / Robotics / Re: Optical encoding with Sabertooth 2x25 broken on: September 17, 2012, 01:08:53 pm
I was afraid of wiring the ground on the arduino to the 12v ground. But it sounds like that is the right thing to do?

Nothing to be afraid of there.  It is the right thing to do and it is necessary to do.  So long as you keep the positive lines separate, you will be fine.
54  Topics / Robotics / Re: Optical encoding with Sabertooth 2x25 broken on: September 16, 2012, 12:22:36 pm
Should I ground the Arduino to the batteries?

That question in particular makes me go hmm.  Are you using multiple power sources (batteries, power supplies, whatever)?  If so, you have to make sure you have a common ground for everything to work properly together.  On the flip side, you don't want to get carried away with tying all sorts of grounds together or you could create a ground loop that will also be a source of noise.

If you're using two batteries, tie their grounds together, then send this common ground to each device that needs power, and of course tie the positive of the appropriate battery to each device as well. One battery will power the Sabertooth motor controller, and the other will power the Arduino and encoder.  Do not tie grounds together between devices though.
55  Using Arduino / Programming Questions / Re: How to save a constant updating value on: September 14, 2012, 01:31:55 pm
The MPU-6000/6050 have an integrated IMU processor.  All you have to do is read the heading data output on the I2C.

What did you kinda get working?  and what problems did you run into?

This should be a good starting point for working with any of the MPU-6050 breakout boards:
56  Community / Bar Sport / Re: Interstellar Travel on: September 14, 2012, 12:36:58 pm
Whether you live on that little imaginary island or living on a planet in an empty region of the Milky Way, the arguments are similar.

The arguments are indeed similar, but the scales are completely and utterly out of whack.

That author needs the same reality check.  These people clearly have little comprehension of just how far a light year really is.  May as well start planning intergalactic travel.  After all, what's a few more orders of magnitude?

Let's master intrastellar travel before we put any focus on interstellar travel.
57  Using Arduino / Programming Questions / Re: How to save a constant updating value on: September 14, 2012, 12:03:34 pm
In all likelihood you are going to need both to accomplish your goal.  Either by themselves are inadequate (for different reasons) for tracking angular position.  Put the two together though, and they can compensate for their separate inadequacies and provide a decent IMU.
58  Community / Bar Sport / Re: Interstellar Travel on: September 14, 2012, 07:37:55 am
Their reality check needs a reality check of it's own.

The trip to the moon was about 240k miles one way.  That's about 10 times the circumference of our planet.  Fairly comprehensible numbers.

The trip to our nearest star (Proxima Centauri) is about 4.3 light years, or 252,700,000,000,00 miles.  That's a bit over 100 million times the distance to our moon.  To put it another way, the logistics of making a trip to Proxima Centauri are about 100 million times more challenging than making a trip to our moon.

We need some incredible, ie revolutionary, breakthroughs in Research and Development.  I can understand the desire to reach for the stars, but we haven't even put a man on another planet in our own Solar system yet.  I think a good analogy would be something like Columbus talking to the queen about planning a trip to the moon before he even made it across the ocean to the new world.

Personally, I'm of the opinion that we should be focusing more on just returning to the moon and establishing a completely self-sufficient base of operations there before even setting our sights on a target like Mars.  The only trouble with that is it just doesn't capture the interest of the general public, so it becomes difficult to drum up support and funding for such an endeavor.
59  General Category / General Discussion / Re: Best coding practice. on: September 12, 2012, 03:12:28 pm
In C++, int values will be automatically cast to bool values in the following manner:
0 is false.
All other values (whether positive or negative) are true.

Not necessarily the most intuitive conversion of values, so it's often more clear to use a specific comparison operation when using ints in an expression.
60  General Category / General Discussion / Re: C++ in embedded on: September 12, 2012, 03:06:34 pm

I did not asked you what to do ..


Perhaps not, but when entire books are written primarily to answer the questions you ask here, then the answer to your questions are, go read the books.
Pages: 1 2 3 [4] 5 6 ... 52