Code to stimulate buzzer if proximity sensor senses smthng

i want to initiate the buzzer if prximity sensor ha smthng in front of it .
can u plz check and suggest changes in my code

CODE

<!doctype html>

BOLT

prox sensor Controller


Start

sorry the code didnt get pasted
i m adding it in this post
/*
<!doctype html>

BOLT

prox sensor Controller


Start */

1 Like

You don’t need code for this, and actually with the bolt you can’t really do this real time via code.
You need to setup a circuit instead. Go on and give your break some exercise.
If you still can’t get it, the answers down below.

spoiler

Power the sensor as usual, and connect the (+) of the buzzer to its output pin, The (-) of the buzzer, connect to ground.

1 Like

Hi,

What you are looking to make falls under an automation task and not an IoT task. Now dont get me wrong IoT does include automation but this is if the processing is done on the cloud and not locally. Hence to make a simple fire detector I would advise the use of Arduino (Buzz when fire is detected) , but if you want to send the info that fire has been detected to cloud then use bolt interfaced with an arduino as the instructable below suggests:

This one is for temperature and humidity , but can be extended for any sensor.

Also this link may help if you still want to go ahead to the same with bolt