Wio Link

Setting up Wio Link

  1. Power the Wio by either connecting an external battery pack or by connecting it via USB to a computer or other power source.
  2. Download the Wio app (named "Wio") on your phone.
  3. Once in the app, select the plus sign to connect to a new device and follow the instructions to successfully connect to your device via the app.
  4. Once connected, add any sensor to one of the ports on the Wio. The ports are labeled Digital0, Digital1, Digital2, I2C, UART, and Analog. In the app, make sure to select which sensor is plugged in to which port. Next, select Update Firmware.
  5. Updating the firmware should allow you to select "View API" that will lead you to different API URL's that contain data and commands from the given sensor. Copy and paste the URL you want to extract data from in to a web browser to access the data. The format of the information in the API will be different depending on which sensor it is referring to. For example, the Ultrasonic Range Sensor returns data in the format: {"range_inch": [distance goes here]} .

LabVIEW

  1. To push the data from the API to Thingworx through LabVIEW, we must first start with a RESTful VI to get the information in to LabVIEW. The set up of that VI looks like the left side of the following picture:
  1. In the RESTful VI, the URL connected to the top is the URL of your API for your given sensor. The VI returns information to where it says "Comm". Bundled in this response is the string "Received", which contains the actual value from the sensor. Unbundling this string gives us the response in the same format as the API. For example, for the Ultrasonic Range sensor, part of the Received string comes out in the form: {"range_inch": [distance]} , which is exactly the same as the API.
  2. Next we have to extract just the value from the response and send it to Thingworx using the Thingworx Write VI and the Thingworx AppKey. The Thingworx Write VI only needs two things: a bundle of four elements including the Thing name, Property name, property type, and the value, and the AppKey. In the above case, data from the Wio Ultrasonic Range Sensor is being pushed to the thing "PTC_Group" and the property "WioUltraSensor" in the form of a string.
  3. I added a While loop with a wait so it updates every second. If you do the same, you should be successfully sending a value from your Wio Link sensor to Thingworx every second!