kit-iot-wearable-ios 0.2

kit-iot-wearable-ios 0.2

测试已测试
语言语言 Obj-CObjective C
许可 MIT
发布最后发布2015年5月

Ezequiel Franca维护。



Kit IoT Wearable iOS http://iot.telefonicabeta.com/kit-iot-wearable

Kit IoT Wearable Telefonica VIVO - iOS

NPM

用于通过蓝牙连接到 可穿戴 IoT 开发套件 的 iOS 库。

该套件具有以下传感器

  • 蓝牙模块 - (HM-13)
  • 亮度
  • 温度
  • 加速度计
    • 轴 x
    • 轴 y
    • 轴 z
  • RGB LED
  • 蜂鸣器

请保持您的 Kit IoT Wearable Arduino Sketch 更新

链接 - 下载 sketch 并使用 Arduino IDE 上传到您的 Wearable Kit。

如何使用

使用示例

在 DevicesVC.h 中有一个 UITableView 显示从蓝牙设备 NSMutableArray 收集到的数据。连接和发送数据的一个示例

在 UITableView 的 delegate 中

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

DevicesVC.m

{
[...]
    ViewController *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"XPTO"];
    controller.iotKit = kitIoT;
    [self.navigationController pushViewController:controller animated:YES];
}


ViewController.m

@interface ViewController ()
@property (strong, nonatomic) IOTArduino *iotKit;
@end

@implementation ViewController
@synthesize iotKit;

//Exemplo, deixar o LED RGB AZUL
- (void)sendToArduino {
    [iotKit sendCommandToArduino:@"#LR0000"];
    [iotKit sendCommandToArduino:@"#LG0000"];
    [iotKit sendCommandToArduino:@"#LB0255"];
}

蓝牙模块 HM-13 文档

查看蓝牙模块 HM-13 的文档 - 链接

可穿戴设备命令列表

查看命令列表 这里

作者

twitter/ezefranca
ezefranca