IR control

Oct 7, 2012 at 9:16pm

IR control

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.

#64658
Oct 9, 2012 at 7:52am

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.

#233251
Oct 9, 2012 at 8:15am

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

#233252
Oct 9, 2012 at 8:42am

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.

#233253

You must be logged in to reply to this topic.