Send data from VL53L0X to SQLite Database

Hi everyone. I've four VL53L0X sensors (on Raspberry Pi 4) and I've been trying to send their values into a SQLite database, but these values are exchanging between rows for every loop, like this:

The second column's ok, but in the third one, the values are from two different sensors. I'm quiet frustrated about it.

Here's my code in a function node:

The fixed values (like 27 and 1018) are supposed to be from the additional sensors.

In SQLite node:

And these are my nodes:

I disconnected the others 3 nodes because of the problem shown in the first image. I need to upload the four values at once and I haven't could yet. By the way, thanks and sorry about my English, it ain't my first language.

I'll appreciate any ideas and help.

If I understand correctly you need to merge the four values together into one message before sending to sqlite. For this you can use the Join node in key/value pairs mode.

See this article in the cookbook for an example of how to join messages into one object.

I'll try that way, thanks.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.