Skip to content

AllThingsTalk Arduino WiFi SDK v2.0

Compare
Choose a tag to compare
@epiller epiller released this 03 Dec 18:28
· 45 commits to master since this release

The new AllThingsTalk SDK for WiFi-based devices is here!

This is the successor to AllThingsTalk Arduino SDK, which is now deprecated. Consider upgrading to this one!
This SDK is officially available in Arduino Library Manager!

What's new?

A lot of things. If you're coming from the old SDK, make sure to check the README file because absolutely everything is covered there.
In a nutshell, here's what the new SDK does:

  • Significantly simplified API
    • With 6 lines of code in total, it connects to WiFi, connects to AllThingsTalk, shows connection status via onboard LED, sends a JSON message to your AllThingsTalk maker and maintains connection to both WiFi and ATT
  • Tons of examples with comments on almost every line
  • Automatically recognizes the board you're uploading it to and uses an adequate version of itself tailored for that board
    • ESP8266-based devices and Arduino MKR1010 are currently supported, with more coming in the future
  • Handles and maintains Wi-Fi Connection
  • Handles and maintains connection to AllThingsTalk
  • Enables you to add actuations (receive data) with two lines of code
    • You can add up to 32 actuations
    • Automatically recognizes the data type you're trying to receive from AllThingsTalk so you don't have to convert anything
  • Reports WiFi Signal Strength to your AllThingsTalk Maker
    • You can define a custom reporting interval
    • Also useful for knowing if your device is really offline or if there's no new data to send
  • Utilizes onboard LED of your device to show connection status (both WiFi and AllThingsTalk) with ability to define your own LED pin or completely disable the feature altogether
  • Sends data in JSON, CBOR or Binary Payload
  • Enables you to change SDK options on-the-fly without restarting the device
  • Enables you to use a different AllThingsTalk Space, but defaults to Maker
  • Provides functions to connect and disconnect from either WiFi, AllThingsTalk or both (useful for deepsleep)
  • Has two levels of debug output via serial interface. If you choose verbose, be prepared to see everything that's happening behind the scenes!

Upgrading from 1.x.x

This is a major update with a lot of simplifications so you'll have a lot less code in your sketch once you upgrade!
A lot of examples are now present with comments on almost every line to help you understand everything.

  • Make sure to delete the old Arduino SDK from your Arduino Libraries folder (most likely located in Documents > Arduino > libraries)
  • In your Arduino IDE, go to Tools > Manage Libraries and search for "AllThingsTalk WiFi SDK" by AllThingsTalk.
  • Install it!

If you encounter any issues, check the Troubleshooting part of the README file, and if that doesn't help, we encourage you to open up a new issue!