Jump to content
katie4gold

Issues seeing data on serial monitor

Recommended Posts

Hello,

I am having the issue that I do not see anything printed on the serial monitor in energia. I upload the code successfully and the port seems to recognize the board and did necessary updates, but there should be words printed on my serial port since I have my MSP430FR5994 connected to a sensor. Any idea why there is nothing there? I set the serial monitor to 115200 baud. I am trying to watch the sensor readings in real time. Maybe I just do not have a good understanding of how to read data from a serial monitor. Here is a copy of the code I am using which is for the Sparkfun heartrate and pulse oxygen sensor. 

#include "SparkFun_Bio_Sensor_Hub_Library.h"
#include "Wire.h"

// No other Address options.
#define DEF_ADDR 0x55

// Reset pin, MFIO pin
const int resPin = 16;
const int mfioPin = 17;

// Takes address, reset pin, and MFIO pin.
SparkFun_Bio_Sensor_Hub bioHub(resPin, mfioPin);

bioData body;


//2
void setup(){

Serial.begin(115200);

Wire.begin();
int result = bioHub.begin();
if (!result)
Serial.println("Sensor started!");
else
Serial.println("Could not communicate with the sensor!!!");

Serial.println("Configuring Sensor....");
int error = bioHub.configBpm(MODE_ONE); // Configuring just the BPM settings.
if(!error){
Serial.println("Sensor configured.");
}
else {
Serial.println("Error configuring sensor.");
Serial.print("Error: ");
Serial.println(error);
}
// Data lags a bit behind the sensor, if you're finger is on the sensor when
// it's being configured this delay will give some time for the data to catch
// up.
delay(4000);

}
//3
void loop(){

// Information from the readBpm function will be saved to our "body"
// variable.
body =bioHub.readBpm();
Serial.print("Heartrate: ");
Serial.println(body.heartRate);
Serial.print("Confidence: ");
Serial.println(body.confidence);
Serial.print("Oxygen: ");
Serial.println(body.oxygen);
Serial.print("Status: ");
Serial.println(body.status);
delay(250); // Slowing it down, we don't need to break our necks here.
}

-Katie

Serial Monitor Issues.JPG

Share this post


Link to post
Share on other sites

Have you tried a simple example for the UART already? So without the Bio sensor code

How have you attached the sensor?

Try to dump something on the UART before accessing the bio sensor - to ensure / check that this one is not blocking the UART.

Share this post


Link to post
Share on other sites

Yes I tried the Blink example in Basics which worked fine when the sensor wasn't connected. I am also able to print things on the serial monitor when I add print statements so the serial monitor seems to be working fine. I am not using a qwiic cable since there is no qwiic port on the board, so I am using IC hooks with pigtail to directly connect the holes on the side of the sensor to the I2C bus (SDA, SCL, 3V3, GND) of the board as well as the RST hole to pin 16 and MFIO to pin 17. 

Can you explain what you mean by trying to dump something on the UART first? 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...