iam making a project to measure the spo2 heart rate and temperatures using MAX30100 and mlx90614 sensor with esp8266 and oled display. i need to display the values on blynk aswell as in oled but the probelm is whenver i comment the " Blynk.virtualWrite(V9,temp_obj + calibration);" part in the code the max30100 stops reading and sending data only the mlx90614 works when i uncommect the above lines all works perfect except sending the mlx90614 values to blynk .help me
i am using different i2c address for each modules the problem is only with the data sent to blynk from mlx90614 module when i put Blynk.virtualWrite(V9,temp_obj + calibration); this in code the max30100 sensor get blocked from displaying values in serial monitor blynk and oled that time only mlx90614 values are displayed alone ,help me
So, just to be 100% clear, are you saying that the Heartrate and Sp02 data does not appear unless you comment-out the Blynk.virtualWrite(V9,temp_obj + calibration); line of code, like this…
I realise that, but the first step is to understand EXACTLY what the issue is, because your initial description was contradictory and your follow-ups haven’t been as clear as I would have liked.
I’ve never used the max30100 sensor or studied the Adafruit library for the device, but some things look wrong to me. First of all, you aren’t using BlynkTimer to call the sendata function. Instead it’s being called from the void loop…
This wouldn’t be too bad if the first thing that the sendata function did was to do a millis() check to see if it’s time to take some readings, but that’s not how it’s structured. Instead, it calls pox.update() first, which means that this command is executing every time the void loop executes, which should be hundreds if not thousands of times per second.
Then, when the mills() check shows that it’s time to take the teadsings and send them to the LCD, serial monitor and Blynk you do that in a very clunky way…
Instead of interrogating the max30100 sensor once to obtain the heartrate and Sp02 values then sending the result to the three locations, you are taking fresh (and therefore potentially different) readings readings for each location…
I suspect that some of your issues are related to these code structure issues.
Code is same a above I will explain my esp8266 I’d connected to the i2c interface common for oled pulse oximeter and mlx90614 ir temperature sensor all are connectes to sda scl of esp. in OLED it display 3 values temperature heart rate and sp02 and in blynk app too. The problem is I aml getting only pulse oximeter values . When I put blynk code to display temperature value the app shows only temperature even in OLED other two values will stay on 0 and not starts counting . But in serial monitor it’s shows the pulse oximeter is initiated successfully. But not measuring the values.when I remove the blynk virtual.write. Code of temperature sensor the pulse oximeter works . What. Could be the reasons.sir
Sir I am getting pulse oximeter values on oled and blynk app only if I remove the Blynk virtual write command to display temperature. At this instance I will get 3 values on oled and 2 values of oximeter on blynk app . Stilll not getting temperature 8f I add this it will.block the oximeter
The first change I would do is remove sendata() from your void loop() and use a timer to run it.
It looks like you are sending data to the Blynk server a thousand times a second, flooding the Blynk server. Keep your void loop() clean, use a timer.