Forums > MaxMSP

IR control


yra
October 7, 2012 | 9:16 pm

Dear all,

Here is my problem.
I’m using an arduino uno and the maxuino patch.
I can control a dvd player with the arduino without using max, just an arduino’s sketch that blinks the IR led just like I need.
BUT now i’d like to control this dvd player via max, using the standard firmata sketch on the arduino.

I can see two ways of doing it :
- translate the IR sketch into a max patch (dealing with bytes and microseconds delays)
or
- integrate the IR sketch into the standard firmata’s sketch and send a simple message from max

The second way appears easier to me but a first attempt was not very successful.
Any idea ?
Thanks for your help.
yragaël.



yra
October 9, 2012 | 7:52 am

Re,

The first way can be easy if someone has a java’s script that deals with IR leds when you have the proper codes (for stop, play, power etc..).
But how can we deal with microseconds ? Is it possible in max or I just have to work on the B plan ?

Thanks again.
yra.


October 9, 2012 | 8:15 am

You can’t deal with microseconds in Max!

I would integrate the IR sketch into firmata.
In fact I wouldn’t use firmata at all, because it’s quite easy to communicate between Max and the Arduino over the serial port using your own code (check the Communications examples in the Arduino’s IDE, especially SerialCallResponse – there’s even a Max patch!)

p



yra
October 9, 2012 | 8:42 am

Yep.
That’s the solution of course ! Thanks a lot.
I was stuck on a way to adapt the firmata and lost this simpler way.
Merci.


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