Let's Make Robots!

Webbotlib, the next stepping stone after Arduino

A more powerful and versatile AVR library
  • Programming language:

Hey guys,

I wanted to bring a video tutorial I created to the attention of LMR. The video is a walkthrough on how to use a software tool to setup a project using Webbotlib on a Axon microcontroller.

For those of you not familiar with Webbotlib, it is a new library for AVR microntrollers with a new approach to programming. It contains a vast repository of 'drivers' for various pieces of hardware. Think of it this way, when you install a new sound card into your computer, you don't have to program the low level interface to the hardware, that is taken care of through drivers. Instead, you just tell windows to make a sound, and it uses the hardware drivers to make a sound.

This is how Webbotlib works. After setting up the 'drivers', all your hardware is very easy to access. To read your I2C compass, you call compassRead(). If you end up changing out what compass you use, you don't have to change your code! Just change the driver running the compass.

The tutorial below is for a tool called Project Designer that is an easy to use GUI tool that will let you pick out what hardware you want to use, setup all the drivers for you, and get you up and running in WinAVR within minutes. It even genertates example code to show you how to use your hardware.

The library and project design can be adaped for any AVR microprocessor board with at least an atmega 168. It already natively supports boards like the Axon, Roboduino, and Orangutang.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I just did have a look at the Webbotlib code, well it is pretty nice :) 

Thank for bringing it up, it is real cool at least as reference if not used.

 

 

windows only :-(

A real shame the axon isn't open source too...

I only use Linux, and I use eclipse and code:blocks for programming. The project and board designers work fine with Java installed.

It seems you did not click on the WebbotLib link. If you go there and read about it you will see that it works Windows/Mac/Linux. WebbotLib is a C library that you can use it in AVR Studio, Eclipse, etc. The Designers are in Java, all yoou need is the Java runtime installed on your machine.

And the Axon has the schematic and PCB layout on it's page. I know a few people that built their own version of the Axon and one of them installed the Arduino Mega bootloader in his version so he can program it in Arduino. I can provide links if you cant find it using the Search box in the SoR forum.

I was referring to the bootloader

"bootloader is not directly Linux/Mac compatible"

and I can't find any source code, but maybe I just didn't look hard enough?

but dont good programmers do this allready?

I myself have Arduino libraries for every part I work with, to me these are the same as your "Drivers" idea. So if I change to a different compass module I write the new library and substitute it into the existing project.

Basically the "Drivers" are just someone else doing the work for me. To a certain dgree this is a bad thing, you dont learn anything about the actual components you are working with then. For example, I use this platform and use the compass "driver", now i am at a job that I got in part for my experience with the compass module, but wait they user Arduino or PIC processors, and I have never done any real work with the module.

Yes I understand there are two extremes here, Lego coding and yak shaving, and we should avoid both.

I guess my point is, if you dont know how to read an I2C bus, is it not better to learn how then just find someone else to do it for you?

Just my 2 cents.

The WebbotLib is aimed for people that are not great programmers (they still need to learn the basics) so they can build a robot fast, with no head ache because they did not understood 100% of the data sheet. Not everyone is an embedded programmer. Perhaps they are computer programmers or electrical engineers, or even artists. Arduino does almost the same thing, but WebbotLib does not let you use the same resources for different things (like Arduino libs that use the same Timer and don;t work together).

Before taking opinions on other people's work, we should take a very close look at the work that has been done with an open mind. If all people would think the same, we would not have progress.

I recognize the value of the WebbotLib but still use Arduino because I am fond of it's ease of programming. WebbotLib is a bit harder to use for me, but a lot more powerful. Oh, and all the functions you see there are optimized for the selected microcontroller and they work the same no matter if you have a Mega 168, a Mega 640 or a Mega 644 (of course, all of them have to support that function). That means You don't need to read the data sheet to have correct set up for a specific timer to generate PWM or software  PWm, or Software Serial, etc. Or use banks of servos on a timer, have automatic interpolation between servo positions and so on. I for sure can't do that on my own. But using the Lib, I can build a humanoid and program it's gaits in minutes, with Arduino I've got work to do.

True, who uses the WebbotLib does not learn much about the hardware, but perhaps there is no need. These days people don't learn assembly anymore, there is no need. It is good to know it, but if we can do the job without it, why bother. I've been amazed by the work of artists that don't know a thing about ATmega168 data sheet. They just used Arduino. But think what they could do if they have used the Project Designer, or the Gait Designer to generate the hardware code, then add their logic to it. It's that simple.

I agree that it would be awesome for artists etc. However I have recently been of the oppinion that the statement "you dont need to know anything about that" never preceeds anything good. I understand the urge to "just want to build something" but please allow me to share a story with you. I had a buddy in high school with that additude, and he decided to build a combat robot (robot wars glory days). I thought it was a great idea, till I heard he just wanted to build it, not learn the physics or the electroincs. Long story short, when you spin a slightly imbalanced, improperly milled cutting disc he bought onine because "he did not nee to know about that", at 15,000 RPM very poorly mounted because "he did not need to know about that". Well 5 surgeries later and he can sorta walk.

While I understand the urge to just build, the pay off and feeling of accomplishment is awesome. I think the effort to learn the micro controller programming is needed. Also, knowing you ACTUALLY built it, not just assembled a kit, and copied other peoples code is awesome :)

ironically I never agree with bill gates, but I do on this point "The world actually expects you to accomplish something before you feel good about yourself."

For the record I am a professional PC programmer who just last year began to learn micro controller programming. I have taken the time to teach about a dozen people how to do the programming side.

I have onl just began to master solidworks and Eagle. So I am not the super EE guy yet, and if I let everyone else do everything for me I never will be :)

Again no offense intended, I rather enjoy discussions like this

No offense taken, I am just a comp tech, learned electronics for fun, got better at hardware than at software. I don't pretend to know much and I like to help others. I would like to improve my programming skills but I haven't found a mentor yet. Some things it's a lot easier to learn from someone than on your own. In my experience, I learned to admire and respect the work of some people and try to learn from them. A few are here on LMR, others are on SoR. You may be one of them in the future, who knows? I do not list them here, they have a feeling who they are. Most importantly, I respect people who share their knowledge, treat others good even if they don't deserve it.

Sorry about your buddy. I am against battle bots because they are destructive. I am all for constructive stuff.

You are right, knowledge is important, but without help people usually get stuck and give up. If things are made easy at first, then get deeper and deeper, people start to learn the hard stuff when they're ready. For a beginner in robotics there is way too much info to be processed and understood. Following the tutorials or instructables makes you achieve your goals easier without much learning effort, because you learn only the strictly necessary stuff you need at the time. Some people catch the "virus" and keep digging for more and more knowledge, some will switch to other things more appealing. I still have the virus, my wife hates it, I still haven't built her a robot that cleans the house, cooks and washes dishes.

Anyway, I'm getting out of topic, even if you're not gonna use it, take a look at the lib, see how it works, perhaps you'll get some new ideas. I did and I have learned a few things, others were a bit over my head, I'll get back at them after I'll do some more digging.

Cheers!

I can see there are definite parts to this argument where I am off base.

And maybe as others have commented, this isnt the same as my buddy not bothering to do the physics calculations on his weapon. Examining my own experiences in trying to learn uC programming originally with PIC was very frustrating, since I have been coding for years, and it consistantly out witted me. I stepped back and a friend on the Spark fun forum told me to learn the Arduino first, and that was the ticket for me. So I guess this could be ssen in the same light. I have since expanded to AVR C and AVR ASM. I am now challenging myself to learn the ARM controllers as I feel I need more power.

I am working on a set of tutorials to pave the way from beginner Arduino coder to AVR C programming. Once they are completed they will be posted on my new site. http://thetrustedone.info

I will let you know when they are complete, maybe you could help me refine them?