Table of Contents |
---|
Anchor | ||
---|---|---|
|
...
|
...
|
Anchor | ||||
---|---|---|---|---|
|
Create a global Gumband object . This (must be declared as a global object.Initialize )
Create a hardware unit on the Gumband Infrastructureplatform
Set the Hardware ID. This is a unique value generated and assigned in the Gumband UI for each registered Hardware device. It is required to link Hardware to a specific Exhibit.
...
Alternatively, Gumband can be initialized in OFFLINE MODE. In OFFLINE MODE, MQTT messages are sent over USB.
...
*Note: See id() API Reference for detailed API documentation.
...
Anchor | ||||
---|---|---|---|---|
|
Set the Gumband Master control server username Set the Gumband Master control server and password
*Note: See See username() and password() API Reference for detailed API documentation.
...
Anchor | ||||
---|---|---|---|---|
|
Publish properties send information or I/O data to the Gumband Server. Publish properties can be things such as buttons state, switch state, dial position, etc.
Create GumbandProperty objects for every Gumband property in the exhibit.
Initialise each Gumband property. Publish properties are initiated using a property name, a peripheral name and a property type.
...
*Note: See GumbandProperty API Reference for detailed API documentation.
...
Anchor | ||||
---|---|---|---|---|
|
Subscribe properties receive information or other data from the Gumband Server. Subscribe properties are things such as LED colour, LED brightness, relay state, motor speed, motor position, etc.
Create Gumband properties to which we subscribe to receive data.
Subscribe properties are created using a property name, a peripheral name and a property type.
*Note: See API Reference for detailed API documentation
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Publish some arbitrary data (e.g. data from an encoder).
Obtain data. In this case we call a function where data from the encoder is decoded (line 89).
Call publish() with the peripheral and property names we created earlier, as well as the decoded data.
Publish a single byte of data (e.g. button state).
Obtain data. In this case we call a function that reads the button state (line 97).
Call publish() with the peripheral and property names we created earlier, as well as the button state data.
Publish an array of data (e.g. the last few encoder positions).
Obtain data. In this case, we call a function where data from the encoder is decoded and the last five encoder values are stored (line 109).
Call publish with the peripheral and property names we created earlier, as well as the decoded data and the length of the array where that data is stored.
...
*Note: See publish() API Reference for detailed API documentation.
...
Anchor | ||||
---|---|---|---|---|
|
Publish an event message to the Gumband event log using event().
Publish a debug message to the Gumband debug log using debug().
...
*Note: See API Reference for detailed API documentation