Documentation
Sensor Agnostic Module for EI-Wiser™
roto_eiwiser.framework for iOS®/iPadOS®
- Version: 1.01
- Author: David Bukowitz
- 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
- Drag and drop the roto_eiwiser.framework file into your Xcode project
- Select the "Embed & Sign" option in the Frameworks, Libraries and Embedded Content menu
Configuring your project
- Import the roto_eiwiser.framework to your project class
#import "ViewController.h"
#import "roto_eiwiser/eiwiser_collect.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
}
Connecting to the Sensor
- Create an action to start reading the sensor's data using the startSensorInput method.
- Check the sensor's ID by using the command: getDeviceId
...
#import "roto_eiwiser/eiwiser_collect.h"
...
- (IBAction) startSensor {
[eiwiser_collect startSensorInput];
}
...
...
- (void) deviceId {
NSLog(@"deviceID: %@", [eiwiser_collect getDeviceId]);
}
...
Collecting Data
- Request the data collection with the number of samples and sampling rate using the collectDataWithSamplingRate:(int) withNumberOfSamples:(int) method.
- To request the full raw data array, use getsignalRawData method as follow:
- 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
...
//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];
}
...
...
- (void)getRawDataArray {
NSLog(@"%@", [eiwiser_collect getsignalRawData]);
}
...
Below is a sample of a console log response:
...
- (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