About Me

My photo
India
Hey there, lovely people! I'm Hemant Menaria, and I'm passionate about programming. Having completed my MCA in 2011, I've delved into the world of coding with fervor. I believe in sharing knowledge, making complex concepts easy to grasp for everyone. JAVA, PHP, and ANDROID hold a special place in my heart, and I spend most of my time immersed in them. Currently, I'm deeply engaged in API/Webservice frameworks and crafting Hybrid mobile applications to enhance flexibility in the digital realm. If you ever find yourself stuck with a programming challenge, feel free to reach out to me at +91-8955499900 or drop me a line at hemantmenaria008@gmail.com. I'm always eager to help fellow enthusiasts navigate the intricacies of coding!

Embeded with c

You can try it in keil simulator
/* A door sensor is connected to the P1.1 pin, and a buzzer is connected to P1.7.
   Write a program to monitor the door sensor, and when it opens, sound the buzzer.
   You can sound the buzzer by sending a squre Wave of a few hundred Hz.  */


#include
sbit DorSensor = P1^1;
sbit Buzzer = P1^7;
void main(void)
{
      Buzzer=0;
     DorSensor=0;
     while(1)
     {
         if(DorSensor)
             Buzzer = 1;
            else
             Buzzer =0;
      }
}