Webbotlib, the next stepping stone after Arduino


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.



I’ve heard of the Axon but this software makes it even easier to exploit all of it’s advantages. Will definitely take a look at this for further projects!

Thanks for the demo,I will

Thanks for the demo,I will have a closer look at it. :slight_smile:

Dont mean to rain on anyones parade

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

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 understand the people who can use this

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 :slight_smile:

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 :slight_smile:

Again no offense intended, I rather enjoy discussions like this


Your argument is somewhat weak in that it can be shifted to any level. You use prebuilt Microcontroller ICs? Well then you will never learn how to design the controller architecture and create your own silicon wafers. How do you know that the uC isn’t going to explode and the flying silicon wafer rip your leg to shreds if you didn’t bother to properly verify it’s power system design? Have you taken the time to wire 20,000 transistors together to make your own uC? 

The only truth here is everyone has different levels of knowledge they want to gain versus knowledge they just want to leverage. The level difference for each person could be for practical or personal reasons.  So really your comment should just be ‘it’s not for me, i’d rather learn this stuff myself’. For other people, it could be just what they are looking for.

I am already a ‘Super EE’ (degree’d EE) and I work with Autonomous robots for the Navy. I wanted to learn more about their cooperative autonomous behaviors by building a fleet of my own at home, and WebbotLib was perfect for me. I could concentrate on higher level functions and not have to start from scratch. Don’t get me wrong, I learned assembly first in school, and low level C after that. But I didn’t want to mess with low level stuff in this case. So I was very lucky to find Webbotlib that had support for all the sensors I wanted to use out of the ‘box’ and I was able to leverage that perfectly. 

I can argue you will never be a ‘super EE’ till you design your first uC architecture like I did in college. So when are you going to stop letting AVR and PIC do that for you?

No offense taken, I am just

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.


and I agree

For someone who just wants to start, this is good for that. Although I hope they push further and learn more. As for desiging my own processor using transistors I would actually love the challenge. I came close in college, we had a joint project with the EE guys, they built a room sized “uC” using relays, noisy as ■■■■■ soo much clicking. A couple of us coders lent a hand to write code for the thing. At the end of the day it was the nosiest and biggest alarm clock I had ever seen.

To this day I wish I had intergrated myself more on the hardware side and learned this stuff then.


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?

uC exploding?

Okay this one is bothering me, I know you were just being facious however, out of curiousity how much over voltage do you think it would take to make say and ATMEGA328 to explode with that much verosity?

Sure, I’d love to. I was

Sure, I’d love to. I was proposed to teach some kids about robotics and I’ve designed a simple Arduino shield called the Robot Builder’s Shield, so I can do that by following the Boe-Bot manual, adapted to Arduino combined with the examples found in the Complete Beginner’s Guide to Arduino. So I think what you’re doing is probably the next step? We’ll see.

windows only :-(A real shame

windows only :frowning:

A real shame the axon isn’t open source too…

It seems you did not click

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.

Not windows only!

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

I was referring to the

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?