GithubHelp home page GithubHelp logo

isabella232 / whiskers.arduino Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eclipse-archived/whiskers.arduino

0.0 0.0 0.0 13 KB

Eclipse Whiskers for Arduino

License: Eclipse Public License 1.0

C++ 100.00%

whiskers.arduino's Introduction

Eclipse Whiskers for Arduino

Whiskers for Arduino is a library for connecting Arduino devices to OGC SensorThings API. The SensorThings API is an OGC (Open Geospatial Consortium) standard that allows IoT (Internet of Things) devices and their data to be connected; a major goal is to foster a healthy and open IoT ecosystem, as opposed to one dominated by proprietary information silos.

Thanks to the financial support of Natural Resources Canada GeoConnections.

Using Eclipse Whiskers for Ardunio

Eclipse Whiskers for Arduino is using one other Arduino library for MQTT connections:

Note that you need to add this library for Whiskers for Arduino to work.

The library has methods for connecting to a SensorThings server as well as SensorThings MQTT broker. After connecting to the server, you can use the library method to create SensorThings entities and start uploading Observations.

Example folder contains example usage of the library. The example code provided is for Linkit One and for internet connection it is using MediaTek LWiFi Arduino library.

There are two main approach to use the library:

  • You create all the required entities, and use the device only for sending Observations.
  • The device is plug-and-play which means it creates all the required entities and then send Observations.

In following two Sections, we explain the steps for using the library for each of these approaches.

Plug-and-Play Device

  • Connect your device to internet. SensorThings library accepts a "Client" connected to internet as one of the parameters.
  • Create a SensorThings instance by passing the "Client", SensorThings server address, port used for HTTP requests, SensorThings MQTT broker address, and port used for MQTT.
  • Use createEntities method of the SensorThings instance to create all the required entities. The parameters required for this method are Thing description, Datastream description, unitOfMeasurement name, Sensor description and ObservedProperty description. This method is simplified for device maker and because of that the library generate all the other entity properties based on these parameters. User can update these properties at any time with sending HTTP request to the SensorThings server.
  • Use sendObservation method of the SensorThings instance to send the Observations. The parameters are result, latitude, and longitude. If your device is not moving, after the first sendObservation request, you can use sendObservation only with result parameter.

Sending Observations only

  • Create Thing, Location, Datastream, Sensor, and ObservedProperty in the SensorThings server. Keep note of the @iot.id for the Datastream that you created.
  • Connect your device to internet. SensorThings library accepts a "Client" connected to internet as one of the parameters.
  • Create a SensorThings instance by passing the "Client", SensorThings MQTT broker address, port used for MQTT, and @iot.id for Datastream.
  • Use sendObservation method of the SensorThings instance with result parameter to send the Observations.

whiskers.arduino's People

Contributors

taniakhalafbeigi avatar eclipsewebmaster avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.