langford / MovellaNeeXSensDot

Movella Dot Example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dot_example_iOS

Get start

  1. git clone https://github.com/MovellaTechnologies/dot_example_ios
  2. pod install
  3. open MovellaDotExampleiOS.xcworkspace
  4. Please use a real iPhone to run with the sample code , the simulator will appear errors.

Main methods

  • Scan sensors
  1. Set the delegate
[DotConnectionManager setConnectionDelegate:self]; 
  1. Start scan
@property (strong, nonatomic) NSMutableArray<DotDevice *> *deviceList;
[DotConnectionManager scan];
- (void)onDiscoverDevice:(DotDevice *)device
{
    NSInteger index = [self.deviceList indexOfObject:device];
    if(index == NSNotFound)
    {
        [self.deviceList addObject:device];
    }
}
  • Connect a sensor
DotDevice *device = self.deviceList.firstObject;
[DotConnectionManager connect:device];
  • Synchronization
DotSyncResultBolck block = ^(NSArray *array)
    {

    };
[DotSyncManager startSync:self.deviceList result:block];
  • Measurement
DotDevice *device = self.deviceList.firstObject;
device.plotMeasureMode = XSBleDevicePayloadCompleteEuler;
device.plotMeasureEnable = YES;

For more details, please visit : https://www.movella.com/developer

About

Movella Dot Example


Languages

Language:Objective-C 99.9%Language:Ruby 0.1%