About APIs and Project

Hello.
I have been trying to create a project with the temperature sensor and the buzzer. The concept is to turn on the buzzer each time the temperature crosses the threshold value. And to turn off the buzzer whenever the temperature comes back under the threshold value.

But whenever I am connecting the buzzer and the sensor respectively, there’s error to send request for the sensor value. Or if the buzzer turns on, then the sensor value doesn’t load. Also, if the buzzer is disconnected from the circuit, the temperature readings start appearing as it normally should.

Is it because I am using the same API key to invoke both the LM35 sensor reading as well as to access the buzzer? Is it not possible to operate two different devices with the same API key?
Please help.

Hi,

You can use same Bolt device to achieve this purpose.

  1. Connect LM35 and Buzzer to the same Bolt device.
  2. Loop over the below steps every 10 seconds.
  3. Read the A0 pin value of the Bolt device using Python Bolt library.
  4. If it is under the threshold limit then make Buzzer pin as OFF.
  5. If it is above the threshold then make it ON.

Let me know if you have any confusion about the above steps.

1 Like