Here is code. I’m getting some errors. Can anyone help me in debugging the errors.
here is the screen shot of error
Here is code. I’m getting some errors. Can anyone help me in debugging the errors.
here is the screen shot of error
Please check once whether the device is online and execute the code.
So in while loop, you already got the value in variable sensor_value using the line
sensor_value = get_sensor_value_from_pin("A0")
So you don’t need to use the line
sensor_value = int(data["value"])
Above line won’t work because ‘data’ is a json type variable declared in function get_sensor_value_from_pin() . you can use ‘data’ only inside that function.