我正在尝试运行此程序并将输出保存到文本文件中:
//Include ArduPi library
#include "eHealth.h"
//Needed for eHealth
eHealthClass eHealth;
// The loop routine runs over and over again forever:
void loop() {
float ECG = eHealth.getECG();
printf("ECG value : %f V\n",ECG);
delay(1000);
}
int main (){
//setup();
while(1){
loop();
}
return (0);
}
它会运行几秒钟,然后我收到以下错误:
Failed to open /dev/mem, try checking permissions.
Failed map the physical GPIO registers into the virtual memory space
Failed to open /dev/mem, try checking permissions.
Failed to map the physical BSCO (I2C) registers into the virtual memory space
任何建议都会很棒。
感谢。