Loading...
  Show Posts
Pages: 1 2 3 [4] 5 6 ... 52
46  Using Arduino / Programming Questions / Re: toward RC CAR on: September 19, 2012, 07:15:23 am
Code:
//center
if(joyh >= 410 || joyh <=450)
{
  servodireccao.write(115); 
}

This should be:

Code:
//center
if(joyh >= 410 && joyh <=450)
{
  servodireccao.write(115); 
}

The former will be true for ALL values of joyh, the latter will only be true when joyh is between 410 and 450.
47  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.
48  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?
49  Topics / Robotics / Re: Optical encoding with Sabertooth 2x25 broken on: September 17, 2012, 01:08:53 pm
Quote
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.
50  Topics / Robotics / Re: Optical encoding with Sabertooth 2x25 broken on: September 16, 2012, 12:22:36 pm
Quote
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.
51  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:
http://arduino.cc/playground/Main/MPU-6050
52  Community / Bar Sport / Re: Interstellar Travel on: September 14, 2012, 12:36:58 pm
Quote
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.
53  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.
54  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.
55  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.
56  General Category / General Discussion / Re: C++ in embedded on: September 12, 2012, 03:06:34 pm
Thanks

I did not asked you what to do ..

Elico

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.
57  Using Arduino / Motors, Mechanics, and Power / Re: Short power with more than 2 servos on: September 12, 2012, 01:51:50 pm
Can you provide a simple schematic, or at least specifics on exactly what pins are connected to what?
58  Using Arduino / Motors, Mechanics, and Power / Re: Stepper motor used as a servo on: September 12, 2012, 01:47:13 pm
It doesn't appear that you're using any sort of positional feedback on that stepper motor, which doesn't really make it a servo.  Still a nice demo, and a good use of salvaged printer hardware (I have two old printers in storage just waiting for me to get around to tearing the goodies out of their guts).
59  Using Arduino / Programming Questions / Re: One request from beginner - Motor Shield + Arduino UNO. on: September 12, 2012, 10:24:23 am
Or, alternatively, you could do the legwork yourself.
60  Using Arduino / Programming Questions / Re: One request from beginner - Motor Shield + Arduino UNO. on: September 12, 2012, 09:56:38 am
Google is an excellent resource for finding 'stuff' in general.  This  includes tutorials of all sorts, which includes Arduino tutorials, which even includes tutorials on driving motors with an Arduino and H-bridge/motor driver/motor shield.
Pages: 1 2 3 [4] 5 6 ... 52