Arduino support for Seeed Wio Terminal

Dear readers,

I use Cayenne for some projects involving a Raspberry Pi. Last week I got a Seeed Wio Terminal and I would like to use it with Cayenne too. Sadly I don’t get it working because I have almost no knowledge with the Arduino IDE (and I have to use the Arduino IDE for WiFi functions). I checked for libraries which support Cayenne and the Wio Terminal or at least the SAMD51 microcontroller, but didn’t find anything. If I use the Cayenne examples I get always errors like:

fatal error: WiFi101.h: No such file or directory

and:

Error compiling for board Seeeduino Wio Terminal.

So I tried replacing the code snippet which includes the WiFi101.h to rpcWiFi.h (which works for the Wio Terminal), but then I end up with this error:

WiFi101Shield:38:23: error: expected constructor, destructor, or type conversion before ‘;’ token
CAYENNE_OUT_DEFAULT()
^
WiFi101Shield:50:22: error: expected constructor, destructor, or type conversion before ‘;’ token
CAYENNE_IN_DEFAULT()
^
/var/folders/js/bx64jptd3zng91q6817lf26m0000gn/T/arduino_modified_sketch_747223/WiFi101Shield.ino: In function ‘void setup()’:
WiFi101Shield:29:2: error: ‘Cayenne’ was not declared in this scope
Cayenne.begin(username, password, clientID, ssid, wifiPassword);
^~~~~~~
/var/folders/js/bx64jptd3zng91q6817lf26m0000gn/T/arduino_modified_sketch_747223/WiFi101Shield.ino: In function ‘void loop()’:
WiFi101Shield:33:2: error: ‘Cayenne’ was not declared in this scope
Cayenne.loop();
^~~~~~~
/var/folders/js/bx64jptd3zng91q6817lf26m0000gn/T/arduino_modified_sketch_747223/WiFi101Shield.ino: At global scope:
WiFi101Shield:38:21: error: ISO C++ forbids declaration of ‘CAYENNE_OUT_DEFAULT’ with no type [-fpermissive]
CAYENNE_OUT_DEFAULT()
^
/var/folders/js/bx64jptd3zng91q6817lf26m0000gn/T/arduino_modified_sketch_747223/WiFi101Shield.ino: In function ‘int CAYENNE_OUT_DEFAULT()’:
WiFi101Shield:41:2: error: ‘Cayenne’ was not declared in this scope
Cayenne.virtualWrite(0, millis());
^~~~~~~
/var/folders/js/bx64jptd3zng91q6817lf26m0000gn/T/arduino_modified_sketch_747223/WiFi101Shield.ino: At global scope:
WiFi101Shield:50:20: error: ISO C++ forbids declaration of ‘CAYENNE_IN_DEFAULT’ with no type [-fpermissive]
CAYENNE_IN_DEFAULT()
^
/var/folders/js/bx64jptd3zng91q6817lf26m0000gn/T/arduino_modified_sketch_747223/WiFi101Shield.ino: In function ‘int CAYENNE_IN_DEFAULT()’:
WiFi101Shield:52:38: error: ‘request’ was not declared in this scope
CAYENNE_LOG(“Channel %u, value %s”, request.channel, getValue.asString());
^~~~~~~
/var/folders/js/bx64jptd3zng91q6817lf26m0000gn/T/arduino_modified_sketch_747223/WiFi101Shield.ino:52:38: note: suggested alternative: ‘renameat’
CAYENNE_LOG(“Channel %u, value %s”, request.channel, getValue.asString());
^~~~~~~
renameat
WiFi101Shield:52:55: error: ‘getValue’ was not declared in this scope
CAYENNE_LOG(“Channel %u, value %s”, request.channel, getValue.asString());
^~~~~~~~
/var/folders/js/bx64jptd3zng91q6817lf26m0000gn/T/arduino_modified_sketch_747223/WiFi101Shield.ino:52:55: note: suggested alternative: ‘getpass’
CAYENNE_LOG(“Channel %u, value %s”, request.channel, getValue.asString());
^~~~~~~~
getpass
WiFi101Shield:52:2: error: ‘CAYENNE_LOG’ was not declared in this scope
CAYENNE_LOG(“Channel %u, value %s”, request.channel, getValue.asString());
^~~~~~~~~~~
/var/folders/js/bx64jptd3zng91q6817lf26m0000gn/T/arduino_modified_sketch_747223/WiFi101Shield.ino:52:2: note: suggested alternative: ‘CAYENNE_PRINT’
CAYENNE_LOG(“Channel %u, value %s”, request.channel, getValue.asString());
^~~~~~~~~~~
CAYENNE_PRINT

Does anybody have an idea how to make this example work for the Wio Terminal or how to connect the Wio Terminal to Cayenne? I used the WiFi101shield example for this one, but the other connection examples give the same kind of errors.

we dont directly support this device.
though you can use the rpcWiFi with PubSubClient to connect to cayenne. You will need to modify the code Wi-Fi - Seeed Wiki.
Here is an example of PubSubClient code connecting to cayenne esp8266-MQTT-v1/esp8266-MQTT-v1.cpp at master · spacefolder/esp8266-MQTT-v1 · GitHub