Git Product home page Git Product logo

simple-mbed-cloud-client's Introduction

Simple Mbed Cloud Client

A simple way of connecting Mbed OS 5 devices to Mbed Cloud. It's designed to:

  • Enable Mbed Cloud Connect and mbed Cloud Update to applications in few lines of code.
  • Run separate from your main application, it does not take over your main loop.
  • Provide LWM2M resources, essentially variables that are automatically synced through Mbed Cloud Connect.
  • Help users avoid doing blocking network operations in interrupt contexts, by automatically defering actions to a separate thread.

This library is a simpler interface to Mbed Cloud Client, making it trivial to expose sensors, actuators and other variables to the cloud. For a full Mbed Cloud CLient API, check our documentation.

Usage to Connect to Mbed Cloud

  1. Add this library to your Mbed OS project:

    $ mbed add https://github.com/ARMmbed/simple-mbed-cloud-client
    
  2. Add your Mbed Cloud developer certificate to your project (mbed_cloud_dev_credentials.c file).

  3. Reference the library from your main.cpp file, add network and storage drivers; finally initialize the Simple Mbed Cloud Client library.

    #include "simple-mbed-cloud-client.h"
    #include <Block device>
    #include <Filesystem>
    #include <Network>
    
    int main() {
    
        /* Initialize connectivity */
        <Network> net;
        net.connect();
    
        /* Initialize storage */
        <Block device> sd(...);
        <Filesystem> fs("sd", &sd);
    
        /* Initialize Simple Mbed Cloud Client */
        SimpleMbedCloudClient client(&net, &sd, &fs);
        client.init();
    
        /* Create resource */        
        MbedCloudClientResource *variable;
        variable = client.create_resource("3201/0/5853", "variable");
        variable->set_value("assign new value");
        variable->methods(M2MMethod::GET | M2MMethod::PUT);
    
    }

Example applications

There are a number of applications that make usage of the Simple Mbed Cloud Client library.

The Mbed Cloud Quick-Start is an initiative to support Mbed Partner's platforms while delivering a great User Experience to Mbed Developers.

Known issues

None

simple-mbed-cloud-client's People

Contributors

janjongboom avatar bridadan avatar

Watchers

James Cloos 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.