Arduino Device
Arduino device libraries
Arduino device libraries allows only one device instance. Device UUID is stored in EEPROM, bytes 0 - 37. If you are going to use EEPROM in your implementation, please store your data from byte 38 upwards. In Download section you can find ready to use libraries for Arduino environment (can be installed from Arduino IDE through Sketch -> Include Library -> Add .ZIP Library). Additionally, our Arduino repository contains abstract GateDevice class that can be used as base class for custom implementation if needed.
WiFiGateDevice
Library for projects using onboard WiFi. Requires WebSockets library. In case dependency would not be installed automatically, you need to add it manually from Arduino IDE:
1. Sketch -> Include Library -> Manage Libraries...
2. Type "websockets" in search field
3. Click "INSTALL" on "WebSockets by Markus Sattler" library
Depending on board type, you may need to include specific WiFi library in your sketch:
ESP-32 or equivalent - Include WiFi.h
ESP-8266 or equivalent - Include ESP8266WiFi.h
If necessary, you can modify discoveryPort and discoveryKeyword fields of WiFiGateDevice object to reflect custom configuration of your Local Server
SerialGateDevice
Library for projects connecting via USB cable. Requires GateHub running on machine to which board is connected. Uses Serial port to communicate, so be minded that you need to stop GateHub before uploading new version of your code to the board.
Check Examples section for more details of in-code implementations.