Temperature sensor project (invalid pin error)


#1


For the following code
I’m getting the error as invalid pin.


#2

Have you done the connection properly? A0 pin should be connected to the output pin of the LM35(middle one) and the connections should be tight.


#3

I think you have written ‘AO’ (alphabet O) instead of ‘A0’ (number 0) and that is why it is giving an error because you have defined a pin that does not exist on the Bolt module and thus is invalid.
The second line in the while loop should be:
response = mybolt.analogRead(‘A0’)


#4

Yes everything’s fine. I confirmed


#5

@arikalavaishnavi try implementing the suggestion given by @srishtikrastogi.


#6

Yeah thank you it worked


#7