Receiving data from Arduino to Android. Data is wrong

风流意气都作罢 提交于 2020-01-06 19:36:35

问题


Hi I trying to receive data from Arduino to Android phone. The Android coding is below: App crashed due to looper.prepare() in the beginlistendata() function

The Arduino code is below:

void setup() {
  Serial.begin(9600);

  eHealth.initPulsioximeter();

  //Attach the inttruptions for using the pulsioximeter.   
  PCintPort::attachInterrupt(6, readPulsioximeter, RISING);
}

void loop() {

  delay(500);
  Serial.print("PRbpm : "); 
  Serial.print(eHealth.getBPM());

  Serial.print("    %SPo2 : ");
  Serial.print(eHealth.getOxygenSaturation());

  Serial.print("\n");  
  Serial.println("============================="); 
  delay(500);

}//end of void loop

I am getting ============ Spo2 flashing very fast on my Android phone. And Also I am not receiving the updated value like I was supposed to receive Spo2 99 but I am getting Spo2: 0

Also how do I pass the data to other activity?

来源:https://stackoverflow.com/questions/34253331/receiving-data-from-arduino-to-android-data-is-wrong

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!