...
To update or install the Gumband Core select the "M0p" core from the boards menu and flash the device with a blank sketch (or any sketch)
Note: This only needs to happen once, either with new blank hardware or to update to the latest Gumband version
To upload your sketch select the "M4 (user code)" core from the boards menu and flash the device.
Under File > Examples > Basics are some examples of how to use the device hardware like blinking the on-board LED and using the user button.
Under File > Examples > Gumband API are some examples of using the Gumband API to create properties (hardware endpoints).
Windows, missing DLL
Depending on your environment you may encounter an error during compilation on Windows. To fix this you’ll need to install the Microsoft C++ runtime libraries https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170
Info |
---|
Having trouble programming? To manually enter the bootloader, reboot the device while holding the user button (useful if the upload fails or a sketch bricks the device). A reboot can be achieved by manually power cycling or pressing the reset button. |
...
Configuring the Hardware
Talking to the Device
...
Info |
---|
You can send |
Creating Credentials
To create credentials for the new device, you’ll need to login to app.gumband.com. Follow the steps outlined here or in Hardware UI | Create new Hardware
Navigate to Sites > [Project Site] > Hardware > Create Hardware.
...
2. Create a descriptive name (this is visible to everyone in the organization so include your name or initials or project name as applicable, for example “Thomas Test” or instead of simply “Test”).
The software will automatically generate a unique hardware ID and authentication token to use on the hardware. Copy this token to your clipboard; you’ll need it in a second to finish configuring the hardware.
Note |
---|
If you lose this authentication token, you can create a new one anytime from the ‘Auth’ tab on the Gumband dashboard. |
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Description | Command |
Set Hardware ID |
|
Set Authentication Token |
|
Set Cloud Server |
|
|
| |
Enable Cloud Server |
|
Reboot the device |
|
...
Once your hardware device is plugged into the network via Ethernet cable, it should be online and should appear as connected on the online console in addition to your device’s LED pulsating cyan.
...
Info |
---|
See Gumband LED Status for a list of all status LED colors. |
Cloud Encryption
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
By default the hardware will try to connect to the cloud with an encrypted connection. |
To disable the encryption, further configure the device with the below commands.
...
Description | Command |
Set Cloud Server (Unencrypted) |
|
Disable TLS encryption |
|
Reboot the device |
|
...
Tips for Writing Gumband User Application Code
Gumband only checks for callbacks once at the end of every iteration of the
loop()
function. In general, it's a bad idea to use delays within thisloop()
function because it inhibits the system from checking callbacks constantly.When reading data from a callback function, you need to cast the incoming data to get it in a usable form. This allows you to more easily use the data more than once if necessary. The type you cast it to should match the type of data of the peripheral.
Ex: Use
Code Block language arduino int32_t* dat = (int32_t*)data;
for the
gmbnd_int32
typeThe Gumband API also includes type casting macros for each supported Gumband datatype. For example, to accomplish the same thing as above using only Gumband API features:
Code Block language arduino gmbnd_int32 dat = GUMBAND_INT32(data);
Peripheral/Property names can only be 15 characters, anything longer will be truncated.
The on-board LED and button work with
digitalWrite()
functions using theLED_BUILTIN
andBUTTON_BUILTIN
pin assignments. However, you can also use the customgumbandLed()
On/Off/Toggle/SetBrightness andgumbandButtonPressed()
functions within the Gumband API.The on-board button does not need to be initialized with
pinMode()
; it will work automatically. It will not work properly if reconfigured toINPUT_PULLUP
orINPUT_PULLDOWN
.Initializing pins with
pinMode()
is not necessary for most I/O. They will be initialized automatically when calling digital/analog read/write. To configure pullup/pulldown resistors,pinMode()
is necessary, however.
...