I tried to send the data received from the sensor to the Blynk software but it failed.
Can someone assist me in fixing this error?
Thank everyone.
Compilation error: expected constructor, destructor, or type conversion before '(' token
I tried to send the data received from the sensor to the Blynk software but it failed.
Can someone assist me in fixing this error?
Thank everyone.
Compilation error: expected constructor, destructor, or type conversion before '(' token
Please post the code. We can't help with code that we can't see.
Please read the forum guidelines to see how to properly post code and some information on making a good post.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in a code block.

Posting a screenshot is no help - please go back and read the guidelines @groundFungus linked.
See also: How to get the best out of this forum
You also need to post the full build output - again using the <CODE/> button.
That is not how the guidelines say to post code. Please post all of the code. Posting snippets leaves out too much information. Format the code before posting. That makes the code easy to read and follow. Post the code in a code block. That makes it easy for us to copy to a text editor or the IDE for examination and verification.
Please include the entire error message. Copy the error and paste into a post in a code block. Paraphrasing the error message leaves out important information. If using the IDE, use the "copy error" button. If not using the IDE, copy and paste the entire error message.
In file included from C:\Users\PC\AppData\Local\Temp\.arduinoIDE-unsaved202385-15916-frgsoz.8qos\sketch_sep5a\sketch_sep5a.ino:9:
d:\Arduino\libraries\SparkFun_MAX3010x_Pulse_and_Proximity_Sensor_Library\src/MAX30105.h:42: warning: "I2C_BUFFER_LENGTH" redefined
42 | #define I2C_BUFFER_LENGTH 32
|
In file included from C:\Users\PC\AppData\Local\Temp\.arduinoIDE-unsaved202385-15916-frgsoz.8qos\sketch_sep5a\sketch_sep5a.ino:8:
C:\Users\PC\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\Wire/Wire.h:33: note: this is the location of the previous definition
33 | #define I2C_BUFFER_LENGTH BUFFER_LENGTH
|
C:\Users\PC\AppData\Local\Temp\.arduinoIDE-unsaved202385-15916-frgsoz.8qos\sketch_sep5a\sketch_sep5a.ino:12: warning: "particleSensor_dpin" redefined
12 | #define particleSensor_dpin 4
|
C:\Users\PC\AppData\Local\Temp\.arduinoIDE-unsaved202385-15916-frgsoz.8qos\sketch_sep5a\sketch_sep5a.ino:11: note: this is the location of the previous definition
11 | #define particleSensor_dpin 5
|
In file included from d:\Arduino\libraries\Blynk\src/Blynk/BlynkApi.h:45,
from d:\Arduino\libraries\Blynk\src/BlynkApiArduino.h:14,
from d:\Arduino\libraries\Blynk\src/BlynkSimpleEsp8266.h:24,
from C:\Users\PC\AppData\Local\Temp\.arduinoIDE-unsaved202385-15916-frgsoz.8qos\sketch_sep5a\sketch_sep5a.ino:6:
d:\Arduino\libraries\Blynk\src/Blynk/BlynkTimer.h:36:21: error: redefinition of 'class BlynkTimer'
36 | #define SimpleTimer BlynkTimer
| ^~~~~~~~~~
d:\Arduino\libraries\SimpleTimer/SimpleTimer.h:10:7: note: in expansion of macro 'SimpleTimer'
10 | class SimpleTimer {
| ^~~~~~~~~~~
d:\Arduino\libraries\Blynk\src/Blynk/BlynkTimer.h:36:21: note: previous definition of 'class BlynkTimer'
36 | #define SimpleTimer BlynkTimer
| ^~~~~~~~~~
d:\Arduino\libraries\Blynk\src/Blynk/BlynkTimer.h:42:7: note: in expansion of macro 'SimpleTimer'
42 | class SimpleTimer {
| ^~~~~~~~~~~
C:\Users\PC\AppData\Local\Temp\.arduinoIDE-unsaved202385-15916-frgsoz.8qos\sketch_sep5a\sketch_sep5a.ino:14:24: error: expected constructor, destructor, or type conversion before '(' token
14 | MAX30105 particleSensor(particleSensor_dpin, MAX30105);
| ^
C:\Users\PC\AppData\Local\Temp\.arduinoIDE-unsaved202385-15916-frgsoz.8qos\sketch_sep5a\sketch_sep5a.ino: In function 'void setup()':
C:\Users\PC\AppData\Local\Temp\.arduinoIDE-unsaved202385-15916-frgsoz.8qos\sketch_sep5a\sketch_sep5a.ino:29:8: error: 'particleSensor' was not declared in this scope; did you mean 'particleSensor_dpin'?
29 | if (!particleSensor.begin(Wire, I2C_SPEED_FAST)) {
| ^~~~~~~~~~~~~~
| particleSensor_dpin
C:\Users\PC\AppData\Local\Temp\.arduinoIDE-unsaved202385-15916-frgsoz.8qos\sketch_sep5a\sketch_sep5a.ino:35:3: error: 'particleSensor' was not declared in this scope; did you mean 'particleSensor_dpin'?
35 | particleSensor.setup(); //Configure sensor with default settings
| ^~~~~~~~~~~~~~
| particleSensor_dpin
C:\Users\PC\AppData\Local\Temp\.arduinoIDE-unsaved202385-15916-frgsoz.8qos\sketch_sep5a\sketch_sep5a.ino: In function 'void sendUptime()':
C:\Users\PC\AppData\Local\Temp\.arduinoIDE-unsaved202385-15916-frgsoz.8qos\sketch_sep5a\sketch_sep5a.ino:43:18: error: 'particleSensor' was not declared in this scope; did you mean 'particleSensor_dpin'?
43 | long irValue = particleSensor.getIR();
| ^~~~~~~~~~~~~~
| particleSensor_dpin
C:\Users\PC\AppData\Local\Temp\.arduinoIDE-unsaved202385-15916-frgsoz.8qos\sketch_sep5a\sketch_sep5a.ino:60:15: error: a function-definition is not allowed here before '{' token
60 | void loop() {
| ^
C:\Users\PC\AppData\Local\Temp\.arduinoIDE-unsaved202385-15916-frgsoz.8qos\sketch_sep5a\sketch_sep5a.ino:63:3: error: expected '}' at end of input
63 | }
| ^
C:\Users\PC\AppData\Local\Temp\.arduinoIDE-unsaved202385-15916-frgsoz.8qos\sketch_sep5a\sketch_sep5a.ino:42:19: note: to match this '{'
42 | void sendUptime() {
| ^
Multiple libraries were found for "MAX30105.h"
Used: D:\Arduino\libraries\SparkFun_MAX3010x_Pulse_and_Proximity_Sensor_Library
Not used: D:\Arduino\libraries\SparkFun_MAX3010x_Sensor_Library-master
exit status 1
Compilation error: expected constructor, destructor, or type conversion before '(' token
Ok, it is a error output.
What about the code?