Device-Firmata

 view release on metacpan or  search on metacpan

presentation/index.html  view on Meta::CPAN

                    <td>0</td>
                    <td>0</td>
                    <td>0</td>
                    <td>0</td>
                    <td>0</td>
                    <td>0</td>
                  </tr>
                </table>

              </li>
              <li><a href="http://www.firmata.org/wiki/Protocol">v2.1 Protocol</a></li>
            </ul>
          </p>
        </div>

        <div class="slide">
          <h2>Perl Based Interface</h2>
          <p>
            Work in progress: <a href="http://github.com/ntruchsess/perl-firmata" target="_blank">Device::Firmata</a><br/><br/>
            <ul>
              <li>Spartan interface</li>
              <li>Use Device::SerialPort</li>
            </ul>
          </p>
        </div>

        <div class="slide">
          <h2>Example: Blink</h2>
          <p>
            <pre>
use Device::Firmata;
use Device::Firmata::Constants qw/:all/;

my $device = Device::Firmata-&gt;open('/dev/ttyUSB0');

$device-&gt;pin_mode(13=&gt;PIN_OUTPUT);
while (1) {
    $device-&gt;digital_write(13=&gt;1);
    sleep(1);
    $device-&gt;digital_write(13=&gt;0);
    sleep(1);
}</pre>
          </p>
        </div>

        <div class="slide">
          <h2>Non-demonstrated Features</h2>
          <p>
            <ul>
              <li>Digital Input - <small>$device-&gt;digital_read($pin)</small></li>
              <li>Analog Input - <small>$device-&gt;analog_read($pin)</small></li>
              <li>PWM! - <small>$device-&gt;analog_write($pin)</small></li>
            </ul>
          </p>
        </div>

        <div class="slide">
          <h2>Practical Uses?</h2>
          <p>
            <ul>
              <li>I/O for desktop applications (Very Poor Man's <a href="http://labjack.com/" target="_blank">Labjack</a>)</li>
              <li>Education/Study</li>
            </ul>
          </p>
        </div>

        <div class="slide">
          <h2>Example: Interface Exploration</h2>
          <p style="min-height:7em">
            <a href="http://www.sureelectronics.net/goods.php?id=1119" target="_blank">Sure Electronics: Red LED Matrix Board</a><br/>
            <img src="images/sureelectronics-32x8matrix.png" style="width:9em;float:left" />
            - 32x8 matrix<br/>
            - Driver IC: HT1632<br/>
            - <a href="images/DE-DP105_Ver1.0_EN_0.pdf" target="_blank">Specifications</a>...
          </p>
        </div>

        <div class="slide">
          <h2>HT1632 Specifications</h2>
          <p style="min-height:8em">
            Ugh.<br/><br/>

            <img src="images/HT1632-spec-0.png" style="float:left;margin:2px;width:2em" />
            <img src="images/HT1632-spec-1.png" style="float:left;margin:2px;width:2em" />
            <img src="images/HT1632-spec-2.png" style="float:left;margin:2px;width:2em" />
            <img src="images/HT1632-spec-3.png" style="float:left;margin:2px;width:2em" />
            <img src="images/HT1632-spec-4.png" style="float:left;margin:2px;width:2em" />
            <img src="images/HT1632-spec-5.png" style="float:left;margin:2px;width:2em" />
            <img src="images/HT1632-spec-6.png" style="float:left;margin:2px;width:2em" />
            <img src="images/HT1632-spec-7.png" style="float:left;margin:2px;width:2em" />
            <img src="images/HT1632-spec-8.png" style="float:left;margin:2px;width:2em" />
            <img src="images/HT1632-spec-9.png" style="float:left;margin:2px;width:2em" />
            <img src="images/HT1632-spec-10.png" style="float:left;margin:2px;width:2em" />
            <img src="images/HT1632-spec-11.png" style="float:left;margin:2px;width:2em" />
            <img src="images/HT1632-spec-12.png" style="float:left;margin:2px;width:2em" />
            <img src="images/HT1632-spec-13.png" style="float:left;margin:2px;width:2em" />
            <img src="images/HT1632-spec-14.png" style="float:left;margin:2px;width:2em" />
            <img src="images/HT1632-spec-15.png" style="float:left;margin:2px;width:2em" />
            <img src="images/HT1632-spec-16.png" style="float:left;margin:2px;width:2em" />
            <img src="images/HT1632-spec-17.png" style="float:left;margin:2px;width:2em" />
            <img src="images/HT1632-spec-18.png" style="float:left;margin:2px;width:2em" />
            <img src="images/HT1632-spec-19.png" style="float:left;margin:2px;width:2em" />

            <div style="clear:both">&nbsp;</div>

          </p>
        </div>

        <div class="slide">
          <h2>Prototyping the Interface</h2>
          <p>
            <ul>
              <li>Avoid save, compile, upload, reset, disappointment cycle!</li>
            </ul>
            <p><b>SO:</b></p>
            <ul>
              <li>Use Firmata to link Arduino and Perl</li>
              <li>Write signal implementation in Perl</li>
            </ul>
          </p>
        </div>



( run in 2.004 seconds using v1.01-cache-2.11-cpan-2398b32b56e )