From tmurray at wumpus-cave.net Tue Jul 29 15:41:14 2014 From: tmurray at wumpus-cave.net (Timm Murray) Date: Tue, 29 Jul 2014 17:41:14 -0500 Subject: [Hardware-pm] Perl WebIO Equivalent In-Reply-To: References: Message-ID: So I've been hacking away at this, and it's gotten up to escaping onto github. https://github.com/frezik/Device-WebIO This implements an interface that gives devices the same external API. You register objects that implement one or more of the Device::WebIO::Device::* roles: $webio->register( 'rpi', $rpi ); $webio->register( 'pcduino', $pcduino ); And then call pin functions using the names given above and their pins: $webio->set_as_input( 'rpi', 0 ); $webio->set_as_output( 'rpi', 1 ); my $pin_0 = $webio->digital_input( 'rpi', 0 ); $webio->digital_output( 'rpi', 1, $pin_0 ); Roles for GPIO, ADC, and PWM are mostly set. On the TODO list are I2C, SPI, 1-Wire, Serial, and Video streams. Also to be done are implementing specific sensors for temperature, pressure, etc. There's also a start on the WebIOPi REST interface: https://github.com/frezik/Device-WebIO-Dancer This implements most of the GPIO interface: POST /devices/rpi/0/function/IN GET /devices/rpi/0/value Thanks, Timm On Tue, Jul 22, 2014 at 8:34 AM, Timm Murray wrote: > So I was thinking about doing a garage door opener with Raspberry Pi, and > in Adafruit's tutorial, there was a link to WebIO: > > https://code.google.com/p/webiopi/ > > This provides a framework with a REST API for controlling the Pi's control > pins from a browser. It's written in Python, and the REST API is > documented in the tutorial sections for the devices: > > https://code.google.com/p/webiopi/wiki/Tutorial_Devices > > I'd like to see a Perl equivalent with some improvements: > > * Written with Mojo or Dancer (I'm partial to Mojo, but not strongly), > plus Moose (Moo? Mo?) > * Supports cameras with an HTML5 video stream > * Plugable backends to support the Rpi, pcDuino, or any of the dozens of > other single board computers that are coming out > > It'll be a fair-sized project. Is anybody else interested in working on > this? > > Thanks, > Timm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zak.zebrowski at gmail.com Wed Jul 30 08:07:45 2014 From: zak.zebrowski at gmail.com (Zachary Zebrowski) Date: Wed, 30 Jul 2014 11:07:45 -0400 Subject: [Hardware-pm] Perl WebIO Equivalent In-Reply-To: References: Message-ID: Very cool, will play with it at some point. :) Zak On Tue, Jul 29, 2014 at 6:41 PM, Timm Murray wrote: > So I've been hacking away at this, and it's gotten up to escaping onto > github. > > https://github.com/frezik/Device-WebIO > > This implements an interface that gives devices the same external API. > You register objects that implement one or more of the > Device::WebIO::Device::* roles: > > $webio->register( 'rpi', $rpi ); > $webio->register( 'pcduino', $pcduino ); > > And then call pin functions using the names given above and their pins: > > $webio->set_as_input( 'rpi', 0 ); > $webio->set_as_output( 'rpi', 1 ); > my $pin_0 = $webio->digital_input( 'rpi', 0 ); > $webio->digital_output( 'rpi', 1, $pin_0 ); > > Roles for GPIO, ADC, and PWM are mostly set. On the TODO list are I2C, > SPI, 1-Wire, Serial, and Video streams. Also to be done are implementing > specific sensors for temperature, pressure, etc. > > There's also a start on the WebIOPi REST interface: > > https://github.com/frezik/Device-WebIO-Dancer > > This implements most of the GPIO interface: > > POST /devices/rpi/0/function/IN > GET /devices/rpi/0/value > > > > Thanks, > Timm > > > On Tue, Jul 22, 2014 at 8:34 AM, Timm Murray > wrote: > >> So I was thinking about doing a garage door opener with Raspberry Pi, and >> in Adafruit's tutorial, there was a link to WebIO: >> >> https://code.google.com/p/webiopi/ >> >> This provides a framework with a REST API for controlling the Pi's >> control pins from a browser. It's written in Python, and the REST API is >> documented in the tutorial sections for the devices: >> >> https://code.google.com/p/webiopi/wiki/Tutorial_Devices >> >> I'd like to see a Perl equivalent with some improvements: >> >> * Written with Mojo or Dancer (I'm partial to Mojo, but not strongly), >> plus Moose (Moo? Mo?) >> * Supports cameras with an HTML5 video stream >> * Plugable backends to support the Rpi, pcDuino, or any of the dozens of >> other single board computers that are coming out >> >> It'll be a fair-sized project. Is anybody else interested in working on >> this? >> >> Thanks, >> Timm >> > > > _______________________________________________ > Hardware-pm mailing list > Hardware-pm at pm.org > http://mail.pm.org/mailman/listinfo/hardware-pm > > -------------- next part -------------- An HTML attachment was scrubbed... URL: