Trouble importing my first example

25 Oct 2009

Hm - this isn't going very well. I've just tried to import the Servo example into the compiler. This is the first time I've used these tools, so I may just be doing it wrong.

I went here:

http://mbed.org/projects/cookbook/wiki/Servo

and copied this URL:

http://mbed.co.uk/projects/cookbook/svn/Servo/trunk/examples/Servo

Then I went to the compiler, did a right-click on My Programs and Import Program. I selected 'Import from URL' and pasted in that project URL.

I get a dialog with this message:

 

Error importing files: ERROR IMPORTING FROM SVN
----------------------------

The following errors were reported while trying to import:

* URL 'http://mbed.co.uk/projects/cookbook/svn/Servo/trunk/examples/Servo' doesn't exist

 

Furthermore, although I don't see a project with the name I chose in My Programs, a second attempt to import the project gets me this:

Error importing files: Unable to create project. Project with the same name already exists in your workspace.

 

I need to refresh my browser before I can see the empty project that the failed import attempt made.

 

I guess this is just a duff URL in the Servo example and a tiny refresh bug in an error leg, but as a first-use experience for something that is trying to be easy to use, it is a bit dispiriting.

 

What I'd like to find as a first-time user is a small collection of working sample projects that I can look at, compile, and tinker with. It is reasonably important that I know they are good examples, so that when it all goes wrong I know it's because I broke something.

Looking at the Cookbook, there's nothing that is clearly that. There are libraries, experiments, articles, betas, but nothing which is obviously a good working example.

I am all in favour of the Cookbook - it is obviously a fantastic idea - but it is not the best place to send a new user to look for example projects.

I wonder if it would be a good idea to put a new section at the top of the Cookbook with some suitable projects in.

 

Richard

 

 

 

25 Oct 2009

Looks like the directory structure for that project has changed, the import URL you actually want is probably: http://mbed.org/projects/cookbook/svn/Servo/examples/Servo (I've updated the page to reflect that).

25 Oct 2009

What kind of examples are you looking for? If there is somthing that is not in the cookbook just open a thread on the forum and it is likely that someone has done the same thing, or knows how to do what you are looking for.

Most of the examples in the cookbook are the simplest forms of most applications that the mbed can do.

You should also check out the hello world example's: http://mbed.org/handbook/MicrocontrollerGettingStarted

If the import links are not working you can also simply copy and paste the code and import the libraries manual to achieve the same results.

25 Oct 2009

Hi Richard,

Thanks for your post! I fully agree that there is scope for improvement in the way example projects are organised and presented. It can be hard to find projects and they are not always up to date.

To that end, we are currently working on a new way of sharing projects. I can't say when exactly the new features will be ready, but the main goals are:

  • For projects to be easy to create, find, compare, and share
  • Example code is consistent and easy to import into your compiler - one-click to import and no cut and paste
  • We should be able to handle *lots* of projects
More on this later hopefully.
Cheers,
Dan (mbed web & systems)

25 Oct 2009

Chaps - thanks for your comments.

I think the crucial thing, the first time round, is to easily and unambiguously be able to get my hands dirty in one or two example projects. Ideally, they should be non-trivial projects, so I can see what a properly-arranged project looks like, and they should be clearly identified as the official examples, not mixed up with a bag of other stuff of unclear status.

It doesn't matter terribly much what they actually do, since the point is to learn my way around the tools and the environment rather than implement any particular thing.

 

It sounds as though Dan is already working away on something along those lines, so I shall try to keep my complaining to a minimum from now on.... :-)

 

Mike - importing from your suggested URL gives me this warning:

Import was successful but the following warnings were produced:

* Import omitted (access denied): /Servo_LPC1768.bin
* Import omitted (access denied): /Servo_LPC2368.bin

And a project which doesn't compile, for lack of any libraries. I'm sure I can fix that with a bit of poking about...

 

Oh - another question - why doesn't the 'import library' dialog offer a picker for gettting the regular stuff easily, as an alternative to the URL field ? It seems a bit odd to have to go copy and paste a random link to get (for example) servo support.

 

I hope this is the kind of feedback you want here. Let me know if it become tiresome.. :-)

 

Richard

25 Oct 2009

Richard Sewell wrote:
I hope this is the kind of feedback you want here. Let me know if it become tiresome.. :-)

Yes, this is exactly what we want, keep it coming!

Dan

26 Oct 2009

Hi Richard,

I just had a look at this problem. Looks like it was just a badly put together example (url was wrong, it had .bins in the example dir, no libs were included). I've updated it all so it imports and compiles fine now.

I haven't tested the example code with a servo as I don't have one with me, but I'd guess it'll work and I'm confident about the servo library itself as I wrote and tested that.

As dan says, we're working on making this all a little cleaner. And this sort of feedback is ideal!

Thanks,
Simon

26 Oct 2009

Simon - thanks - I'll give it another go (with a real servo) when I next get some furtling time.

By the way, the link from the project page

http://mbed.org/projects/cookbook/wiki/Servo

to Rapid Electronics is a dead link. If it helps, my favourite place for cheap servos is http://www.servoshop.co.uk, who go down to £4.50 a pop.

 

Richard

26 Oct 2009

Richard

Could you say which model of servo is £4.50?

I've clicked on their best buys:

http://www.servoshop.co.uk/index.php?area=servo&make=servoshop&title=Servo+Shop+Servos

but the lowest cost is about £6.

I'd like them for kids to experiment with, so being robust is more useful than being light, fast or or precise.

GB

26 Oct 2009

This is the page of cheapness:

http://www.servoshop.co.uk/index.php?sbplow=0.01&sbphi=8.99&title=Budget+Servos

The £4.50 ones I bought from them seem to have gone up a bit, to the dizzying heights of £6:

http://www.servoshop.co.uk/index.php?pid=STECENERG&area=Servo

but there are some £5 ones at the bottom of the list. I can't vouch for their robustness one way or another.

 

Richard

 

26 Oct 2009

Richard - Thank you!

I try to keep everything within tight budget for the after school technology club, and that extra £1.50 buys an awful lot of LEDs :-)

26 Oct 2009

I understand.. :-)


By the way, do you have a good (which is to say, cheap) source of servo plugs, or do you just jam them onto bits of header strip like everybody else ?


R

26 Oct 2009

Ah servo plugs. The short answer is no, I have not found a cheap source of pukka servo plugs, but I have a plug which is good enough for my purposes. I can use it with 0.1" header pins, or molex-style single sided headers.

I invested in a crimping tool:

http://www.rapidonline.com/productinfo.aspx?tier1=Tools%2c+Fasteners+%26+Production+Equipment&tier2=Hand+Tools&tier3=Tacking+%26+Crimping&tier4=Crimping+tool+for+PCB+connectors&moduleno=30535

A reel of crimp terminals:

http://www.rapidonline.com/Cables-Connectors/Connectors-Multipole/PCB-Interconnect/2.54mm-Crimp-terminal/63799

then I use these plug housings:

http://www.rapidonline.com/Cables-Connectors/Connectors-Multipole/PCB-Interconnect/Crimp-2.54mm-PCB-connection-system/63798

If the tool lasts for a thousand crimps (I have no idea what the life will be), then a 3-pin header costs about 6p for the tool + 4p for 3 terminals + 5p for housing + VAT, which seems reasonable for small-scale/DIY costs.

My bigger problem is getting comparably cheap PCB mounting, 0.1" box headers. Some people are concerned that the small plastic tab on those headers are too delicate, and want box headers instead. If you know of a sub 20p 0.1" pitch box header, I'm interested!-)

HTH

GB

27 Oct 2009

I've gone a similar way, but usign the Molex equivalent from RS:

http://uk.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=6701324

The tab on those headers is pretty sturdy. I can't imagine ever breaking one, in fact. But yours is much, much cheaper. Maybe I'll get those next time...

27 Oct 2009

Richard thanks, I'll try those RS ones, and see if folks feel they are more robust.

The cheap ones I get look very similar to 'real Molex', but I've never tried breaking the tab off, oddly enough :-)

You probably know this trick, but it's worth mentioning.

I get the low-cost headers, but with 90 degree, right angle pins:

http://www.rapidonline.com/Cables-Connectors/Connectors-Multipole/PCB-Interconnect/90-deg-Pin-header/28954

then I use pliers to *GENTLY* straighten the pins. That way the pins are much longer than the straight-pin headers, and hence are a more secure fit into breadboard.

Thanks for the URL

Take care, GB