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.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
.gitignore
.travis.yml
AccelerometerSensorShield.cpp
AccelerometerSensorShield.h
BarcodeScannerShield.cpp
BarcodeScannerShield.h
BuzzerShield.cpp
BuzzerShield.h
CHANGELOG.md
CameraShield.cpp
CameraShield.h
ChartShield.cpp
ChartShield.h
CircularBuffer.h
ClockShield.cpp
ClockShield.h
ColorShield.cpp
ColorShield.h
DataLoggerShield.cpp
DataLoggerShield.h
EmailShield.cpp
EmailShield.h
FaceDetectionShield.cpp
FaceDetectionShield.h
FacebookShield.cpp
FacebookShield.h
FingerprintScannerShield.cpp
FingerprintScannerShield.h
FoursquareShield.cpp
FoursquareShield.h
GLCDAnalogGauge.cpp
GLCDAnalogGauge.h
GLCDButton.cpp
GLCDButton.h
GLCDCheckBox.cpp
GLCDCheckBox.h
GLCDEllipse.cpp
GLCDEllipse.h
GLCDLine.cpp
GLCDLine.h
GLCDPoint.cpp
GLCDPoint.h
GLCDProgressBar.cpp
GLCDProgressBar.h
GLCDRadioButton.cpp
GLCDRadioButton.h
GLCDRectangle.cpp
GLCDRectangle.h
GLCDShield.cpp
GLCDShield.h
GLCDSlider.cpp
GLCDSlider.h
GLCDTextBox.cpp
GLCDTextBox.h
GPSShield.cpp
GPSShield.h
GamePadShield.cpp
GamePadShield.h
GravitySensorShield.cpp
GravitySensorShield.h
GyroscopeSensorShield.cpp
GyroscopeSensorShield.h
HttpRequest.cpp
HttpRequest.h
HttpResponse.cpp
HttpResponse.h
IOTShield.cpp
IOTShield.h
IncludedShieldsDefines.h
InternetShield.cpp
InternetShield.h
JsonKey.cpp
JsonKey.h
JsonKeyChain.cpp
JsonKeyChain.h
KeyboardShield.cpp
KeyboardShield.h
KeypadShield.cpp
KeypadShield.h
LCDShield.cpp
LCDShield.h
LICENSE.md
LedShield.cpp
LedShield.h
LightSensorShield.cpp
LightSensorShield.h
MagnetometerSensorShield.cpp
MagnetometerSensorShield.h
MicShield.cpp
MicShield.h
MusicPlayerShield.cpp
MusicPlayerShield.h
NFCRecord.cpp
NFCRecord.h
NFCShield.cpp
NFCShield.h
NFCTag.cpp
NFCTag.h
NotificationShield.cpp
NotificationShield.h
OneSheeld.cpp
OneSheeld.h
OneSheeldPrint.cpp
OneSheeldPrint.h
OneSheeldPrintln.cpp
OneSheeldPrintln.h
OrientationSensorShield.cpp
OrientationSensorShield.h
PatternShield.cpp
PatternShield.h
PhoneShield.cpp
PhoneShield.h
PressureSensorShield.cpp
PressureSensorShield.h
ProximitySensorShield.cpp
ProximitySensorShield.h
PushButtonShield.cpp
PushButtonShield.h
README.md
SMSShield.cpp
SMSShield.h
SevenSegmentShield.cpp
SevenSegmentShield.h
ShapeClass.cpp
ShapeClass.h
ShieldParent.cpp
ShieldParent.h
ShieldsIds.h
ShieldsIncludes.h
ShieldsInstantiation.h
ShieldsSelection.h
SkypeShield.cpp
SkypeShield.h
SliderShield.cpp
SliderShield.h
TTSShield.cpp
TTSShield.h
TemperatureSensorShield.cpp
TemperatureSensorShield.h
TerminalShield.cpp
TerminalShield.h
ToggleButtonShield.cpp
ToggleButtonShield.h
TwitterShield.cpp
TwitterShield.h
VibrationShield.cpp
VibrationShield.h
VoiceRecognitionShield.cpp
VoiceRecognitionShield.h
keywords.txt
library.properties

README.md

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 Arduino 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 info@integreight.com or post on our
support forums www.1sheeld.com/forum if you need additional information
or have any questions.