Temperature sensor code


please someone tell me what is wrong in this code?..because im getting an error shown below.

Hi @jainapeksha588,

There is one unclosed bracket in the print statment just above the try: block.

print("sensor value is:" + str(data["value"]))

thankyou so much!!:sweat_smile:

@rahul.singh1
Now that i tried to run this code…m getting this error,i checked my phone,its not in do not disturb mode!

.
M really not understanding what went wrong! .
this is twilio dashboard image. did something went wrong while singing in,because now the website has changed and it is not according to the given images in the module.strong text

@rahul.singh1
Here again replaced LM35 with LDR,and im still getting this?
how do i get an alert message,is something wrong with the code?

go to ur conf file and check all the details dont not replace 0 and O things like that and lm35 is to check temp not ldr sensor

@push1970
I replaced LM35 with LDR according to the given exercise,but still not gettimg the output.
Is there any change in the code of LM35,when replaced with LDR?

check conf.py file they may be any error

@push1970 @rahul.singh1
I checked all my conf.py value,and there was an error,so i corrected it,but now m getting this error,how to resolve it?


Hi! Although you have connected the LDR instead of the LM35 sensor, you have to connect the resistor of 10k ohm value (brown, black, orange, gold color code) as well, with its one end in GND place, and another at A0 place, also, please make sure that at no point the GND wire end of resistor and LDR wire of 3V should touch each other in order to avoid short-circuiting the connection. Now your connection would work.