Not getting LM35 values

I have written python code to get LM35 sensor values. but when i try to run it I’m getting the following output. what should i do to overcome this.


The image is self-explanatory

There probably is nothing wrong with the code. You just have been rate-limited.
The reason is here, along with the solution.
You may use time.sleep() at the end of your code to prevent such issues. Try to have at least a 10 second delay, when testing, as was suggested in the previous videos.
Talk to the moderators if you want to lift the rate-limit put on you immediately.

@Nikhil The reason is because you have been rate-limited by the Cloud. If you breach the limits on the number of requests, you will automatically be blocked. Access is provided automatically at the end of the time mentioned in the message.
To read why the rate limiting was done, please read this link below,

It is suggested that you modify your code so that you make one request every 10 seconds in order to avoid being rate limited.

If you want higher limitations, you can subscribe to the Bolt Cloud Pro plan via the link below,
https://cloud.boltiot.com/billing/plans

I am getting a error 336 while getting the LM35 sensor values. I have made the temperature monitoring system before, but this error appeared for the first time today. Can anybody help me regarding that?
I am trying to read the values using a python script.

@ssarkar551 A description of the error like the error screenshot and the code would be helpful.


This is the error that was happening, even though data[‘success’] is equal to 1, still the data[‘value’] gets printed in the error section. So, I tried omitting that error check, but still it gets stuck at the next time.sleep line.
I understand that the sensor is working fine because it works while working on the Bolt Cloud, so I guessed there’s some error in the code, so copied down another similar code from hackster.io, but still the error persists.
I have used 5 different codes till now, but nothing’s working. I tried implementing this in Ubuntu Debian environment, still the same result as was in the case of VSCode. I have updated my python libraries too.

@ssarkar551 You can doing a string comparison in if data['success'] != '1':. You will need to do a numerical comparison like if data['success'] != 1:

1 Like


I am getting this…now what to do… please help me

@shivanikumari8420 Check if you have used your indentations properly. Mostly you might have used tabs instead of spaces or vice versa.
It is advised to either use tabs or spaces when indenting Python code.