ECG data acquisition with Analog device frontend and Redbear nano BLE
Dependencies: BLE_API mbed nRF51822
Fork of BLENano_SimpleControls by
Reference Design
2 channel EKG with Redbear BLE reference and Analog Device amplifier to generate RAW EKG data fed into Medtrics MaaS service . Medtrics API can consumer raw input with given parameters of ADC sample frequency and scaling factor
Specification
- Application Processor: nRF51822/BLE , Analog frontend: AD8232 /
- Input Analog Voltage = 3.3V
- 10 bit ADC input range = (0-1023) or scaling factor= 3.22mV/unit (this is ADC resolution)
- ADC sample frequency (BLE pull rate) = 250Hz (4ms per sample)
Reference IOS and Android app will be online soon!
Servo.h@4:b95d3432a495, 2017-01-07 (annotated)
- Committer:
- pkweitai
- Date:
- Sat Jan 07 06:20:36 2017 +0000
- Revision:
- 4:b95d3432a495
- Parent:
- 1:81a97eb70d3d
medtricsIO ECG data collection via BLE Redbear reference design
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
RedBearLab | 1:81a97eb70d3d | 1 | /* |
RedBearLab | 1:81a97eb70d3d | 2 | |
RedBearLab | 1:81a97eb70d3d | 3 | Copyright (c) 2012-2014 RedBearLab |
RedBearLab | 1:81a97eb70d3d | 4 | |
RedBearLab | 1:81a97eb70d3d | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software |
RedBearLab | 1:81a97eb70d3d | 6 | and associated documentation files (the "Software"), to deal in the Software without restriction, |
RedBearLab | 1:81a97eb70d3d | 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, |
RedBearLab | 1:81a97eb70d3d | 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, |
RedBearLab | 1:81a97eb70d3d | 9 | subject to the following conditions: |
RedBearLab | 1:81a97eb70d3d | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
RedBearLab | 1:81a97eb70d3d | 11 | |
RedBearLab | 1:81a97eb70d3d | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, |
RedBearLab | 1:81a97eb70d3d | 13 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR |
RedBearLab | 1:81a97eb70d3d | 14 | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE |
RedBearLab | 1:81a97eb70d3d | 15 | FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
RedBearLab | 1:81a97eb70d3d | 16 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
RedBearLab | 1:81a97eb70d3d | 17 | |
RedBearLab | 1:81a97eb70d3d | 18 | */ |
RedBearLab | 1:81a97eb70d3d | 19 | |
RedBearLab | 0:be2e4095513a | 20 | #ifndef _SERVO_H |
RedBearLab | 0:be2e4095513a | 21 | #define _SERVO_H |
RedBearLab | 0:be2e4095513a | 22 | |
RedBearLab | 0:be2e4095513a | 23 | #include "mbed.h" |
RedBearLab | 0:be2e4095513a | 24 | |
RedBearLab | 0:be2e4095513a | 25 | class Servo |
RedBearLab | 0:be2e4095513a | 26 | { |
RedBearLab | 0:be2e4095513a | 27 | public: |
RedBearLab | 0:be2e4095513a | 28 | Servo(PinName pin); |
RedBearLab | 0:be2e4095513a | 29 | ~Servo(void); |
RedBearLab | 0:be2e4095513a | 30 | |
RedBearLab | 0:be2e4095513a | 31 | void write(unsigned char degree); |
RedBearLab | 0:be2e4095513a | 32 | |
RedBearLab | 0:be2e4095513a | 33 | private: |
RedBearLab | 0:be2e4095513a | 34 | void convert(unsigned char degree); |
RedBearLab | 0:be2e4095513a | 35 | |
RedBearLab | 0:be2e4095513a | 36 | PwmOut _servo; |
RedBearLab | 0:be2e4095513a | 37 | unsigned int pulse; |
RedBearLab | 0:be2e4095513a | 38 | }; |
RedBearLab | 0:be2e4095513a | 39 | |
RedBearLab | 0:be2e4095513a | 40 | #endif |