Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this tutorial we will show the steps to use OpenDevice LIBs and easily do communication between a Java application and Arduino

...

You can install through the Library Manager, click to the "Sketch" menu and then Include Library > Manage Libraries.

Find OpenDevice and click <Install>

...

To control this type of device you will need a relay, which is a device capable of controlling high voltages.

ExamplesExample:

Image RemovedImage Removed

These Image Added

Info

Some relay modules are

...

Image Removed

active-low, ie they are triggered with a negative pulse, in which case you can configure it like this:

ODev.addDevice("light", 9, Device::DIGITAL)->invertedState();


Reference: http://openenergymonitor.org/emon/buildingblocks/mains-ac-relay-module
Tutorial: http://www.instructables.com/id/Connecting-a-12V-Relay-to-Arduino/

In this example we created our own application to connect and manipulate devices directly, this model is very similar to Android development. The OpenDevice project provides a standard server (opendevice-middleware) that contains a dashboard for management, visualization, and storage that you can use and customize to create your project.

See next stepAdding REST Support

...

...