OnionIoT / Onion-Arduino-Library

Onion library for use with the Arduino IDE and the Arduino Dock
GNU General Public License v3.0
9 stars 7 forks source link

Onion-Arduino-Library

Onion library for use with the Arduino IDE and the Arduino Dock.

Combine the ease of use of Arduino with the flexibility and power of Linux with the Onion Omega!

Arduino Dock R2

Arduino Dock Documentation

Full and up-to-date documentation can be found in our docs site:

Requirements

If you want to buy Onion products outside of the US, you can also find a local distributor near you.

Installation

  1. Open the Arduino IDE and click Sketch -> Include Library -> Manage Libraries...
  2. Search for Onion Arduino Library
  3. Click Install
  4. Close the Library Manager and you're ready to go!

Contents

This library contains code needed to flash the Arduino Dock R1 model, as well as example sketches that showcase how the Atmel microcontroller and Omega can exchange data and commands.

Classes

Onion

More information coming soon!

Example Sketches

You can find example sketches by clicking on File -> Examples -> Onion.

Preparing to Flash

The flashing process will depend if you are using the first model of the Dock (R1) or the second (R2).

Arduino Dock R1:

Arduino Dock R1

Arduino Dock R2 (note the Expansion Header in the left corner of the board):

Arduino Dock R2

See the sections below for how to use the library for each model.

Model R1

In your sketch, add the Onion Library by clicking in the top menu bar: Sketch -> Include Library -> Onion.

Add the Onion Library

Once the library has been added, create a global instance of the Onion object. Add the following line on the global scope:

Onion* onionSetup;

To initialize and activate the library functions, add the following line to the setup() function in the sketch:

onionSetup = new Onion();

Model R2

We've made sweeping improvements in this revision, so you don't have to include the library to flash it; no additional steps are needed! :)

Flashing the Arduino Dock

Follow the instructions in our Arduino Dock documentation:

https://docs.onion.io/omega2-docs/flash-arduino-dock-wirelessly.html