Git Product home page Git Product logo

raj347 / 1sheeld-arduino-library Goto Github PK

View Code? Open in Web Editor NEW

This project forked from integreight/1sheeld-arduino-library

0.0 2.0 0.0 1.04 MB

An Arduino library for 1Sheeld. It is the interface to your smartphone's accessories, sensors and virtual shields. It allows you to communicate and interact with our mobile app using our own custom protocol.

License: GNU Lesser General Public License v3.0

C++ 95.99% C 4.01%

1sheeld-arduino-library's Introduction

1Sheeld Library for Arduino Build Status#

Overview

This library is crucial when working with 1Sheeld board, as it is the interface to your smartphone's accessories, sensors and virtual shields. It allows you to communicate and interact with our mobile app using our own custom protocol.

Installation

Make sure you have the latest version of Arduino IDE.

Automatic Method (Recommended)

Open the Arduino IDE, go to Sketch > Include Library > Manage Libraries.

Go to Sketch > Include Library > Manage Libraries

And then, search for our library in the list, pick the latest version and click install.

Search for our library in the list

Manual Method

Download the latest version of the library either from our website or the releases page. Unzip it in a new directory named OneSheeld inside your Arduino's libraries directory.

Usage And Examples

  • Add #include <OneSheeld.h> statement at the top of your sketch.
  • Call OneSheeld.begin(); in your setup().
  • You are now ready to call any of our shields methods.

Note: To reduce the library compiled size and limit its memory usage, you can specify which shields you want to include in your sketch by defining CUSTOM_SETTINGS and the shields respective INCLUDE_ define. Review any of our examples to see that in action.

We have more than 60+ examples that covers shields usage. They are categorized into two categories according to their complexity.

After library installation you can fire up any of our examples by going to File > Examples > OneSheeld > Advanced / Simple then pick your example.

Go to File > Examples > OneSheeld > Advanced / Simple then pick your example

Here is a an example that capture a photo using your smartphone's camera and post it to Twitter when a hardware button is pressed.

/* Include 1Sheeld library. */
#include <OneSheeld.h>

/* A name for the button on pin 12. */
int buttonPin = 12;
/* A name for the LED on pin 13. */
int ledPin = 13;

void setup()
{
  /* Start communication. */
  OneSheeld.begin();
  /* Set the button pin as input. */
  pinMode(buttonPin,INPUT);
  /* Set the LED pin as output. */
  pinMode(ledPin,OUTPUT);
}

void loop()
{
  /* Always check the button state. */
  if(digitalRead(buttonPin) == HIGH)
  {
    /* Turn on the LED. */
    digitalWrite(ledPin,HIGH);
    /* Turn on the camera flash. */
    Camera.setFlash(ON);
    /* Take the picture. */
    Camera.rearCapture();
    /* Wait for 10 seconds. */
    OneSheeld.delay(10000);
    /* Post the picture on Twitter. */
    Twitter.tweetLastPicture("Posted by @1Sheeld");
  }
  else
  {
    /* Turn off the LED. */
    digitalWrite(ledPin,LOW);
  }
    
}

Contribution

Contributions are welcomed, please follow this pattern:

  • Fork the repo.
  • Open an issue with your proposed feature or bug fix.
  • Commit and push code to a new branch in your forked repo.
  • Submit a pull request to our development branch.

Don't forget to drop us an email, post on our forum, or mention us on Twitter or Facebook about what you have built using 1Sheeld, we would love to hear about it.

Learn More

Changelog

To see what has changed in recent versions of 1Sheeld Arduino Library, see the Change Log.

Other Implementations

Our awesome community has ported the library to other platforms, check them out:

License and Copyright

This code is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License version 3 only, as
published by the Free Software Foundation.

This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
version 3 for more details (a copy is included in the LICENSE file that
accompanied this code).

Please contact Integreight, Inc. at [email protected] or post on our
support forums www.1sheeld.com/forum if you need additional information
or have any questions.

1sheeld-arduino-library's People

Contributors

alieslam avatar isso avatar spiliot avatar

Watchers

 avatar  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.