Skip to content

Data decoding not working properly #16

@DiegoSHS

Description

@DiegoSHS

The serial does not trigger any error but the expected text od data is not being decoded as expected
here an example of how it's implemented right now

self.instance.readline().decode("utf-8")

c++ implementation

        StaticJsonDocument<512> doc;
        doc["red"] = redBuffer[i];
        doc["ir"] = irBuffer[i];
        doc["heartRate"] = heartRate;
        doc["validHeartRate"] = validHeartRate;
        doc["spo2"] = spo2;
        doc["validSPO2"] = validSPO2;
        doc["ambientTempC"] = tempc;
        doc["objectTempC"] = objtempc;

        if (!fingerDetected) {
          doc["status"] = "Finger not detected";
        }
        String json;
        serializeJson(doc, json);
        Serial.println(json);

the .ino code is working 100% as well as the python module
definitely there is something that i'm not noticing

Metadata

Metadata

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions