Giter VIP home page Giter VIP logo

button-led-controller's Introduction

Creator logo

Button-Led Controller application

Overview

Button-Led controller application runs on Ci40 board. One MikroE board acts as awalwm2m client to simulate button. Controller application acts as awalwm2m server and observes any button presses on MikroE board, and whenever there is a change, controller gets a notification for the same, and change led state to ON or OFF present on Ci40 board.

Object Name Object ID Resource Name Resource ID
"Digital Input" 3200 "Counter" 5501

Prerequisites

Prior to running button-led controller application, make sure that:

  • Awalwm2m server daemon(awa_serverd) is running.
  • Awalwm2m bootstrap daemon(awa_bootstrapd) is running.

NOTE: Please do "ps" on console to see "specific" process is running or not.

Application flow diagram

Button-Led Controller Sequence Diagram

API guide

Button-Led Controller documentation is available as a Doxygen presentation which is generated via the following process.

  1. Install Doxygen : sudo apt-get install doxygen

  2. Generate the documentation:

    $ button-led-controller: mkdir build $ button-led-controller/build: cd build $ button-led-controller/build: cmake ../docs $ button-led-controller/build: make docs

The output can be found in the build/html directory and viewed by opening index.html with your web browser.

Using OpenWrt SDK to build standalone package

Please refer OpenWrt-SDK-build-instructions for exact build instructions.

Running Application on Ci40 board

Button-Led Controller Application is getting started as a daemon. Although we could also start it from the command line as :

$ button_led_controller_appd

Output looks something similar to this :

Button-Led Controller Application

------------------------


Establish server session for port:54321 and address:127.0.0.1

Server session established


Defining DigitalInput[3200] object on awalwm2m server

Waiting for constrained device 'ButtonDevice' to be up

Constrained device ButtonDevice registered

Successfully added observe operation for button object[3200/0/5501]


Received observe callback for button object[3200/0/5501] with value 1

Button state has changed

Turn ON led on Ci40 board

Received observe callback for button object[3200/0/5501] with value 0

Button state has changed

Turn OFF led on Ci40 board

Received observe callback for button object[3200/0/5501] with value 1

Button state has changed

Turn ON led on Ci40 board

Received observe callback for button object[3200/0/5501] with value 0

Button state has changed

Turn OFF led on Ci40 board

button-led-controller's People

Contributors

nikhil-zinjurde-imgtec avatar mayank-sirotiya-imgtec avatar

Watchers

 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.