Documentation

Sensor Agnostic Module for EI-Wiser™

roto_eiwiser.framework for iOS®/iPadOS®


  • Created: 25 Oct, 2020
  • Update: 18 Oct, 2021

If you have any questions that are beyond the scope of this document, Please feel free to email via info@rotovibes.com


Description

roto_eiwiser.framework is an iOS®/iPadOS® library that allows communication with the EI-Wiser™ Wireless/USB-Lightning Connector 2-channel accelerometer. The framework provides simple commands to connect, collect and post-process the vibration data.


Installation

Follow the steps below to install the roto_eiwiser framework

  1. Drag and drop the roto_eiwiser.framework file into your Xcode project
  2. Select the "Embed & Sign" option in the Frameworks, Libraries and Embedded Content menu

Configuring your project

  1. Import the roto_eiwiser.framework to your project class
  2. 
    #import "ViewController.h"
    #import "roto_eiwiser/eiwiser_collect.h"
    
    @interface ViewController ()
    @end
    
    @implementation ViewController
    
    - (void)viewDidLoad {
       [super viewDidLoad];
    }
    

Connecting to the Sensor

  1. Create an action to start reading the sensor's data using the startSensorInput method.
  2. 
    ...
    #import "roto_eiwiser/eiwiser_collect.h"
    
    ...
    - (IBAction) startSensor {
        [eiwiser_collect startSensorInput];
    }
    ...
     
  3. Check the sensor's ID by using the command: getDeviceId
  4. 
    ...
    - (void) deviceId {
        NSLog(@"deviceID: %@", [eiwiser_collect getDeviceId]);
    }
    ...
        

Collecting Data

  1. Request the data collection with the number of samples and sampling rate using the collectDataWithSamplingRate:(int) withNumberOfSamples:(int) method.
  2. 
    ...
    //Sampling Rate Selection:
    //
    //for 48kHz audio devices:
    //samplingRateCode:0 -> SamplingRate = 48000
    //samplingRateCode:1 -> SamplingRate = 24000
    //samplingRateCode:2 -> SamplingRate = 12000
    //samplingRateCode:3 -> SamplingRate = 6000
    //
    //for 44.1kHz audio devices:
    //samplingRateCode:0 -> SamplingRate = 44100
    //samplingRateCode:1 -> SamplingRate = 22050
    //samplingRateCode:2 -> SamplingRate = 11025
    //samplingRateCode:3 -> SamplingRate = 5512.5
    //
    //Number of Samples Selection
    //numberSamplesCode:0 -> NumberOfSamples = 4096
    //numberSamplesCode:1 -> NumberOfSamples = 8192
    //numberSamplesCode:2 -> NumberOfSamples = 16384
    //numberSamplesCode:3 -> NumberOfSamples = 32768
    
    - (void)measure {
        [eiwiser_collect collectDataWithSamplingRate:0 withNumberOfSamples:0];
    }
    ...
             
  3. To request the full raw data array, use getsignalRawData method as follow:
  4. 
    ...
    - (void)getRawDataArray {
        NSLog(@"%@", [eiwiser_collect getsignalRawData]);
    }
    ...
                        

    Below is a sample of a console log response:

  5. For this sample we will use the getOverallAccelerationRms method to calculate the acceleration overall rms in G's. there are other similar commands to request the velocity, displacement, etc
  6. 
    ...
    - (void)getOverallAccelerationRms {
        NSLog(@"acceleration overall value: %.4f G-rms", [eiwiser_collect getOverallAccelerationRms]);
    }
    ...
                  

    Below is a sample of a console log response:


Combine this framework with vibEngine.framework to perform signal post-processing and with the vibeFDaD.framework to analize the machine condition. Third party frameworks can also be used to plot and enhance the users interface.


Changelog

See what's new added, changed, fixed, improved or updated in the latest versions.

Version 1.01 (18 Oct, 2021)

  • Fixed Issue with iOS®15 audio activation
  • Updated Optimized for iOS®15


Version 1.0 (25 Oct, 2020)

Initial Release