Doubt in project

hello… I want to do a project on fire alarm with minimum and maximum limits by adding buzzer and LED light. I want someone to check my code



I am getting a continuous output without gap.


What is the issue in program? It is reading continuously, so you want to delay the process?

I see error in your circuit connection too.

  1. LED pins are connected incorrect.

  1. The resistor for buzzer is short circuited, so the buzzer will never take the route through the resistor. It’s pins are on the same line, like a parallel connection (with the wire from the buzzer and the one connected to pin 2.

Yea it is reading continuously… how to delay the process?
and I made changes in my circuit connects as well

time.sleep(10) --> here 10 means delay the execution for 10 seconds. So you can calibrate according to your needs.

And, suggestion -

  1. print “Reading sensor value” outside the while loop.
  2. remove either of the print statement “sensor value is”. Either the one inside try handle or the one outside.

hello!!
Now I am not getting a telegram message when the limit reached threshold… can you please check it once



fireerror

Check whether the telegram credentials are correct. The chat_id and bot_id have to be correct without any mistake. It happens as we keep zero ‘0’ instead of letter ‘O’ or viceversa in the bot_id. So check the credentials.

Correction - print("status of telegram message is:", telegram_status)

Check your telegram credentials, as we discussed earlier as well. You had a typing mistake last time.

Incase, you get the error again after you can create a new bot and add the bot token, that should work fine.

Let me know if you need any other information.