From: Bruce W. <br...@mi...> - 2001-02-09 03:53:49
|
I don't have a new weeder kit, and I couldn't tell from the example that Craig sent in (in mh/code/examples), but I wonder if the problem is your weeder IO's are in a digital input, rather than digital output state. Maybe ASC/ASF are condition it as Switch input signals and all you need to do is send the command to init them to outputs? To debug, I would setup a test command so you can try toggleing the speaker directly. Or maybe something as simple as this: set $pa_bedroom TOGGLE if new_second 3; Then play some anoying music and see if the spouse complains every 3 seconds :) Bruce > Still having problems. I got the error fixed but mh still won't turn the > speaker on with the speak command. It speaks but not to any room. > I noticed > when I run mh from a terminal window and do a read on the port, > the string is > reversed. It returns unmatched incoming serial data=AFL, when it > should be > ALF for off. Here is what I have setup. It is the new style weeder board. > Thanks David > > items.pl > ### Digital ports > > $digital_read_port_A = new Serial_Item('ARP'); > $digital_read_results= new Serial_Item('D'); > $digital_write_port_A = new Serial_Item('AW'); > > # digital items > $frontdoor = new Serial_Item('ACH', OPENED); > $frontdoor -> add ('ACL', CLOSED); > $frontdoor -> add ('ASC', 'init'); > $frontdoor -> add ('ARC', 'read'); > > # pa items > $pa_bedroom = new Serial_Item('AHF', ON); > $pa_bedroom -> add ('ALF', OFF); > $pa_bedroom -> add ('ASF','init'); > $pa_bedroom -> add ('ARF','read'); |