Tips for making a robot multi-task

C on an Atmega is (in my

C on an Atmega is (in my humble opinion) even better, since you can use timers, interrupts and other magical stuff to make your robot “multitask”.

I find it that BASIC in almost any form make me want to shower, but each to his own I guess.

The Arduino language(Based on Wiring) is a simplified version of C++, sort of. It’s very simple to learn, I think that it’s well worth the time to learn it. I haven’t tried out ZBasic though, may it has some nifty features that I’m not aware of.

Computers have multitasked

Computers have multitasked long before multicore chips arrived on the scene. Because they operate so fast it is just a matter of time management or “scheduling” as they say, to make the chip appear it is doing multple tasks simultaneously.

There are a number of ways to implement this but there is an interesting and simple method here with an avr. You could use an extra chip or 2 but I wonder whether this really simplifies things any further as you then need to add communications code when you could just use the space to write interrupt service routines and timer code.

ZBasic multitasks VERY smoothly…

I have been working with the multitasking in ZBasic and it is VERY stable and easy to work with (and it’s fully preemptive). Using hardware PWM to drive servos and they don’t ‘glitch’ at all with the multitasking. I am quite pleased and I think anyone would be if they would just give it a try.

Now put that in a 40 pin dip package, equally as fast, and charge $59.95 and you have a controller really worth exploring. (Its called the ZX-24su and is made by a ZBasic “helper” company named Oak Micro.)

With the programming being very easy, one can devote more time to some serious AI. That is what I am going to TRY to do.

I have heard rumor that an effort is being made to translate ZBasic to run on a PROPELLER!!! If that can be done (it sounds really hard) I couldn’t resist finally buying a Propeller! (I think it would be on a board with an external memory for the ZBasic native boot code). If they do it right they won’t put a VM - Virtal Machine on the chip but have ZBasic compile down to Propeller machine code. That could be incredibaly fast if done properly. I don’t think they could keep them in stock! :slight_smile:

Update…

Don’t expect ZBasic for the Propeller to be out any time soon… The “team” that is working on it is one person and he sounds like he doing it in his spare time as part of his hobby.

I myself see huge problems from both the Parallax and ZBasic companies. Who owns the thing ? What about licencing it?

IF he is doing so it as a Basic that runs somewhat like ZBasic (gets just the most important features running) without using any of the ZBasic originally engineered code, it may make for a awesome Open Source project! If it ran well (not even perfectly) I would be willing to buy a Propeller and help with finding bugs, I think it would be a really worthy effort, and then I would never have to think about learning Spin again! Yes, I hate Spin that much! :slight_smile:

A quick update…

Here comes a shocker, I am going to buy and try programming a Propeller! I have to admit I know little about but there are more than a few people who say it would be neat to try out.

I am going to do it! And I am glad a section of the forum exists for it. I will need it. :slight_smile: