I have lost one of the component from bolt iot kit which is male to female jumper wire.
Probably not since they dont take any responsibility for component loss/damage after the kit has been delivered but you can easily buy a new one from a shop for like 2-5 INR (single piece which most shopkeepers wont sell) or 50-60 INR for a whole set
Hi @versha03may2001,
We do not ship male to female wire in the kit.
We only ship 3 male to male wires as part of the training kit.
Then how do I connect LM35 to the Bolt Wifi module?
its using a male to male
the vcc one to 5V (using male to male) the middle one (output) to AO (using male to male) and the ground one to GND also using male to male theres no use of female to male
This is a female to male which cannot work with a breadboard
Hi @versha03may2001,
You may connect the LM35 Sensor by using the Male to male wires as well.
Here are the steps.
Step 1: Hold the sensor so that you can read LM35 written on it.
Step 2: In this position, identify the sensor pins as VCC, Output, and Gnd from your left to right.
In the above image, VCC is connected to the red wire, Output is connected to the orange wire and GND is connected to the brown wire.
Step 3 : Connect the 3 pins of the LM35 to the Bolt Wifi Module using the male-to-male wires and a breadboard as follows:
- The VCC pin of the LM35 connects to one point of the breadboard. Then using one male-to-male wire, connect that point of the breadboard to 5v of the Bolt Wifi module.
- The output pin of the LM35 connects to another point on the breadboard. Then using another male-to-male wire connect that point of the breadboard to the A0 (Analog input pin) of the Bolt Wifi module.
- On similar lines connect the GND pin of the LM35 to the GND of the Bolt WiFi module using a breadboard.
The final circuit should look like the image below:
Hi @rohit.ts wanted to ask something is this correct
i want to make it so that it only activates a buzzer for 3 seconds when the threshhold is crossed no mails and messages
so is this correct?
import conf
from boltiot import Bolt
import time
minimum_limit = 300
maximum_limit = 600
mybolt = Bolt(conf.API_KEY, conf.DEVICE_ID)
while True:
print("Reading sensor value")
response = mybolt.analogRead('A0')
print("Sensor value is: " + response)
try:
sensor_value = int(response)
if sensor_value > maximum_limit or sensor_value < minimum_limit:
print("Threshold crossed. Activating buzzer for 3 seconds")
# Activate the buzzer for 3 seconds
mybolt.digitalWrite('D0', 'HIGH') # Assuming D0 is the digital pin connected to the buzzer
time.sleep(3)
mybolt.digitalWrite('D0', 'LOW') # Turn off the buzzer
except Exception as e:
print("Error occurred: Below are the details")
print(e)
time.sleep(10)
The code you provided seems mostly correct for your intended purpose.
If you want to ensure that the buzzer only sounds once for a single crossing of the threshold (i.e., it doesn’t keep sounding while the value remains beyond the threshold), you might consider adding a flag to track whether the buzzer has already been activated. For example:
buzzer_activated = False
while True:
# … (rest of the code)if sensor_value > maximum_limit or sensor_value < minimum_limit: if not buzzer_activated: buzzer_activated = True print("Threshold crossed. Activating buzzer for 3 seconds") mybolt.digitalWrite('D0', 'HIGH') time.sleep(3) mybolt.digitalWrite('D0', 'LOW') buzzer_activated = False # Reset the flag # ... (rest of the code)
This will ensure that the buzzer is only activated once for each threshold crossing.