Nice work!  I imagine that it must be possible to have the SPI-specific messages sent via Firmata.  I don't have a clear picture of what all is needed.  But if there are specific message types needed, then there is plenty of room in the protocol to add SPI messages.  For example, we just added Servo messages in an alpha version.

.hc

On Mar 5, 2008, at 1:08 PM, nick burge wrote:

With some trial and error I've managed to edit the firmata firmware to control the chip as attached here. On Arduino you can only use digital pins 10,11,12 and 13 for  SPI... slave select, data 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 when you go into the loop.
So now I have the AD5206 tutorial patch running within Firmata, which is fun. It would be more fun and potentially creative however to have the commands sent by PD...is that very difficult to do? Any clues anybody?
Nick


From: Hans-Christoph Steiner [mailto:hans@eds.org]
Sent: 05 March 2008 16:50
To: nick burge
Cc: Pd List
Subject: Re: [PD] Pduino and the AD5206 digital potentiometer


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.

.hc

On Mar 5, 2008, at 4:43 AM, nick burge wrote:

I got my AD206 chip as a free sample from analog devices
http://www.analog.com/commerce/index.html
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.
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.
Nick.


From: Hans-Christoph Steiner [mailto:hans@eds.org]
Sent: 04 March 2008 14:39
To: nick burge
Cc: 'Pd List'
Subject: Re: [PD] Pduino and the AD5206 digital potentiometer


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

.hc

On Feb 26, 2008, at 8:54 AM, nick burge wrote:

Dear PD list. I would like to be able to control the AD5206 chip (a 6 channel digital potentiometer) from within the Pduino object written by Hans-Christoph Steiner. The idea comes from one of the tutorial exercises in the C++ arduino program.
Is this relatively simple to do, or simply impossible? 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.
I have got the above mentioned tutorial project up and running succesfully using the arduino program, and I am also able to get Pduino communicating with the arduino quite happily on my Windows Vista system, but I would imagine to have control over the the digital potentiometer device from within PD would require a revision to the Firmata firmware would it not? I would be most grateful for a clue.
thank you for your attention, sincerely, Nick Burge.
_______________________________________________
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list



----------------------------------------------------------------------------

All information should be free. - the hacker ethic







----------------------------------------------------------------------------

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


<Pd_firmware.txt>





----------------------------------------------------------------------------

'You people have such restrictive dress for women,’ she said, hobbling away in three inch heels and panty hose to finish out another pink-collar temp pool day.  - “Hijab Scene #2", by Mohja Kahf