Board - dtex/NodebotUI GitHub Wiki
The Board
class constructs an object that maps to a Board in Johnny-Five.
Boards are represented in the HTML by a <form>
element that has a unique ID attribute and a data-device-type attribute of "Board". This example:
<form id="sampleBoard" data-device-type="board"></form>
will initialize a board in the NodebotUI server.
Attribute Name | Type | Value(s) | Description | Required |
---|---|---|---|---|
id | String | Any string that starts with an alpha or _ | A unique identifier. This value must not be used on any other element | yes |
data-device-type | String | Board | Indicates device type being used. | yes |
data-port | String | eg: /dev/ttyAM0" or "COM1" | Path or name of device port/COM | no |
Child of of Window.nodebotui
Parent of BrowserControl
Board._ready
- Boolean, true or false
Indicates if the server has completed the handshake sequence and returned a "board ready" event.
Board._element
- The id of the form element associated with the board.
Board.initialize()
- Call initialize on each of the descendant Input and BrowserControl elements. This is called automatically on page load and should not need to be called by the user.
Board.getInputs()
- Traverse the DOM and find all subordinate input and fieldset elements, and create their associated objects. This is called automatically on page load and should not need to be called by the user.