I have referred the code from this link:http://www.daviom.com/tutorial/tutorial-store-arduino-data-with-raspberry-pi-to-mysql/ The arduino code is working correctly however the python code executes by giving the following output but does not store value in the database , even the tx light on the arduino blinks while the python code is executing but the values are not getting stored in the database
pls someone help me out as i am new to python
the output after uncommenting print statement in the python code
#print("value received:"+string+ " interpreted as: project Id = "+projectId+" and value = "+value)
is not displaying any output
the values from the arduino are inconsistent and the second print statement
if len(valueMatrix)> 1
which is neccesary to insert data on the dbase. IfardString
is just what you report then it would not comply with the if because valueMatrix would be equal to 1. Another question: wherex
inx50
comes from ? On the arduino code you should haveSerial.println("xyz123 " + tempAsString);
. This should return something like "xyz123 50" inardString
. Did you wrote exactly this ? Did you noticed the space after 123 ? – joaquin Jan 5 at 8:07