Please help me out for my project (Ultrasonic-Triggered Bluetooth-Blynk)

hi guys, im currently working on my project called Integrated Pomodoro Desk Lamp…where it is designed to help user to make use of their study time efficiently.

here are the list of project’s components.

  1. HC-05 Bluetooth
  2. SR-04 Ultrasonic Sensor
  3. 5v relay
  4. Arduino Uno
  5. Desk lamp.

the purpose of the ultrasonic in this circuit is to act as a switch to turn on the hc-05 bluetooth whenever the ultrasonic input are high(the sensor detect presence). i’ve already made a transistor as the bluetooth switch from 2N2222. The entire circuit are designed to measure the duration of the user to be present in front of the desk lamp, which will be measured in the application, made from Blynk App. the only thing is now my programming.

somehow, my whole program made my ic to bypass my ultrasonic sensor. the idea is to must first present in front of the sensor. if the ultrasonic sensor is on high, it will then proceed to switch on the bluetooth and launch Blynk. however, with my current programmed sketch, it will always make my ultrasonic on HIGH and proceed to bluetooth and blynk.

IPDL_MK_10.ino (1.41 KB)

Problem is this is really hard for us to help because even if your sketch compiles, we don't have the necessary components to reproduce the problems.

So, your best approach is to break your sketch apart. Code and test with one part at a time, make sure it works flawlessly before adding more parts

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html . Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom... :slight_smile: