From: Karl S. <kar...@gm...> - 2011-06-11 13:30:35
|
Jim, Thanks for letting me know about the new Owfs_DS2408 that is out there. I will have to start playing with it. I find it interesting that the sensor return a value inverse to what one would expect when checking the sensed parameter. Thanks for adjusting for that in the code. Karl On Thu, Jun 9, 2011 at 8:01 PM, Jim Duda <ji...@du...> wrote: > On 06/09/2011 07:28 PM, Jim Duda wrote: > > > Karl, > > > > If your using the latest SVN, you should be able to do this: > > > > $decklights = new Owfs_DS2408 ( "29.484606000000", "Deck Lights", 0 ); # > decklights > > > > $statenow = $decklights->get_sensed( ); > > > > This *should* return 1 or 0. If not, let me know and it's easily > repaired. > > See lib/Owfs_Item::Owfs_DS2408 package. > > Karl, > > I just tested Owfs_DS2408 and indeed found a problem, as you did yourself. > I have committed a fix in SVN such that Owfs_DS2408::get_sensed( ) properly > returns 1 or 0. > > You might find this object better for you needs as it might avoid some > loop stalls. > > $decklights = new Owfs_DS2408 ( "29.484606000000", "Deck Lights", 0, > $interval ); # decklights > > The $interval parameter in the constructor controls the "polling" loop of > fetching data > from OWFS. If you can tolerate a few seconds of delay, you can set > $interval to 2 or 3, > or whatever you need. > > Jim > > > > ------------------------------------------------------------------------------ > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image > Editing and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev > ________________________________________________________ > To unsubscribe from this list, go to: > http://sourceforge.net/mail/?group_id=1365 > > |