Arduino Client Libraries 2.1.0

Date: 5 January 2016
Component: Arduino Library
Release Note:

It can be updated from the Arduino Library Manager

Some new features:

  • Added ESP8266 SmartConfig Support. It does not require to configure Wifi + Password!
  • Improved Arduino Ethernet connection stability
  • Proper support for Control widgets in the dashboard
  • Added syntactic sugar for defining input/output resources

Additional Information

This new Arduino version includes an experimental implementation of the SmartConfig. So you can configure the Wifi SSID and password with the mobile phone (and not in the Arduino sketch). Search for ESP8266 Smart Config in the Google Play Store to download the application. There is a sample sketch in the Arduino library that uses the SmartConfig, so you can load and test it.

This client library also includes some useful syntactic sugar for defining resources more easily. There are some examples in the following:

Control a digital pin (led, relay, etc)

// digital pin control (i.e. turning on/off a light, a relay, etc)
thing["relay"] << digitalPin(PIN_NUMBER);

// or if you want or need an inverted logic:
thing["relay"] << invertedDigitalPin(PIN_NUMBER);

Configuring a sketch variable

// define a resource for changing a variable, like 
thing["hysteresis"] << inputValue(myHisteresysVariable, {
    // execute some code when the value change (or not)
});

Defining output resources like getting temperature, or a variable value

// define an output resource (like a sensor reading, a variable, etc)
thing["temperature"] >> outputValue(dht.readTemperature());

Controlling a Servo

// define a resource for controlling a servo instance
thing["servo"] << servo(myServoInstance);

This is all at this moment!

@Alvaro, can you share a link for your Smart Config? I can only find Thinger.io (downloaded some weeks ago).
So, I can try what you say here

Thank you :smiley:

It is not a Thinger app (but I will integrate it soon), so in the meantime you can use this one that works well:

@Alvaro WOW a very fast reply … I thought it was an App from you :blush: sorry!
I will try your suggestions … I hope without mistakes this time :wink:

Thanks again