Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
_js8317mzq1os
_js8317mzq1os
API Reference

Anchor
_d66ki0xr2kep
_d66ki0xr2kep
Node.js

  • Online reference coming soon.

Anchor
_ola35e6g861a
_ola35e6g861a
Python

  • Online reference coming soon.

Anchor
_vt60ohlt755f
_vt60ohlt755f
Arduino (C/C++)

  • Online reference coming soon.

Anchor
_c33gvscawgha
_c33gvscawgha
GumbandConnection

A Gumband communication instance (only one can exist per device). Functions for this class are listed below:

Example Usage:

GumbandConnection MyGumband;

Anchor
_3y1dke63jfk1
_3y1dke63jfk1
begin()

Initiates the Gumband connection.

Syntax:

void begin()

void begin(uint8_t offline) //Begin in offline mode

Example Usage:

MyGumband.begin();

MyGumband.begin(1);

Anchor
_dz8r6e2d5c9e
_dz8r6e2d5c9e
id()

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.

Syntax:

void id(int id);

void id(const char* id);

Example Usage:

MyGumband.id(16);

MyGumband.id(“16”);

Anchor
_ekerxn9mpoz2
_ekerxn9mpoz2
username()

Set the Gumband master control server username. This must match the username created for this device within the Gumband UI.

Syntax:

void username(char* text);

Example Usage:

MyGumband.username(“MarlonBando”);

Anchor
_s55pd2npmuk4
_s55pd2npmuk4
password()

Set the Gumband master control server password. This must match the password created for this device within the Gumband UI.

Syntax:

void password(char* text);

Example Usage:

MyGumband.password(“P455W0RD!”);

Anchor
_8436ign0lah1
_8436ign0lah1
connected()

Returns ‘1’ if the Hardware has a valid network connection.

Syntax:

uint8_t connected();

Example Usage:

if(MyGumband.connected() == 1) { //Connected to Network }

Anchor
_exmbebr973f0
_exmbebr973f0
connectedMaster()

Returns ‘1’ if the Hardware has a valid master server connection.

Syntax:

uint8_t connectedMaster();

Example Usage:

if(MyGumband.connectedMaster() == 1) { //Connected to Master }

Anchor
_j3zciiu1d8j8
_j3zciiu1d8j8
connectedExhibit()

Returns ‘1’ if the Hardware has a valid Exhibit server connection.

Syntax:

uint8_t connectedExhibit();

Example Usage:

if(MyGumband.connectedExhibit() == 1) { //Connected to Exhibit }

Anchor
_jfhpxk8g7y7c
_jfhpxk8g7y7c
event()

Publish a text message to the ‘event’ log.

Syntax:

void event(char* text);

Example Usage:

MyGumband.event(“An event has occurred!”);

Anchor
_n7yxjdx0rsds
_n7yxjdx0rsds
error()

Publish a text message to the ‘error’ log.

Syntax:

void error(char* text);

Example Usage:

MyGumband.error(“An error has occurred!”);

Anchor
_bjzjxs3rve2f
_bjzjxs3rve2f
debug()

Publish a text message to the ‘debug’ log.

Syntax:

void debug(char* text);

Example Usage:

MyGumband.debug(“Something routine has occurred!”);

Anchor
_oiaohwwerp9u
_oiaohwwerp9u
print()

Print data to the Hardware USB serial port.

Syntax:

void print(char* text);

void print(char byte);

Example Usage:

MyGumband.print(“Hello World!”);

MyGumband.print(25);

Anchor
_avo7l8wq7y6c
_avo7l8wq7y6c
GumbandProperty

An instance of a Gumband property or endpoint. An individual instance must exist for every Gumband property in the Exhibit.

Example Usage:

GumbandProperty MyProperty;

Anchor
_i9qqlt12uh4l
_i9qqlt12uh4l
begin()

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.

Syntax:

int8_t begin(const char* periph, const char* prop, gmbnd_prop_type);

Example Usage

MyProperty.begin(“PeripheralName”, “PropertyName”, gmbnd_button);

Anchor
_l09nxxchcfvj
_l09nxxchcfvj
publish()

Publish data to the property endpoint.

Syntax:

void publish(int data);

void publish(uint8_t data);

void publish(uint32_t data);

void publish(uint8_t* data, uint8_t length);

Example Usage:

MyProperty.publish(234);

MyProperty.publish(values, 5); //values[5] = {3,5,8,1,0}

Anchor
_do2dqbzaj8g3
_do2dqbzaj8g3
AT Commands

Bundles support an AT command set over a serial interface.

Anchor
_ekwn0gt5lqpn
_ekwn0gt5lqpn
AT

Empty test command, Bundle will respond with “OK” if successfully receiving AT commands.

Anchor
_jxik8zgv6ee0
_jxik8zgv6ee0
AT+GBSET

Change or initialise Gumband settings.

Syntax:

AT+GBSET=<HardwareId>,<Firmware>

Example Usage:

AT+GBSET=7,10

Anchor
_p8isi8vwlwxp
_p8isi8vwlwxp
AT+GBAUTH

Set the Gumband Master server authorization credentials.

Syntax:

AT+GBAUTH=<Username>,<Password>

Example Usage:

AT+GBAUTH=”MarlonBando”,”P455W0RD!”

Anchor
_v4wnbewy5ze0
_v4wnbewy5ze0
AT+GBCREATE

Create a Publish or Subscribe Property

Syntax:

AT+GBCREATE=<Pub/Sub>,<Peripheral>,<Property>,<Type>

Example Usage:

AT+GBCREATE=Pub,”Front Panel”,Button,gmbnd_button

AT+GBCREATE=Sub,”Front Panel”,LED,gmbnd_led

Anchor
_tze5w4wc9pj2
_tze5w4wc9pj2
AT+GBPUB

Publish to a Property

Syntax:

AT+GBPUB=<Peripheral>,<Property>,<Data>

Example Usage:

AT+GBDEBUG=”Motor Enabled”

Anchor
_5bsluf66ckb1
_5bsluf66ckb1
AT+GBERROR

Publish an Error message.

Syntax:

AT+GBERROR=<Text>

Example Usage:

AT+GBERROR=”Motor Stall Detected!”

Anchor
_wvw0sm1tqzl1
_wvw0sm1tqzl1
AT+GBDEBUG

Publish a Debug message.

Syntax:

AT+GBDEBUG=<Text>

Example Usage:

AT+GBDEBUG=”Motor Enabled”

Anchor
_6xqt8ebnmpka
_6xqt8ebnmpka
AT+GBEVENT

Publish an Event message.

Syntax:

AT+GBEVENT=<Text>

Example Usage:

AT+GBEVENT=”A user pushed the start button”

Anchor
_1pne96d2xhz7
_1pne96d2xhz7
+GBSUB

Data from a subscribed property, this command is sent from the device and cannot be written to.

Syntax:

+GBSUB=<Peripheral>,<Property>,<Data>

Example Usage:

AT+GBSUB=”Front Panel”,LED,0x00F0

Anchor
_6x2mbsmp2s4x
_6x2mbsmp2s4x
Gumband Property Types

Property Type

Size

Description

gmbnd_button

1 byte

Momentary Button -
0 = Release

1 = Press
2 = Toggle/Moment

gmbnd_switch

1 bool (byte)

Toggle Switch -
0 = Off
1 = On

gmbnd_encoder

4 bytes

32-bit number

gmbnd_relay

1 bool (byte)

Relay -
0 = Off
1 = On

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)
A = alpha/brightness

RGBW = Color Bytes

gmbnd_byte

1 byte

Generic 8 bit number

gmbnd_int32

4 bytes

Generic 32 bit number