Hey!
I have an application where I have 4 sensors connected to the arduino. The arduino is connected to my computer over USB and I have a node.js server running with a mongodb instance.
I have the data being parsed in the serialport section of node.js and basically, the data coming out of the parser is of this format:
"Temperature": <data>,
"Humidity": <data>,
"Pressure": <data>,
"Light":<data>
I would like to put all this data into a mongodb collection as the data comes in.
When I try to do this, I get an error which says: "cannot assign to read-only property "_id" of Temperature: "
Can anyone tell me how I can get around this error? I basically have the field name and data for that field both coming in from the arduino and would like to update the mongodb collection as such.
Thanks in advance!
Nikhil