你好呀,
我想捕获ECG信号,然后我想将它们转换为在BPM中的心率,并且我希望通过BLE发送信号到智能手机。智能手机将使用BLE扫描仪获得阅读。我在SDK文件夹中修改了BLE_APP_PERIANTAL示例,以便我能够捕获数据(请参阅附件)。我已经意识到,问题最可能是由于ADC功能。我是否放在错误的位置,我应该放在哪里?
adc_init (GP_ADC_SE, GP_ADC_SIGN, GP_ADC_ATTN3X).....
。。。。
非常感谢你。
Device:
你好呀,
除此之外,我不知道如何将ADC输出链接到自定义配置文件,基本上,ADC的输出在ECG信号中,我需要将它们转换为心率。我需要使用hrpc.c,hrpc_task.c吗?谢谢
嗨Herochua617,
没有祝福你任何实现values from the ECG and the ADC ? If yes then you can go to the next step and send the values through BLE. The heart rate profile files exist in order to send the hrp values using the SIG standard heart rate profile apart from that there is nothing else that tha profile will do for you, can can still send values from the sensor using your custom profile. Regarding the where you will have to place the reading ADC function you can do that right before sending the notification towards the stack. Regarding how to send the value, the sample variable that you have in the app_adcval1_timer_cb_handler() is the dummy value that it is send to the central every time the timer elapses, so you can replace that data with the value read from the ADC.
谢谢mt_dialog.
Hi MT_dialog,
我想问一下。如果我想从SPI运行此配置文件,我是否需要在BLE_PERITALL_APP中配置任何内容?由于我可以使用智能片段直接烧毁SPI内的编码,并且当我在硬币电池电量供应时运行开发套件时,它将自动运行?我对吗?谢谢
你好呀,
我从自定义档案中获得的不是心率。实际上是ECG信号值,它是从ADC输出获得的值。我知道我需要修复ECG信号的QRS复合物的间隔,以获得心率值。但是你有什么例子是如何配置的?谢谢
1.可行的ADC值通知
ADC_VAL_1_UUID_128(UUID 0x17,0xB9,0x67,0x98,0x4c,0x66,0x4c,0x01,0x96,0x33,0x31,0xb1,0x91,0x59,0x00,0x15)
2. write 0x01 to CTRL_POINT
ctrl_point_uuid_128(0x20,0xee,0x8d,0x0c,0xe1,0xf0,0x4a,0x0c,0xb3,0x25,0xdc,0x53,0x6a,0x68,0x86,0x2d)
ADC Func位置你放了不对。
嗨Chey856,
非常感谢你!。我能够看到价值变化。请问?控制点的功能是什么?为什么我需要打开以获得价值?谢谢
嗨Herochua617,
Chey856请求的控制点特性是一种特征,当写入时,它在FW中启用内核定时器。当内核定时器经过时,它会触发向堆栈发送通知并最终在手机上重置计时器。因此,只要您写入该特征,就触发函数user_custs1_ctrl_wr_ind_handler()并启动计时器,当计时器经过App_Adcval1_Timer_CB_Handler()被触发时。
Thaks MT_dialog
这是正确的!非常感谢你
顺便说一下,你可以告诉DA14580的ADC采样率
嗨Chey856,
It is mentioned in the datasheet, "The Maximum sampling rate is 3.3 Msample/s".
谢谢mt_dialog.
你好呀,
如果我想采取数据并将它们转换为心率,以便如何将ADC值1转换为心率。我能用现有代码进行吗?谢谢
心率=(ADC_GET_SAMPLE()* 1.2VOLT * ADC_ATTN3X)/ 1023
if you did not set ADC_ATTN3X in adc_init(), set ADC_ATTN3X = 1 else set ADC_ATTN3X=3
1.2VOLT是参考电压
10bit adc so it's resolution: 2^10 - 1 =1023
you should take a look at "projects\target_apps\peripheral_examples\adc\ batt_lvl" example
静态uint16_t heart_rate,样本,sample2;
adc_init (GP_ADC_SE, 0, GP_ADC_ATTN3X);
adc_enable_channel(adc_channel_p01);
sample = adc_get_sample ();
adc_init(gp_adc_se,gp_adc_sign,gp_adc_attn3x);
adc_enable_channel(adc_channel_p01);
sample2 = adc_get_sample ();
heart_rate = (sample + sample2);
heart_rate = heart_rate / 2;
heart_rate =(heart_rate * 3.6)/ 1023;
req->conhdl = app_env->conhdl;
req-> handle = cust1_idx_adc_val_1_val;
req->length = DEF_CUST1_ADC_VAL_1_CHAR_LEN;
memcpy(req->value, &heart_rate, DEF_CUST1_ADC_VAL_1_CHAR_LEN);
ke_msg_send(req);
if (ke_state_get(TASK_APP) == APP_CONNECTED)
{
//再次设置它,直到控制特性接收到停止命令
timer_used = app_easy_timer(100,app_adcval1_timer_cb_handler);
}
}
Here's my code. I got 0x01 from my ADC VAL 1 characteristics from the BLE Scanner app. Any advice?
谢谢
对不起,迟到,似乎你的代码还可以,你能告诉我有关你项目的更多细节吗?
My mailbox:cheyu856@gmail.com
我已经回复了你的邮件。谢谢
Hi guys,
Can I use the HRPS profile to work with my heart rate device? Will that be easier since there will be algorithm right in the HRPS that will convert my data into readable heart rate and not in hexadecimal values?
嗨Herochua617,
The hrps is just a SIG standard that it just formats the data of your sensor in a specific way in order to be read by other client devices, it has no algorithm implementation or anything extra, its just a standard way to express heart rate values in order for other devices to be able to interpret them.
谢谢mt_dialog.
Hi MT_dialog,
谢谢。然后这个解决了我的问题https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bl...。谢谢。However, I am trying my own way of detecting the interval. I want to get the time between two peak thru thishttps://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bl...。Thank you very much!