Skip to content

Commit

Permalink
Fixed build errors with ESP32
Browse files Browse the repository at this point in the history
  • Loading branch information
protocentralashwin committed Dec 15, 2022
1 parent ecddcc4 commit 4a8202e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The GUI for visualizing the ECG and Respiration as well as parameters like Heart

Java 8 is required on all platforms for running the processing-based GUI application. You can download Java for your platform from the Official Java website.

You can download and install ProtoCentral OpenView from here. You can also program your Arduino with the example sketch specific to OpenView.
You can download and install ProtoCentral OpenView from [this GitHub Repo](https://github.com/Protocentral/protocentral_openview). You can also program your Arduino with the example sketch specific to OpenView.

Once you have opened OpenView, make sure to select "MAX86150 breakout" under the "Board" dropdown. If everything goes well, you will be able to see the screen as pictured above.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,21 @@

MAX86150 max86150Sensor;

#define debug Serial //Uncomment this line if you're using an Uno or ESP
//#define debug SerialUSB //Uncomment this line if you're using a SAMD21

uint16_t ppgunsigned16;

void setup()
{
debug.begin(57600);
debug.println("MAX86150 PPG Streaming Example");
Serial.begin(57600);
Serial.println("MAX86150 PPG Streaming Example");

// Initialize sensor
if (max86150Sensor.begin(Wire, I2C_SPEED_FAST) == false)
{
debug.println("MAX86150 was not found. Please check wiring/power. ");
Serial.println("MAX86150 was not found. Please check wiring/power. ");
while (1);
}

debug.println(max86150Sensor.readPartID());
Serial.println(max86150Sensor.readPartID());

max86150Sensor.setup(); //Configure sensor. Use 6.4mA for LED drive
}
Expand All @@ -59,6 +56,6 @@ void loop()
if(max86150Sensor.check()>0)
{
ppgunsigned16 = (uint16_t) (max86150Sensor.getFIFORed()>>2);
debug.println(ppgunsigned16);
Serial.println(ppgunsigned16);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@

MAX86150 max86150Sensor;

#define debug Serial // Uncomment this line if you're using an Uno or ESP
//#define debug SerialUSB //Uncomment this line if you're using a SAMD21

int16_t ecgsigned16;
int16_t redunsigned16;

Expand Down Expand Up @@ -83,16 +80,16 @@ long coef[13] = {

void setup()
{
debug.begin(57600);
debug.println("MAX86150 Basic Readings Example");
Serial.begin(57600);
Serial.println("MAX86150 Basic Reading Example");

// Set the coefficients
fir.setFilterCoeffs(coef);

// Initialize sensor
if (max86150Sensor.begin(Wire, I2C_SPEED_FAST) == false)
{
debug.println("MAX86150 was not found. Please check wiring/power. ");
Serial.println("MAX86150 was not found. Please check wiring/power. ");
while (1)
;
}
Expand All @@ -105,6 +102,6 @@ void loop()
if (max86150Sensor.check() > 0)
{
ecgsigned16 = (int16_t)(max86150Sensor.getECG() >> 2);
debug.println(fir.processReading(ecgsigned16));
Serial.println(fir.processReading(ecgsigned16));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ const char DataPacketHeader[5] = {CES_CMDIF_PKT_START_1, CES_CMDIF_PKT_START_2,

MAX86150 max86150Sensor;

#define debug Serial //Uncomment this line if you're using an Uno or ESP
//#define debug SerialUSB //Uncomment this line if you're using a SAMD21

uint16_t irunsigned16;
uint16_t redunsigned16;
int16_t ecgsigned16;
Expand Down Expand Up @@ -77,17 +74,17 @@ void sendDataThroughUart(){

void setup()
{
debug.begin(57600);
debug.println("MAX86150 PPG Streaming Example");
Serial.begin(57600);
Serial.println("MAX86150 PPG Streaming Example");

// Initialize sensor
if (max86150Sensor.begin(Wire, I2C_SPEED_FAST) == false)
{
debug.println("MAX86150 was not found. Please check wiring/power. ");
Serial.println("MAX86150 was not found. Please check wiring/power. ");
while (1);
}

debug.println(max86150Sensor.readPartID());
Serial.println(max86150Sensor.readPartID());

max86150Sensor.setup(); //Configure sensor. Use 6.4mA for LED drive
}
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=ProtoCentral MAX86150 PPG and ECG IC library
version=1.0.1
version=1.0.2
author=ProtoCentral Electronics <support@protocentral.com>
maintainer=ProtoCentral Electronics <protocentral.com>
sentence=Library for the MAX86150 PPG and ECG sensor module breakout board
Expand Down

0 comments on commit 4a8202e

Please sign in to comment.