Expand | ||||||
---|---|---|---|---|---|---|
| ||||||
|
...
Code Block | ||
---|---|---|
| ||
// Create all peripherals and their properties GumbandProp first_prop = gumbandCreate("My Peripheral", "First", gmbnd_byte); GumbandProp second_prop = gumbandCreate("My Peripheral", "Second", gmbnd_byte); ... // Register the peripherals and properties with the broker gumbandSubscribe(); |
gumbandPublish()
TBD on the implementation of this, but the intent is to be a type agnostic way to publish.
Syntax:
void gumbandPublish();
...
Send a notification message to the Cloud. Anyone who is subscribed to notification messages for this hardware will immediately receive an email notification with the message. <Link to details for how to subscribe to notifications>
Syntax:
void gumbandNotify(const char* text, ...);
...
Note |
---|
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:
...
Functions to control specific aspects of the physical Gumband hardware, support for these functions may vary depending on platform.
gumbandWriteUserData()
Syntax:
void gumbandWriteUserData(uint8_t index, uint8_t data);
gumbandReadUserData()
Syntax:
uint8_t gumbandReadUserData(uint8_t index);
gumbandLedSetBrightness()
Syntax:
void gumbandLedSetBrightness(uint8_t pwm);
gumbandLedOn()
Syntax:
void gumbandLedOn(void);
gumbandLedOff()
Syntax:
void gumbandLedOff(void);
gumbandLedToggle()
Syntax:
void gumbandLedToggle(void);
gumbandLedOut()
Syntax:
void gumbandLedOut(uint8_t state);
gumbandLedPWM()
Syntax:
void gumbandLedPWM(uint8_t pwm);
gumbandButtonPressed()
Syntax:
uint8_t gumbandButtonPressed(void);