Control Robot with Max

Oct 18, 2013 at 7:59am

Control Robot with Max

Hi there!

For a project that I’m currently working on I’m trying to get a robot move on 2 wheels… each wheel are attached separately to two different motors which I’m controlling through Arduino. So far this is what I got: Through serial communication I can send the commands to my Arduino board, I’m using a [KEY] object on Max to do so. With the arrows of the keyboard I can make the robot go North-East-South-West (with the four arrow keys).

Now, I want to get Northeast-Southeast-Northwest-Southwest as well… I can’t figure it out how to make it with the Key object to detect when two arrows keys are pressed at the same time. I don’t want to stop the robot moving for changing directions but to be able to change it as it’s moving…

Some clues over there how to make this work??

(I hope the idea is clear!)

Thanks,
Fer

#268372
Oct 18, 2013 at 12:58pm

Here’s one way to do it, did it only for North west but you get the idea:

<code>

– Pasted Max Patch, click to expand. –

</code>

#268415
Oct 18, 2013 at 10:33pm

Hi Nat! Thanks a lot for the help. I managed to reach what I went through that way! Super ^^

Gracias!

Fer

ps. Is the Toolboox still working on Max 6?? I’ve been trying to make it work but yet with no luck… I followed instructions but shortcuts don’t respond and also I cannot make the Shell (Shift+r) window appear on my max.

#268439
Oct 19, 2013 at 5:21am

(hey, here i’m working without problem with that dear ToolBox on latest max614,32bitsOSX1068. though, it should be noted that toolbox won’t work in helpfiles, because there are incompatible js scripts apparently. I can make shell appear too.)

#268451
Oct 19, 2013 at 6:46am

Looks weird as I can’t either open the Shell window with the Shift+R keys… I found some external Shell object but it seems that it won’t perform the same way as doing it from the shell window. In the other hand can’t make it work with shortcuts either, maybe I’m just doing it in the wrong way… Any clue??

I’m running Max 6.0.4 on a OSX 10.7.5

Thanks for the help!
Fer

#268454
Oct 19, 2013 at 7:14am

It should work fine in max 6. When you open max do you see a toolbox message in the max window ? What version is installed ?

#268456
Oct 20, 2013 at 12:08pm

Hi Nat! My Max is a 6.0.4 running on a OSX 10.7.5 MacBook Pro computer… and the ToolBox version is the “maxtoolbox_14_max5″ recently downloaded from your site.

It’s possible to find the Toolbox from the extras menu on Max which I’ve already Activated… but when trying to use the shortcuts it’s not working and as I said it’s also not possible to launch shell window when pressing Shift+R.

Perhaps I’m trying to use the shortcuts in the wrong way?? Is it just like choosing the object and hold the shortcuts keys to the other?? I’ve tried in many different ways to make the connection but not finding the way yet!

Thanks a lot again for the information!

Fer

#268529
Oct 20, 2013 at 2:22pm

Can you try removing completely and try this version ?

https://github.com/natcl/maxtoolbox/archive/Version15.zip

#268542
Oct 20, 2013 at 3:43pm

Perfectly working now! Thanks a lot man, this really makes difference at the moment of patching ^^

Thanks for the support, now is time for easy patching!

Fer

#268545

You must be logged in to reply to this topic.