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
|
//center if(joyh >= 410 || joyh <=450) { servodireccao.write(115); } This should be: //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.
|
|
|
|
|
49
|
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.
|
|
|
|
|
50
|
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.
|
|
|
|
|
52
|
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.
|
|
|
|
|
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.
|
|
|
|
|
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).
|
|
|
|
|