Show Posts
Pages: [1]
1  Topics / Robotics / Re: Solar Powered Coke Fetching Robot - Advice Please on: January 02, 2012, 03:59:04 am
Or you could simply mount a color sensor and somehow program it to make your manipulator arm grab anything that is bright red when it is in the general vicinity of your refrigerator.

...and how does this supposed robot manipulator arm even -know- where "bright red" things are? A color sensor isn't going to give anywhere -near- enough information to be able to position the arm.

Try putting on a blindfold, and some over mitts, and stand in front of the refrigerator. Have someone else give you yes/no answers when you hand comes near "bright red" in the fridge. Try not to make a mess.

You can't just set up a color sensor and "somehow program" things to get the job done; robotics doesn't work this way. Maybe if there were a designated coke can dispenser always in the same spot in the fridge, and the position of the fridge never changed, and there were some other "guidance" sensors and such to guide the arm/gripper/manipulator into position (and similar stuff on the floor, etc to guide the robot's chassis) - you -might- be able to get away with it (something like early pick-and-place industrial robot systems - where if you can control for every possible variable, you can drop the error rate down low, but you'll never get to zero).

Ultimately, you need a little bit of such a system, coupled with vision and machine-learning software to make an effective system. It really isn't as easy as you think (otherwise, we would have already had the home helper robots we've been promised for the past 50 years already).

As I said - I expect it to take 2 years.

 smiley-cool
2  Using Arduino / Programming Questions / Re: Simple LED Blinking Sketch | Question on: January 01, 2012, 11:10:55 pm
I really appreciate both of you taking the time to answer my question so quickly. It can be so frustrating when you know the answer is something simple but you can't figure it out for want of someone more experienced just pointing at the obvious thing you're missing.

REALLY appreciate the help.
3  Using Arduino / Programming Questions / Re: Simple LED Blinking Sketch | Question on: January 01, 2012, 11:03:24 pm
I get it now.

So lets say I wanted the delay to be fixed at 50 then I would have just written:

void flash
   {
  digitalWrite(Pin12, HIGH);
  delay(50);
  digitalWrite(Pin12, LOW);
  delay(50);
}

And then I could have just called "Flash()"

Is that right?
4  Using Arduino / Programming Questions / Re: Simple LED Blinking Sketch | Question on: January 01, 2012, 10:50:47 pm
First of all - thank you for responding.

Second, and please do forgive me, I'm still not following. I guess I still don't see where duration got defined in the flash statement (I realize this must look moronic to an experienced user).

We have the following code:

Quote
void flash(int duration)
   {
  digitalWrite(Pin12, HIGH);
  delay(duration);
  digitalWrite(Pin12, LOW);
  delay(duration);

How this "reads" to me is something like this:

  digitalWrite(Pin12, HIGH); -- Power on Pin 12
  delay(duration);  delay for whatever number "duration" is defined as
  digitalWrite(Pin12, LOW); -- Power off Pin 12
  delay(duration); -- delay for whatever number "duration" is defined as

The way my mind is processing this code I would have to define "duration" at some point. I might say, for instance, int Duration = 50

Then, the delay in the above code would be 50 as it references back to my definition of Duration (i.e. 50) in the previous sentence.

Flash seems to be defined as the write/delay/write/delay code and I'm still just not seeing how adding a value to "flash" is populating "duration". Clearly I am not understanding Arduino's syntax correctly.
5  Using Arduino / Programming Questions / [SOLVED] Simple LED Blinking Sketch | Question on: January 01, 2012, 10:34:17 pm
I don't have a background in C++ so I am still getting my bearings with the language syntax so please forgive the simplicity of my question.

Here is a simple sketch (it does not use Pin11 or Pin10 at this point) that is lightly modified from an LED tutorial (public domain):

--

int Pin12 = 12;
int Pin11 = 11;
int Pin10 = 10;

void setup()
{
  pinMode(Pin12, OUTPUT);
  pinMode(Pin11, OUTPUT);
  pinMode(Pin10, OUTPUT);
}

// Note: Pin11 and Pin10 aren't used in this early version of the sketch

void flash(int duration)
{
  digitalWrite(Pin12, HIGH);
  delay(duration);
  digitalWrite(Pin12, LOW);
  delay(duration);
}




void loop()   // run once, when the sketch starts

{
  flash(200); flash(200); flash(200); // S
  delay(300);                         // delay to seperate flashes
  flash(500); flash(500); flash(500); // O
  delay(300);                         // delay to seperate flashes
  flash(200); flash(200); flash(200); // S
  delay(2000);                        // delay to reset SOS flash sequence
}
  

// END CODE

--

The code works just fine - but my question has to do with the term "duration" in the void flash(int duration) section - which I have highlighted in red.

The term "duration" in the delay(duration) does not seem to ever be defined. But if I try to change the term "duration" to something else (like "dur") I get an error in the compiler. Is "duration" a pre-determined command? If so, what does it do? I'm just not following the syntax of this sketch very well and could use some help parsing it out.

Thanks.
6  Using Arduino / Installation & Troubleshooting / Re: Upload Timeout Error on Mega 2560 - Not Sure What Changed on: December 31, 2011, 07:05:57 am
The timeout error is a known issue.

Google it.

Anyone have a verified and working fix? I've had my Arduino for about 4 hours and just got hit with this (and I'm not using any !!! in my code, which was allegedly the cause of the issue). This has been going on for months now and I gotta be honest - I'm pretty frustrated that the (presumably bootloader) issue still seems to be unfixed.
7  Using Arduino / Installation & Troubleshooting / Re: ethernet sheid / mega 2560 / upload problems. on: December 31, 2011, 07:03:23 am
This is a known problem with the Mega. I just got burned by it today as well.

I've read several "fixes" but nothing really seems to be working. I'm still new to Arduino, so maybe someone with a little more skill than me can help?
8  Using Arduino / Installation & Troubleshooting / Re: Timeout problems uploading large sketches to Mega2560 on: December 31, 2011, 07:01:37 am
I just got my Mega today and after uploading a few simple test programs (none of which have "!!!" in the code) I now have the timeout issue.

What a crock of crap that this has been going on for months and it's not fixed yet. Maybe it's time to jump over to the basic stamp.
9  Topics / Robotics / Re: Newbie needs advice on first bot on: December 30, 2011, 03:05:40 am
What would the accelerometers be used for?

Forgive my ignorance...

As for the ultrasonic sensors, that was the "pings" was referring to.  I picked up one of these for $20, though I see the ones you suggested are considerably cheaper.

You could also try the line following bots:

http://www.botbuilder.co.uk/codeandprojects/bbline/index.html
10  Topics / Robotics / Re: Solar Powered Coke Fetching Robot - Advice Please on: December 29, 2011, 08:21:22 pm
Quote
Are you suggesting to me that I have the code written before I have the hardware to test it on? Seems a bit backwards, no?

No, you probably could get a $10 USB cam and the roborealm software to start testing. Develop your recognition program to the point to where it can tell the difference between a coke and a bud lite when they are held in front of the cam in differening conditions and positions. Simple, right?

Good point. I see what you mean now. Not a bad idea.

Thanks.

If you really want to do this -right-, take this class (advanced version - not the basic - if you -really- want to understand things):

http://www.ml-class.org/

An example of what someone was able to do with this class:

http://blog.davidsingleton.org/nnrccar

I just completed this class (the inaugural version); a new one is starting up soon:

http://jan2012.ml-class.org/

You still have time to enroll. It takes about 2 months (weekly sessions) to complete, and if you are serious about robotics and machine learning, it is well worth it, believe me. It is an excellent program, well worth the time.

Enrolled.

Although, as an MIT alum (Finance - so not as cool as it sounds), it pains me to enroll in a Stanford program. Oh well, at least it's not Cal Tech.
11  Topics / Robotics / Re: Solar Powered Coke Fetching Robot - Advice Please on: December 27, 2011, 07:10:00 pm
Quote
Are you suggesting to me that I have the code written before I have the hardware to test it on? Seems a bit backwards, no?

No, you probably could get a $10 USB cam and the roborealm software to start testing. Develop your recognition program to the point to where it can tell the difference between a coke and a bud lite when they are held in front of the cam in differening conditions and positions. Simple, right?

Good point. I see what you mean now. Not a bad idea.

Thanks.
12  Topics / Robotics / Re: Solar Powered Coke Fetching Robot - Advice Please on: December 27, 2011, 05:07:58 pm
Quote
The big issue for me is trying to make sure I've got the right boards, power supply, grasper arm, engine, platform, etc from the get go. Expect to be flooded with programming bugs and queriers after I've got the right hardware chosen.  

A robotics reality check indicates you should really solve the most difficult part of your project first before buying a lot of supporting hardware (unless you have excess $$$). If you can't solve the object recognition issues, all the equipment listed above will be useless (but good for a donation to a school or similar unless you find another project).  

Are you suggesting to me that I have the code written before I have the hardware to test it on? Seems a bit backwards, no?
13  Topics / Robotics / Re: Solar Powered Coke Fetching Robot - Advice Please on: December 27, 2011, 05:01:05 pm
Quote
How on earth I'm going to get it to recognize and grab a coke is beyond me.

Well, some type of image recognition would be a place to start. Perhaps google is your friend in studying facial recognition or other types of object recognition. You might google roborealm for some software to start. There is also some open source software. Most of this is pc based and well beyond the arduino world.

The roborealm stuff was great - and they have a module for interface with Arduino Mega. I think the software package there is definitely robust enough to get the job done. Very helpful - and exactly the kind of info I was hoping to find when I started the thread.

Thanks!
14  Topics / Robotics / Re: Solar Powered Coke Fetching Robot - Advice Please on: December 27, 2011, 04:32:02 pm
Quote
but I'd like to see if there's a way to get it to recognize and grab a coke from, say, anywhere on the bottom shelf.
What does the robot need to be able to distinguish the coke from? Beer? Pepsi? Lettuce? Ketchup?

Distinguishing a coke from a beer is not as difficult as distinguishing a coke from a Pepsi, since beer cans are not the same size as soda cans. All soda cans are the same size, though.

At this point I think I just need it to have enough torque to be able to open the refridgerator door and then I'll need it to properly position a grasper arm to find and grap a coke (always) from the bottom shelf. Recognizing a coke from a pepsi (which I think I can probably do with some sort of color recognition) is beyond the scope of version 1.0.

The big issue for me is trying to make sure I've got the right boards, power supply, grasper arm, engine, platform, etc from the get go. Expect to be flooded with programming bugs and queriers after I've got the right hardware chosen.  smiley-grin
15  Topics / Robotics / Solar Powered Coke Fetching Robot - Advice Please on: December 27, 2011, 05:49:06 am
Hey guys,

I am considering a (rather ambitious for me) project that, as you might have guessed from the title, will ultimately produce a robot that can, from the same starting point, fetch a coke from the fridge and bring it back to said starting point at the push of a button. I think I've got a good basic sense of what needs to be done and the tools available to get it to the fridge and open the door and I think I can even work out how to program it to go to autonomously go to the same sunny spot and recharge.  How on earth I'm going to get it to recognize and grab a coke is beyond me. The easy thing is to always have the coke in the same place so it's an automated program with no variables - but I'd like to see if there's a way to get it to recognize and grab a coke from, say, anywhere on the bottom shelf. Let me be clear: All of this is way beyond my current skill level (hence the challenge of producing a robot that can get it done) and so I really need to get some community input on the matter. This is going to, for me, represent a dramatic uphill climb on the learning curve so I could really use some help planning the parts and materials for the project. I don't "know" how to do any of this off the top of my head, but I figure we'll take it one mini-project at a time.

I'm giving myself 2 years to get this done and I don't think cost will be prohibitive.

Anyone willing to help me avoid early mistakes via their experience is more than welcome to chime in.

Thanks.
Pages: [1]