<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16609" name=GENERATOR></HEAD>
<BODY 
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">
<DIV dir=ltr align=left><SPAN class=732590314-06032008><FONT face=Arial 
color=#0000ff size=2>Thanks Hans, here attached is another copy of the edited 
Firmata with some added comments to the code so things dont' get too mixed up. 
Whilst the additions are specifically for the AD5206 digital potentiometer, it 
should be possible to make a sort of generic SPI object in PD that you use when 
needed and otherwise disable to free up&nbsp;the Arduino pins 10-13. which would 
otherwise be a pain as Martin Peach so rightly points out.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=732590314-06032008><FONT face=Arial 
color=#0000ff size=2>So far as constructing&nbsp;PD messages are concerned I'd 
be really grateful for any help you could give in that direction. The message 
needs to be a 2 byte variety does it not ? just like a DMX message...channel 
blah to level blah.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=732590314-06032008><FONT face=Arial 
color=#0000ff size=2>But I suppose it is a bit more complicated than that to 
actually make it happen. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=732590314-06032008><FONT face=Arial 
color=#0000ff size=2>Nick.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=732590314-06032008><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma><FONT size=2><B>From:</B> Hans-Christoph Steiner 
[mailto:hans@eds.org] <BR><B>Sent:</B> 05 March 2008 21:12<SPAN 
class=732590314-06032008><FONT face=Arial 
color=#0000ff>&nbsp;&nbsp;</FONT></SPAN><BR><B>To:</B> nick burge<BR><B>Cc:</B> 
Pd List<BR><B>Subject:</B> Re: [PD] Pduino and the AD5206 digital 
potentiometer<BR></FONT></FONT><BR></DIV>
<DIV></DIV>
<DIV><BR class=webkit-block-placeholder></DIV>
<DIV>Nice work! &nbsp;I imagine that it must be possible to have the 
SPI-specific messages sent via Firmata. &nbsp;I don't have a clear picture of 
what all is needed. &nbsp;But if there are specific message types needed, then 
there is plenty of room in the protocol to add SPI messages. &nbsp;For example, 
we just added Servo messages in an alpha version.</DIV>
<DIV><BR class=webkit-block-placeholder></DIV>
<DIV>.hc</DIV><BR>
<DIV>
<DIV>On Mar 5, 2008, at 1:08 PM, nick burge wrote:</DIV><BR 
class=Apple-interchange-newline>
<BLOCKQUOTE type="cite">
  <DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
  class=137334317-05032008>With some trial and error I've managed to edit the 
  firmata firmware to control the chip as attached here. On Arduino you can 
  <STRONG>only</STRONG> use digital pins 10,11,12 and 13 for&nbsp; SPI... slave 
  select, data&nbsp;out, data in and spiclock. Since Firmata uses pin 13 to 
  flash its version number there was a bit of jostling to sort out, removing 
  that command from the void setup section, because otherwise it continues to 
  print the version number constantly&nbsp;when you go into the 
  loop.</SPAN></FONT></DIV>
  <DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
  class=137334317-05032008>So now I have the AD5206 tutorial patch running 
  within Firmata, which is fun. It would be&nbsp;<STRONG>more</STRONG> 
  fun&nbsp;and potentially creative however to have the commands sent by PD...is 
  that very difficult to do? Any clues anybody?</SPAN></FONT></DIV>
  <DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
  class=137334317-05032008>Nick</SPAN></FONT></DIV><BR>
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> Hans-Christoph Steiner [<A 
  href="mailto:hans@eds.org">mailto:hans@eds.org</A>] <BR><B>Sent:</B> 05 March 
  2008 16:50<BR><B>To:</B> nick burge<BR><B>Cc:</B> Pd List<BR><B>Subject:</B> 
  Re: [PD] Pduino and the AD5206 digital potentiometer<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV><BR class=webkit-block-placeholder></DIV>
  <DIV>I am unlikely to write software for that chip unless I have a use for it. 
  But a firmware supporting it sounds useful. Firmata is an Arduino library, so 
  the easiest route would probably make a dedicated firmware for that chip then 
  use the Firmata to handle the communications.</DIV>
  <DIV><BR class=webkit-block-placeholder></DIV>
  <DIV>.hc</DIV><BR>
  <DIV>
  <DIV>On Mar 5, 2008, at 4:43 AM, nick burge wrote:</DIV><BR 
  class=Apple-interchange-newline>
  <BLOCKQUOTE type="cite">
    <DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
    class=558172609-05032008>I got my AD206 chip as a free sample from analog 
    devices </SPAN></FONT></DIV>
    <DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
    class=558172609-05032008><A 
    href="http://www.analog.com/commerce/index.html">http://www.analog.com/commerce/index.html</A></SPAN></FONT></DIV>
    <DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
    class=558172609-05032008>It would be great to have support within Firmata 
    for SPI - (serial peripheral interface) allowing control over this digital 
    potentiometer or other devices and sensors that work with that protocol when 
    connected to an arduino. </SPAN></FONT></DIV>
    <DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
    class=558172609-05032008>Could it possibly work to simply copy sections of 
    the code from the arduino tutorial into the firmata firmware , first the 
    definitions, then the void setup section and then the write_pot(0,0) command 
    to control the device into the loop section.? As you can tell I have little 
    idea how to do this.</SPAN></FONT></DIV>
    <DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
    class=558172609-05032008>Nick.</SPAN></FONT></DIV><FONT face=Arial 
    color=#0000ff size=2></FONT><BR>
    <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
    <HR tabIndex=-1>
    <FONT face=Tahoma size=2><B>From:</B> Hans-Christoph Steiner [<A 
    href="mailto:hans@eds.org">mailto:hans@eds.org</A>] <BR><B>Sent:</B> 04 
    March 2008 14:39<BR><B>To:</B> nick burge<BR><B>Cc:</B> 'Pd 
    List'<BR><B>Subject:</B> Re: [PD] Pduino and the AD5206 digital 
    potentiometer<BR></FONT><BR></DIV>
    <DIV></DIV>
    <DIV><BR class=webkit-block-placeholder></DIV>
    <DIV>It would be possible to add support to Firmata for this, but it's not 
    currently there. I don't have any of these chips, any volunteers? Patches 
    welcome :D</DIV>
    <DIV><BR class=webkit-block-placeholder></DIV>
    <DIV>.hc</DIV><BR>
    <DIV>
    <DIV>On Feb 26, 2008, at 8:54 AM, nick burge wrote:</DIV><BR 
    class=Apple-interchange-newline>
    <BLOCKQUOTE type="cite">
      <DIV>
      <DIV><SPAN class=553015117-25022008><FONT face=Arial><FONT size=2><SPAN 
      class=988034707-26022008>Dear PD list. </SPAN>I would like to be able to 
      control the AD5206 chip (a 6 channel digital potentiometer) from within 
      the <SPAN class=988034707-26022008>P</SPAN>duino object<SPAN 
      class=988034707-26022008> written by Hans-Christoph Steiner</SPAN>. The 
      idea comes from one of the tutorial exercises in the C++ arduino 
      program.</FONT></FONT></SPAN></DIV>
      <DIV><SPAN class=553015117-25022008><FONT face=Arial size=2><A 
      title=blocked::http://www.arduino.cc/en/Tutorial/SPIDigitalPot 
      href="http://www.arduino.cc/en/Tutorial/SPIDigitalPot">http://www.arduino.cc/en/Tutorial/SPIDigitalPot</A></FONT></SPAN></DIV>
      <DIV><SPAN class=553015117-25022008><FONT face=Arial size=2>Is this 
      relatively simple to do<SPAN class=988034707-26022008>,</SPAN> or simply 
      impossible<SPAN class=988034707-26022008>?</SPAN> The aim in the long run 
      is to be able to be able to calibrate 6 force sensors remotely using the 
      digital potentiometers for an art installation 
project.</FONT></SPAN></DIV>
      <DIV><SPAN class=553015117-25022008><FONT face=Arial size=2>I have got the 
      <SPAN class=988034707-26022008>above mentioned </SPAN>tutorial project up 
      and running succesfully using the arduino program, and I am also able to 
      get Pduino communicating with the arduino quite happily<SPAN 
      class=988034707-26022008> on my Windows Vista system</SPAN>, but I would 
      imagine to have control over the the <SPAN 
      class=988034707-26022008>digital </SPAN>potentiometer device from within 
      PD would require a revision to the <SPAN class=988034707-26022008>Firmata 
      </SPAN>firmware would it not? I would be most grateful for a 
      clue.</FONT></SPAN></DIV>
      <DIV><SPAN class=553015117-25022008><FONT face=Arial 
      size=2></FONT></SPAN></DIV>
      <DIV><SPAN class=553015117-25022008><FONT face=Arial size=2>thank you for 
      your attention, sincerely, Nick Burge.</FONT></SPAN></DIV></DIV>
      <DIV 
      style="MARGIN: 0px">_______________________________________________</DIV>
      <DIV style="MARGIN: 0px"><A 
      href="mailto:PD-list@iem.at">PD-list@iem.at</A> mailing list</DIV>
      <DIV style="MARGIN: 0px">UNSUBSCRIBE and account-management -&gt; <A 
      href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</A></DIV></BLOCKQUOTE></DIV><BR>
    <DIV><SPAN class=Apple-style-span 
    style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; border-spacing: 0px 0px; -khtml-text-decorations-in-effect: none; -apple-text-size-adjust: auto; orphans: 2; widows: 2"><BR 
    class=Apple-interchange-newline>
    <DIV><BR class=khtml-block-placeholder></DIV>
    <DIV>----------------------------------------------------------------------------</DIV>
    <DIV><BR class=khtml-block-placeholder></DIV>
    <DIV>All information should be free. - the hacker ethic</DIV>
    <DIV><BR class=khtml-block-placeholder></DIV>
    <DIV><BR class=khtml-block-placeholder></DIV><BR 
    class=Apple-interchange-newline></SPAN></DIV><BR></BLOCKQUOTE></DIV><BR>
  <DIV><SPAN class=Apple-style-span 
  style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; border-spacing: 0px 0px; -khtml-text-decorations-in-effect: none; -apple-text-size-adjust: auto; orphans: 2; widows: 2"><BR 
  class=Apple-interchange-newline><SPAN class=Apple-style-span 
  style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; border-spacing: 0px 0px; -khtml-text-decorations-in-effect: none; -apple-text-size-adjust: auto; orphans: 2; widows: 2">
  <DIV><BR style="FONT-FAMILY: Tahoma"></DIV>
  <DIV>----------------------------------------------------------------------------<BR 
  style="FONT-FAMILY: Tahoma"></DIV>
  <DIV><BR class=khtml-block-placeholder></DIV>
  <DIV>Man has survived hitherto because he was too ignorant to know how to 
  realize his wishes. Now that he can realize them, he must either change them, 
  or perish. -William Carlos Williams</DIV><BR 
  class=Apple-interchange-newline></SPAN></SPAN></DIV><BR><SPAN>&lt;Pd_firmware.txt&gt;</SPAN></BLOCKQUOTE></DIV><BR>
<DIV><SPAN class=Apple-style-span 
style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; border-spacing: 0px 0px; -khtml-text-decorations-in-effect: none; -apple-text-size-adjust: auto; orphans: 2; widows: 2"><BR 
class=Apple-interchange-newline>
<DIV><BR class=khtml-block-placeholder></DIV>
<DIV><BR class=khtml-block-placeholder></DIV>
<DIV><BR></DIV>
<DIV>----------------------------------------------------------------------------<BR></DIV>
<DIV><BR class=khtml-block-placeholder></DIV>
<DIV>'You people have such restrictive dress for women,&#8217; she said, hobbling away 
in three inch heels and panty hose to finish out another pink-collar temp pool 
day.&nbsp; -&nbsp;&#8220;Hijab Scene #2", by&nbsp;Mohja Kahf</DIV><BR 
class=Apple-interchange-newline></SPAN></DIV><BR></BODY></HTML>