Git Product home page Git Product logo

thermodosdk-ios's Introduction

Thermodo

The ThermodoSDK allows you to integrate Thermodo into your iOS application. ThermodoSDK provides a simple interface for interacting with Thermodo and getting temperature readings into your application.

Thermodo is a tiny electrical thermometer for your mobile device that lets you measure the temperature right where you are. For more information about Thermodo please checkout our website or watch the Kickstarter Video.

Installation with CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-part libraries like ThermodoSDK in your application. See their website for a Getting started guide.

In your projects Podfile add ThermodoSDK and run pod install

Podfile

platform :ios, '7.0'
pod "ThermodoSDK", "~> 1.0"

Manual installation

We highly encourage you to use CocoaPods for installation so you're always up to date with the latest version. If you don't want to use CocoaPods you can of course still install ThermodoSDK manually.

  1. Download the lastest zipped version
  2. Drag all the .h and .a files into your Xcode project.
  3. Make sure that the location where you put the libThermodoSDK.a is in your "Library Search Path" (Under your targets build settings).
  4. Add -lThermodoSDK to "Other Linker Flags" in your targets build settings.
  5. That's it!

Usage

To get started you need to register a delegate so your application can start andstop the measurements and get temperature readings from the device. Your delegate must implement the THMThermodoDelegate protocol.

@protocol THMThermodoDelegate <NSObject>

@optional

/*!
 * If this method is implemented, it will get called after -start has been called and
 * whenever something is plugged into or out of the headphone jack.
 * @param thermodo The shared THMThermodo instance
 */
- (BOOL)thermodoShouldUseAudioInputAsThermodoDevice:(THMThermodo *)thermodo;

/*!
 * This method will be called when -start is called on TMThermodo while the device is plugged in
 * or once the device has been plugged in after -start has been called.
 * @param thermodo The shared THMThermodo instance
 */
- (void)thermodoDidStartMeasuring:(THMThermodo *)thermodo;

/*!
 * This method will be called when -stop is called on TMThermodo or when the device is unplugged.
 * @param thermodo The shared THMThermodo instance
 */
- (void)thermodoDidStopMeasuring:(THMThermodo *)thermodo;

/*!
 * This method will be called every time the Thermodo device returns a new temperature reading.
 * @param thermodo The shared THMThermodo instance
 * @param temperature The measured temperature in celsius
 */
- (void)thermodo:(THMThermodo *)thermodo didGetTemperature:(CGFloat)temperature;

@end

To start measuring simply register your delegate and ask the THMThermodo instance to start measuring:

@interface MyViewController () <THMThermodoDelegate>
@end

@implementation MyViewController

- (void)viewDidLoad {
	[super viewDidLoad];

	[[THMThermodo sharedThermodo] setDelegate:self];
	[[THMThermodo sharedThermodo] start];
}

- (void)thermodo:(THMThermodo *)thermodo didGetTemperature:(CGFloat)temperature {
	// Display the temperature reading
}

@end

In this example we simply use our View Controller as the delegate for Thermodo. While this works perfectly fine you probably want to have your delegate decoupled from your View Controllers if you need to access the Thermodo readings from several places since there can only be one delegate for the Thermodo device.

FAQ

Why is it not compatible with OS X?

We're hard at work at making a OS X compatible version of ThermodoSDK. All the basic functionality is there, we just need to nail the final details down.

Can I try/use ThermodoSDK without a Thermodo Device?

No. In order to get device readings and any kind of reponse from SDK you must have Thermodo device to test with. You can order one from our website.

The readings from the device are too hot

We have used a lot of time on making sure that Thermodo delivers accurate and consistent temperature readings. Unfortunately this precision also means that the Thermodo sensor is easily affected by heat from your device (your iPhone / iPad / Macbook) or just the palm of your hand. To get the most accurate readings we recommend using an extension cord. For more information this video update from the Kickstarter project.

Contributing

We love our community and our fellow developers. If you find some way to improve ThermodoSDK or find a bug somewhere please let us know by opening issue.

thermodosdk-ios's People

Contributors

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