Difference between revisions of "Mother Arduino"
(One intermediate revision by the same user not shown) | |||
Line 23: | Line 23: | ||
*SOM = Start of Message | *SOM = Start of Message | ||
*EOM = End of Message | *EOM = End of Message | ||
− | * | + | *XT = Extra Data |
*DC = Device Code | *DC = Device Code | ||
*DV = Device Value | *DV = Device Value | ||
Line 40: | Line 40: | ||
!style="border-style: solid; border-width: 1px"|SOM | !style="border-style: solid; border-width: 1px"|SOM | ||
!style="border-style: solid; border-width: 1px"|BgDl | !style="border-style: solid; border-width: 1px"|BgDl | ||
− | !style="border-style: solid; border-width: 1px"| | + | !style="border-style: solid; border-width: 1px"|XT1 |
!style="border-style: solid; border-width: 1px"|SmDl | !style="border-style: solid; border-width: 1px"|SmDl | ||
− | !style="border-style: solid; border-width: 1px"| | + | !style="border-style: solid; border-width: 1px"|XT2 |
!style="border-style: solid; border-width: 1px"|BgDl | !style="border-style: solid; border-width: 1px"|BgDl | ||
!style="border-style: solid; border-width: 1px"|DC1 | !style="border-style: solid; border-width: 1px"|DC1 |
Latest revision as of 13:13, 14 January 2012
Contents
MotherStatus | Mother To-Do List | Mother Wish List | MotherMain
Overview
The goal is to allow Mother to be able to monitor and control Arduino boards and devices. The solution consist of a sketch that can be loaded onto any arduino and allow all pins to be updated to the mother system.
Method of Integration
Integration of arduino boards consist of the following scripts:
- Mother script to open the corresponding com port and monitor for serial data
- Mother script triggered by incoming data on monitored com port to parse data and set devices as needed
- Arduino sketch that updates device values as they change and that allows the Arduino to receive device control commands from Mother
Protocols
Definitions
- MT = Message Type
- DVU = Device Value Update Message
- SmDl = Small Delimiter
- BgDl = Big Delimiter
- HS = Handshake
- WA = Wants Ack
- Ack = Confirm Received
- MSC = Message Segment Count
- SOM = Start of Message
- EOM = End of Message
- XT = Extra Data
- DC = Device Code
- DV = Device Value
Message Example
Type: Device Value Update String
" | MT | SmDl | HS | BgDl | MSC | SmDl | SOM | BgDl | XT1 | SmDl | XT2 | BgDl | DC1 | SmDl | DV1 | BgDl | DC2 | SmDl | DV2 | BgDl | EOM | " |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DVU | : | WA | | | 2 | : | SOM | | | x | : | x | | | A1 | : | 1 | | | A2 | : | 0 | | | EOM |
Message Details
Each message consist of two portions: Message details and Message Data. Message details include all data from the start of the message to the SOM segment and contains information describing thy type of data included in the message and how the data should be handled. All portions of a message are divided into multiple message segments. Message segments are defined as all the data in between two Large Delimiters. The starting and ending segments do not contain a starting or trailing Big Delimeter. Each segment consist of two pieces of segment data which are seperated by a colon.
Mother Device/Ardunio Pin Number Relations
Each Ardunio connected to Mother is given its own Mother HouseCode (Valid house codes are any letter from a-z, and is defined in the arduino sketch.) This needs to be a "clean" house code with not existing devices. Since arduino uses pins 0 and 1 for serial transmission, the first pin to be used as a Mother device is Arduinos Pin2. In order to keep consistency between Mother DeviceCodes and ArdunioPins we use MotherDeviceCode2 as the first device code which relates to Arduino Pin2. So for an ardunio set with a house code of "A", pin2 would be seen as MotherDevice A2. Mother will use A1 to store this specific arduino's extra details. These extra details are contained in the Message Details section of each message within the "XT" segment. These values have yet to be defined or implemented.