<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>Hey, no worries. The only indication to me was the very brief reference to it in the forum post i linked to, and the line in the firmata.h file:<br>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div><br>
</div>
<div>#define SHIFT_DATA              0x75 // a bitstream to/from a shift register<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>So thought I’d ask on the off chance it was an undocumented feature . . .<br>
</div>
<div><br>
</div>
<div>I'm sure it is possible to hack together the shiftOut() function in pd, though as I’m not a programmer how to do that is not immediately obvious to me,* so guess i was hoping that there was a ‘proper’ or more efficient way to do it via pduino.
<br>
</div>
<div><br>
</div>
<div>As you suggest it’s probably better to do the shift register stuff directly on the arduino, but i’m already in quite deep with pduino for this particular project. .
<br>
</div>
<div><br>
</div>
<div>anyway, thanks for your replies ! <br>
</div>
<div><br>
</div>
<div><span>*source code for shiftOut():<br>
</span>
<div><br>
</div>
<div>void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val)<br>
</div>
<div>{<br>
</div>
<div>uint8_t i;<br>
</div>
<div><br>
</div>
<div>for (i = 0; i < 8; i++)  {<br>
</div>
<div> if (bitOrder == LSBFIRST)<br>
</div>
<div>  digitalWrite(dataPin, !!(val & (1 << i)));<br>
</div>
<div> else <br>
</div>
<div>  digitalWrite(dataPin, !!(val & (1 << (7 - i))));<br>
</div>
<div>  <br>
</div>
<div> digitalWrite(clockPin, HIGH);<br>
</div>
<div> digitalWrite(clockPin, LOW);  <br>
</div>
<div>}<br>
</div>
<span>}</span><br>
</div>
<span></span><br>
</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Pd-list <pd-list-bounces@lists.iem.at> on behalf of Roman Haefeli <reduzent@gmail.com><br>
<b>Sent:</b> Monday, 1 July 2019 3:21 AM<br>
<b>To:</b> pd-list@lists.iem.at<br>
<b>Subject:</b> Re: [PD] Pduino and shift registers</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">On Sat, 2019-06-29 at 14:23 +0200, Simon Iten wrote:<br>
> i think you should be able to control a shift register<br>
>  from pd within the existing architecture.<br>
> <br>
> if you can access those 3 pins from pd just send them the HIGHs and<br>
> LOWs you would send in arduino code…<br>
<br>
Theoretically yes, but it's probably slow and unreliable. If you could<br>
just send the desired bit states from Pd and let the Arduino deal with<br>
timing and ordering, data transmission would have less overhead would<br>
likely be more reliable.<br>
<br>
One could still write a little code snippet for the Arduino and an<br>
complementary abstraction based on comport to do something like this.<br>
Right now, I would not know how to make that part of Firmata and<br>
pduino.<br>
<br>
Roman<br>
</div>
</span></font></div>
</body>
</html>