...
Online reference coming soon.
...
Table of Contents |
---|
Anchor | ||||
---|---|---|---|---|
|
...
Anchor | ||||
---|---|---|---|---|
|
A Gumband communication instance (only one can exist per device). Functions for this class are listed below:
...
GumbandConnection MyGumband;
Anchor | ||||
---|---|---|---|---|
|
Initiates the Gumband connection.
...
MyGumband.begin();
MyGumband.begin(1);
Anchor | ||||
---|---|---|---|---|
|
Sets the Hardware ID of the Gumband Hardware. This is a unique identifier generated by the Gumband UI. Each separate registered Gumband Hardware device receives its own ID. This ID is required to link Hardware to a specific Exhibit in the Gumband UI.
...
MyGumband.id(16);
MyGumband.id(“16”);
Anchor | ||||
---|---|---|---|---|
|
Set the Gumband master control server username. This must match the username created for this device within the Gumband UI.
...
MyGumband.username(“MarlonBando”);
Anchor | ||||
---|---|---|---|---|
|
Set the Gumband master control server password. This must match the password created for this device within the Gumband UI.
...
MyGumband.password(“P455W0RD!”);
Anchor | ||||
---|---|---|---|---|
|
Returns ‘1’ if the Hardware has a valid network connection.
...
if(MyGumband.connected() == 1) { //Connected to Network }
Anchor | ||||
---|---|---|---|---|
|
Returns ‘1’ if the Hardware has a valid master server connection.
...
if(MyGumband.connectedMaster() == 1) { //Connected to Master }
Anchor | ||||
---|---|---|---|---|
|
Returns ‘1’ if the Hardware has a valid Exhibit server connection.
...
if(MyGumband.connectedExhibit() == 1) { //Connected to Exhibit }
Anchor | ||||
---|---|---|---|---|
|
Publish a text message to the ‘event’ log.
...
MyGumband.event(“An event has occurred!”);
Anchor | ||||
---|---|---|---|---|
|
Publish a text message to the ‘error’ log.
...
MyGumband.error(“An error has occurred!”);
Anchor | ||||
---|---|---|---|---|
|
Publish a text message to the ‘debug’ log.
...
MyGumband.debug(“Something routine has occurred!”);
Anchor | ||||
---|---|---|---|---|
|
Print data to the Hardware USB serial port.
...
MyGumband.print(“Hello World!”);
MyGumband.print(25);
Anchor | ||||
---|---|---|---|---|
|
An instance of a Gumband property or endpoint. An individual instance must exist for every Gumband property in the Exhibit.
...
GumbandProperty MyProperty;
Anchor | ||||
---|---|---|---|---|
|
This function creates a named property within a named peripheral container and registers it with the Gumband server so we can publish or subscribe to it. A Gumband instance must first exist before this function will succeed.
...
MyProperty.begin(“PeripheralName”, “PropertyName”, gmbnd_button);
Anchor | ||||
---|---|---|---|---|
|
Publish data to the property endpoint.
...
Bundles support an AT command set over a serial interface.
Anchor | ||||
---|---|---|---|---|
|
Empty test command, Bundle will respond with “OK” if successfully receiving AT commands.
Anchor | ||||
---|---|---|---|---|
|
Change or initialise Gumband settings.
...
Example Usage:
AT+GBSET=7,10
Anchor | ||||
---|---|---|---|---|
|
Set the Gumband Master server authorization credentials.
...
AT+GBAUTH=”MarlonBando”,”P455W0RD!”
Anchor | ||||
---|---|---|---|---|
|
Create a Publish or Subscribe Property
...
AT+GBCREATE=Sub,”Front Panel”,LED,gmbnd_led
Anchor | ||||
---|---|---|---|---|
|
Publish to a Property
Syntax:
...
AT+GBDEBUG=”Motor Enabled”
Anchor | ||||
---|---|---|---|---|
|
Publish an Error message.
...
AT+GBERROR=”Motor Stall Detected!”
Anchor | ||||
---|---|---|---|---|
|
Publish a Debug message.
Syntax:
...
AT+GBDEBUG=”Motor Enabled”
Anchor | ||||
---|---|---|---|---|
|
Publish an Event message.
...
AT+GBEVENT=”A user pushed the start button”
Anchor | ||||
---|---|---|---|---|
|
Data from a subscribed property, this command is sent from the device and cannot be written to.
...
AT+GBSUB=”Front Panel”,LED,0x00F0
Anchor | ||||
---|---|---|---|---|
|
Property Type | Size | Description |
gmbnd_button | 1 byte | Momentary Button - 1 = Press |
gmbnd_switch | 1 bool (byte) | Toggle Switch - |
gmbnd_encoder | 4 bytes | 32-bit number |
gmbnd_relay | 1 bool (byte) | Relay - |
gmbnd_pwm | 4 bytes | PWM Duty Cycle |
gmbnd_led | 2 bytes | Brightness |
gmbnd_motor_position | 4 bytes | |
gmbnd_motor_speed | 4 bytes | |
gmbnd_motor_accel | 4 bytes | |
gmbnd_step_motor | 4 bytes | |
gmbnd_addr_led | 7 bytes | IARGBW I = Index (16bit) RGBW = Color Bytes |
gmbnd_byte | 1 byte | Generic 8 bit number |
gmbnd_int32 | 4 bytes | Generic 32 bit number |