<div dir="ltr"><div>I think it would be easier to use MIDI to control/read the arduino pins than to combine it with firmata.<br></div>If the arduino was on its own MIDI channel then noteon messages on that channel could set or read the digital outs and controller messages the analog pins.<br><div class="gmail_extra"><br></div><div class="gmail_extra">Martin<br><br></div><div class="gmail_extra"><div class="gmail_quote">On Tue, Jun 30, 2015 at 6:17 AM, Ingo <span dir="ltr"><<a href="mailto:ingo@miamiwave.com" target="_blank">ingo@miamiwave.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Of courese I meant to say: " Unfortunately I do NOT know much about C<br>
<div class="HOEnZb"><div class="h5">programming ..."<br>
<br>
<br>
> Both the Arduino Micro and the Teensy 2.0 are working great!<br>
> Thanks a lot, Martin!<br>
><br>
> Now I only need to find out how I can prepend some identifier in the<br>
> Arduino<br>
> patch to be able to route the MIDI data separately while using the other<br>
> pins with the standard firmata at the same time.<br>
><br>
> Unfortunately I do know much about C programming ...<br>
><br>
> Ingo<br>
><br>
><br>
> ________________________________________<br>
> Von: Martin Peach [mailto:<a href="mailto:chakekatzil@gmail.com">chakekatzil@gmail.com</a>]<br>
> Gesendet: Samstag, 20. Juni 2015 17:11<br>
> An: Ingo<br>
> Cc: <a href="mailto:pd-list@lists.iem.at">pd-list@lists.iem.at</a><br>
> Betreff: Re: [PD] Arduiano (Micro or Nano) as MIDI interface?<br>
><br>
> On Sat, Jun 20, 2015 at 6:06 AM, Ingo <<a href="mailto:ingo@miamiwave.com">ingo@miamiwave.com</a>> wrote:<br>
> Hi there!<br>
><br>
> I'd like to use an Arduino Micro (or Nano) as a MIDI interface connecting<br>
> the MIDI ports to the digital pins "0" and "1" (TX/RX) and receiving the<br>
> MIDI data via USB in Pd.<br>
> It does not matter in which format it comes into Pd (i.e. it doesn't have<br>
> to<br>
> show up as a MIDI port - like MIDI over USB).<br>
><br>
> 1) Does anybody know if there is an existing arduino software for this?<br>
><br>
> No but all you need to do is<br>
>   if (Serial.available()) Serial1.write(Serial.read());<br>
>   if (Serial1.available()) Serial.write(Serial1.read());<br>
> in your main loop, where Serial1 is the TTL serial and Serial is USB.<br>
><br>
><br>
> 2) Does anybody know if there are limitations on some or even all arduinos<br>
> using the serial (digatal 0/1) ports and USB port at the same time?<br>
> Only the micro (or Leonardo or Mega) will work for this as the TTL serial<br>
> is<br>
> separate from the USB. The TTL serial port on pins 0 and 1 shoud be set to<br>
> 31250 baud. Arduinos that use the Atmega168 or 328 use the same serial<br>
> port<br>
> for TTL and USB so there will be conflicts if you try to do both at the<br>
> same<br>
> time. And software serial is probably too slow to receive at 31250 baud<br>
> although it can work to send MIDI that way.<br>
> Teensy2.0 (<a href="http://www.pjrc.com/teensy/index.html" rel="noreferrer" target="_blank">http://www.pjrc.com/teensy/index.html</a>) will also work for this<br>
> and can also (I believe) be set up as a USB MIDI device.<br>
><br>
> Martin<br>
<br>
<br>
</div></div></blockquote></div><br></div></div>