Forums > MaxMSP

Control Robot with Max

October 18, 2013 | 7:59 am

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!)


October 18, 2013 | 12:58 pm

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


– Pasted Max Patch, click to expand. –


October 18, 2013 | 10:33 pm

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



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.

October 19, 2013 | 5:21 am

(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.)

October 19, 2013 | 6:46 am

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!

October 19, 2013 | 7:14 am

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 ?

October 20, 2013 | 12:08 pm

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!


October 20, 2013 | 2:22 pm

Can you try removing completely and try this version ?

October 20, 2013 | 3:43 pm

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!


Viewing 9 posts - 1 through 9 (of 9 total)