Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Gumband Properties API

Functions to interact with Gumband properties. Gumband properties are end points which are used to control individual elements of the hardware system either from the debug dashboard or from exhibit software via the SDK.

gumbandCreate()

Creates a Gumband property endpoint.

Syntax:

GumbandProp gumbandCreate(const char peripheral, const char property, gmbnd_type_t type)

Example Usage:

GumbandProp motor_start = gumbandCreate("Motor", "Spin", gmbnd_bool);
GumbandProp motor_speed = gumbandCreate("Motor", "Speed", gmbnd_int32);

gumbandSetReadCallback()

Attach a callback to a Gumband property to be called when a read command is received from the exhibit or cloud servers.

Syntax:

int8_t gumbandSetReadCallback(GumbandProp handle, callback_func read_callback);

Example Usage:

gumbandSetWriteCallback()

Attach a callback to a Gumband property to be called when a write command is received from the exhibit or cloud servers.

Syntax:

int8_t gumbandSetWriteCallback(GumbandProp handle, callback_func write_callback);

Example Usage:

gumbandSetDescription()

Assign a text description to a Gumband property (visible on the Gumband cloud dashboard). Max text length is128 characters.

Syntax:

int8_t gumbandSetDescription(GumbandProp handle, const char* description);

Example Usage:

gumbandSetHidden()

Set the property as hidden to prevent it from being displayed on the Gumband cloud dashboard.

Syntax:

int8_t gumbandSetHidden(GumbandProp handle);

Example Usage:

gumbandClearHidden()

Set the property as visible (note this change will only be written if we also resubscribe to the server using gumbandSubscribe).

Syntax:

int8_t gumbandClearHidden(GumbandProp handle)

Example Usage:

gumbandPublish()

Syntax:

void gumbandPublish();

Example Usage:

gumbandPublishByte()

Syntax:

void gumbandPublishByte(GumbandProp handle, uint8_t data);

Example Usage:

gumbandPublishByteArray()

Syntax:

gumbandPublishByteArray(GumbandProp handle, uint8_t* data, uint8_t len);

Example Usage:

gumbandPublishInt()

Syntax:

void gumbandPublishInt(GumbandProp handle, uint32_t data);

Example Usage:

gumbandPublishIntArray()

Syntax:

void gumbandPublishIntArray(GumbandProp handle, uint32_t* data, uint8_t len);

Example Usage:

gumbandDebug()

Syntax:

void gumbandDebug(const char* text, ...);

Example Usage:

gumbandLog()

Syntax:

void gumbandDebug(const char* text, ...);

Example Usage:

gumbandError()

Syntax:

void gumbandError(const char* text, ...);

Example Usage

gumbandNotify()

Syntax:

void gumbandEvent(const char* text, uint32_t val);

Example Usage:

gumbandEvent()

Syntax:

void gumbandEvent(const char* text, uint32_t val);

Example Usage:


Gumband Configuration API

Functions to configure the Gumband hardware connections to the the Gumband hardware with Gumband properties. Gumband properties are end points which are used to control individual elements of the hardware system either from the debug dashboard or from exhibit software via the SDK.

gumbandSetUserFirmwareVer()

Syntax:

void gumbandSetUserFirmwareVer(uint8_t fw);

Notes: In most cases it is not recommended to use any of the following 4 functions to configure the hardware, these changes should be made via the configuration interface (link)

gumbandSetAuthToken()

Syntax:

void gumbandSetAuthToken(const char* text);


gumbandSetHardwareID()

Syntax:

void gumbandSetHardwareID(const char* text);


gumbandSetCloudServer()

Syntax:

void gumbandSetCloudServer(const char* addr);


gumbandSetExhibitServer()

Syntax:

void gumbandSetExhibitServer(const char* addr, uint8_t static_flag);


Gumband Status API

Functions to monitor the status of the Gumband hardware external connections.

gumbandConnected()

Syntax:

uint8_t gumbandConnected();


gumbandCloudConnected()

Syntax:

uint8_t gumbandCloudConnected();


gumbandExhibitConnected()

Syntax:

uint8_t gumbandExhibitConnected();

gumbandUSBConnected()

Syntax:
uint8_t gumbandUSBConnected();


Gumband Hardware API

Functions to control specific aspects of the physical Gumband hardware, support for these functions may vary depending on platform.

gumbandWriteUserData()

void gumbandWriteUserData(uint8_t index, uint8_t data);

gumbandReadUserData()


uint8_t gumbandReadUserData(uint8_t index);

gumbandLedSetBrightness()

void gumbandLedSetBrightness(uint8_t pwm);

gumbandLedOn()


void gumbandLedOn(void);

gumbandLedOff()


void gumbandLedOff(void);

gumbandLedToggle()


void gumbandLedToggle(void);

gumbandLedOut()


void gumbandLedOut(uint8_t state);

gumbandLedPWM()


void gumbandLedPWM(uint8_t pwm);

gumbandButtonPressed()

uint8_t gumbandButtonPressed();






  • No labels