Show Posts
Pages: 1 [2] 3 4 ... 9
16  Topics / Robotics / Re: Controlling Robot Using cellphone on: August 14, 2012, 03:21:09 pm
Can you just connect the arduino to the cell phone's audio jack, like when listening to a phone call with ear plugs? The Arduino would have to decode the frequencies of the tones.

While decoding a phone call's tones is cool, you could just write an app for your phone that connects over the internet to your server or the Arduino could connect directly with the server (over bluetooth or wifi.) This is pretty normal stuff.
17  Topics / Robotics / Re: Video camera with arduino + image processing. on: August 14, 2012, 03:08:36 pm
Might you give some idea what your application is? It would expand the discussion.
18  Using Arduino / Motors, Mechanics, and Power / Re: AA verse LiPo Batteries on: August 14, 2012, 03:02:11 pm
I was trying to put an order together for SparkFun, but can only find one two-cell charger that people say sucks. https://www.sparkfun.com/products/10473 Has anyone bought a good two-cell charger from them or is it time to look elsewhere?

SparkFun carries 2000mAh Polymer Lithium Ion Batteries for the motors. This would work for the Arduino: https://www.sparkfun.com/products/10472.

It is expensive. 1 charger ($33), 1 motor battery ($17), 1 spare motor battery ($17), 1 arduino batter ($7) and 1 spare arduino battery ($7) costs around $81+s/h. Assuming I can find a good charger, I hope it cuts down on the weight and works smoothly. My tracked robot was kind of crappy, so just replaced some cardboard sides with HPDE. The AA battery packs did not fit well in the frame, so hoping these would fit better and be easier to change.

19  Using Arduino / Motors, Mechanics, and Power / AA verse LiPo Batteries on: August 12, 2012, 12:22:13 pm
I have a 5V Arduino and 3V motors. They are powered by separate 4 AA battery packs. The battery packs are quite bulky and heavy. Would LiPo help?

Separate battery packs are used to prevent interference and because the motor drains much faster than the Arduino. These are the motors: http://www.pololu.com/catalog/product/114

AA alkaline capacity is ~2000mAh per battery.

LiPo capacity 1000mAh 7.4V https://www.sparkfun.com/products/10472

A 4 AA battery pack would be equivalent to 8 LiPos. I guess you could put 4 LiPos in the Robot while the other are charging. I guess 1 or 2 2-cell LiPos would could power the Arduino for a fairly long time, but the motor would need 4 single cell batteries.

This sounds like a modest weight savings.

Is this right?  Is it worth converting to a 3.3 V Arduino as 3.3V devices like the motors require single cell batteries?

20  Using Arduino / Programming Questions / Re: Motor interacting with ultrasonic motion sensor code problems. Please help! on: August 11, 2012, 09:23:33 pm
You are correct in your diagnoses. The trick is that the Arduino supports PWM. This means that you set a pin to a level and you are done. There is no need to worry about the timing within your main loop. 

Read about an Arduino library for this here: http://www.arduino.cc/en/Reference/Servo

And just google "PWM" for a wikipedia article that describes it well.
21  Using Arduino / Programming Questions / Re: An error... on: August 11, 2012, 09:07:53 pm
You fixed it, nice job!
22  Topics / Science and Measurement / Re: Playing with FFT on: August 11, 2012, 09:59:00 am
Is this for making an FM transmitter? What is FFT used for?
23  Topics / Robotics / Re: Starting my first UGV project - need some starting help on: August 11, 2012, 09:54:51 am
Did you ever get video to work? What did you use?
24  Using Arduino / Programming Questions / Re: An error... on: August 11, 2012, 09:29:32 am
Cleanup the formatting in HandleStoppedState(). You may have an extra end brace. Or you may have done something like (} instead of ().
25  Using Arduino / Programming Questions / Re: An error... on: August 11, 2012, 09:27:02 am
Oh, I thought you got past the compile issue. What does it mean "replace serial with cell"?

When you get a brace error like you have look at the brace right there and the function definition, and then look at what came before. There may be an extra or missing brace before this method.

Can you make your edits one step at a time and compile after each edit? When I work, I generally save a version of a sketch every few hours at a good stop point like when it is all working. Then I add a new feature in the next version. I might have Ignition1.pde, Ignition2.pde, etc. If a bunch of edits don't work out, I can fall back on yesterday's save point.

The other thing you might try is, in a copy like IgnitionTest1.pde, delete all the subroutines on the bottom and comment out their calls in the main loop. See if it compiles. After you figure out what was wrong, just go back to the original code and fix it.

And try Paul's suggestion to Auto Format the code. These errors are often missing braces that are hard to see when the tabs are wrong.



26  Using Arduino / Programming Questions / Re: Problems with IR Remote on: August 11, 2012, 09:09:35 am
This stuff is actually fairly hard, certainly not easy. You have modulation with your signal over it. You need some way to see what is being generated as well as an understanding of the encoding.

It sounds like you don't actually have anything working but occasionally an LED blinks which may mean the code is being decoded right.

Two things that could help are looking at the signal and using a library (like Ken's). These are both challenging and you will learn a great deal. So I am suggesting Ken's library again. You can start straight with the library and do the visualization after.
 
With Ken's library, guess at the common protocols with your device. Right a sketch to receive. Aim you remote and see if it works. Work through the common protocols until you find one that works. This will also tell you the key mapping, like what key is generated when you press stop. Then you write a sketch using the library to send the signals. (If you done have an IR receiver, you can just try sending signals.)

Ken's site has lots of info on IR and you can look at the protocols.

Another thing you can do is look at the signal from your remote control. There are sketches posted on this site for this: http://arduino.cc/playground/Code/InfraredReceivers
. This will record a bunch of levels that would then have to be plotted. Once plotted, you can figure out the encoding. THis requires reading about the common formats. There are links on Ken's site. This step is fairly hard.

Plotting the IR output of your code would be a good way to debug your code. But it is probably better to start with the library. You will learn a lot by using it which will help you with your own code.

27  Using Arduino / Programming Questions / Re: An error... on: August 11, 2012, 08:46:11 am
Newbies make a lot of mysterious little coding errors. Perhaps you inadvertently deleted a brace?

Moving on, your code is pretty clear. The sketch should output "Starting Vehicle", before it goes to CRANKING state.

I'd get rid of the extra "//" that it probably does not matter:
Code:
 case CRANKING: //
    HandleCrankingState();
   break;  

Add lots of print statements to HandleStartingState():
Code:
void HandleStartingState()
{
[color=red]Serial.println("In Starting Vehicle"); [/color]
if(millis()-StartingTime > FUEL_PUMP_PRIME_TIME)
  {
[color=red]  Serial.println("Starting Vehicle, pump primed"); [/color]
  if(digitalRead(alternatorPin)==HIGH)
    {
    Serial.println("Abort cranking");  
    Stop();
    }
  else
    {  
    Serial.println("Starting Vehicle");  
    digitalWrite(onPin,HIGH);
    digitalWrite(ignitionPin,HIGH);
    state=CRANKING;
    }  
  }
}

Try to pinpoint what is not right. Like once you establish that HandleStartingState() is called, you may want to stop printing "In Starting Vehicle" as it will be called repeatedly. Then you might check the alternator pin is correct, verify the alternator pin is setup right in code, verify it is correctly wired and put a volt meter on it to see if ever does go high.

So just pinpoint what is not as expected by printing diagnostics and checking hardware.
28  Using Arduino / Motors, Mechanics, and Power / Re: JST to Breadboard Connector on: August 11, 2012, 08:06:14 am
I would assume this is a common part, but I don't see the connector on SparkFun. It would be a male JST to jumper wire or maybe a JST socket. The JST connectors all look female.
29  Using Arduino / Motors, Mechanics, and Power / Re: JST to Protoboard Connector on: August 11, 2012, 08:02:44 am
I should have said breadboard. It is just a common breadboard, this style but bigger: https://www.sparkfun.com/products/137
30  Using Arduino / Motors, Mechanics, and Power / JST to Protoboard Connector on: August 10, 2012, 11:06:50 pm
How is a lipo battery with a JST connector connected to a protoboard? Is there a adapter for this? Can I just jam a red and black wire in the JST connector?
Pages: 1 [2] 3 4 ... 9