Discussion:
[mh] Serial_Item question
Johan
2010-03-06 17:17:34 UTC
Permalink
Hi there,

I'm having some fun with an Arduino and want to connect it to Mister
House via a USB serial interface.
The idea is to set/clear several outputs of the Arduino from MH.

I have a question regarding the structure on how to do this right.

Is it possible to create several new "Serial_Items" in MH which all
use the same serial port, but with different commands/data?
Or do I need to create my own "Arduino_Items" that inherit from a
single "Serial_Item"?


I tried the first solution, but it doesn't seem to work right, but it
could also be due to bugs in the current code.


Best regards,

Johan.
Bazyle
2010-03-07 19:51:13 UTC
Permalink
I assume you have set the Arduino serial port to accept command strings. You
can find some example explanations in the MH Twiki under the Weeder board
programming instructions. The data is different but the Weeder boards are
serial controled in a similar way. You can set up several command sequences
to be sent to a single serial item but do not set several serial items as
the same port. This is because although outgoing data probably would work
the incoming data from the board might upset MH as it wouldn't understand
which item had sent it. Also note that MH always sends a <CR> at the end of
a sequence and expects incoming data to provide a <CR> before it will
process it.
I don't know whether the usb aspect causes problems.
Post by Johan
I'm having some fun with an Arduino and want to connect it to Mister
House via a USB serial interface.
The idea is to set/clear several outputs of the Arduino from MH.
......
Johan.
------------------------------------------------------------------------------
--
View this message in context: http://old.nabble.com/Serial_Item-question-tp27805806p27814012.html
Sent from the Misterhouse - User mailing list archive at Nabble.com.
Loading...