• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Mechanic37

Mechanic37

Show Search
Hide Search
  • भौतिक विज्ञान
  • रसायन
  • मैकेनिकल
  • इलेक्ट्रिकल
  • कंप्यूटर
  • जीव विज्ञान
  • प्रोजेक्ट्स
You are here: Home / Arduino / Program Arduino uno with if statement and 2 condition

Program Arduino uno with if statement and 2 condition

अप्रैल 8, 2016 by MECHANIC37 1 Comment

विषय-सूची

  • Program Arduino uno with if statement 2 condition se control
    • Arduino program-
      • Arduino program 3
      • Arduino program 4-
Arduino Projects

Program Arduino uno with if statement 2 condition se control

Hello friends

एक Ardunio program बनाया basic C programming language का use if statement का use कर के अपने arduino microcontroller के लिए जिसे में आपके साथ share कर रहा हूँ ये बहुत ही आसान सा program है जो की led को control कर रहा है इसमें मेनें led को pin 13 से connect किया और a=4,b=2 define किया

पहली condition if के साथ दी if(a<b) यदि ये true होती है (जोकि नहीं होगी kyuki मेने a=4,b=2 लिया है)तो if के अंदर की coding run हो तब delay time 1000milisecond यानि की एक second लिया जिससे इस if के अंदर का code से led एक second में on और फिर एक second के लिए off हो जाएगी चूंकि program void loop में है तो ऐसा लगातार चलता रहेगा


(adsbygoogle = window.adsbygoogle || []).push({});

फिर else में delay time कम करके 100ms कर दिया a=4,b=2 से (a<b) true नहीं हुई इसलिए else का code रन होगा जिसमे भी बिल्कुल if का ही कोड लिखा है पर delay time सिर्फ 100ms है तो led 100milisecond के लिए on और 100milisecond के लिए off होगी चूंकि delay time बहुत ही कम है तो ये led जल्दी-जल्दी on off होगी

 

Arduino program-

Arduino program 3

इस पर if(a<b) true नहीं होगी kyuki a=4,b=2 है

int led=13;//initialize digital pin 13
int a=4;
int b=2;
void setup() {
    pinMode(led, OUTPUT);// initialize digital pin 13 output के लिए
      }
void loop() {
  if(a<b){
  digitalWrite(13, HIGH);   // turn the LED on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // turn the LED off
  delay(1000);
            }
 else{
   digitalWrite(13, HIGH);   // turn the LED on
  delay(100);              // wait  100 mili second के लिए
  digitalWrite(13, LOW);    // turn the LED
  delay(100);wait  100 mili second के लिए
      }
}

आप इसे costomize कर के भी use करें condition को change कर सकते है,delay time increase-decrease कर सकते है

Arduino program 4-

if(a==37) true होगी kyuki a=37 define किया गया है जिससे if के अंदर का program रन होगा

int led=13;//initialize digital pin 13
int a=37;
void setup() {
    pinMode(led, OUTPUT);// initialize digital pin 13 output के लिए
      }
void loop() {
  if(a==37){
  digitalWrite(13, HIGH);   // turn the LED on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // turn the LED off
  delay(1000);
            }
 else{
   digitalWrite(13, HIGH);   // turn the LED on
  delay(100);              // wait  100 mili second के लिए
  digitalWrite(13, LOW);    // turn the LED
  delay(100);wait  100 mili second के लिए
      }
}

आप इसे भी costomize कर के भी use करें condition को change कर सकते है,जैसे if(a==8) या कुछ भी ,delay time increase-decrease कर सकते है

[ays_quiz id=’4′]
  • Share on Facebook
  • Tweet on Twitter

Filed Under: Arduino, Engineering Project, Uncategorized

Arduino Projects

  • Robot कैसे बनाएं ? Full Tutorial
  • Arduino क्या है ? भाग | 5 टॉप प्रोजेक्ट्स
  • Robotic Arm कैसे बनाएं ? रिमोट कण्ट्रोल
  • Temperature Alarm या Indicator कैसे बनाएं ?
  • DIY Digital Distance Measuring Device In HIndi
  • Get IR Hex Code From Any Tv Remote
  • Build A Room Temperature Monitor In Hindi
  • Temperature Sensor LM35 And Arduino In Hindi
  • Voice Command से Control होने बाला Robot बनाएं
  • Pir Motion Sensor Controlled CFL Or Lamp
  • LDR Sensor अन्धेरा होने पर Led on हो जाएगी
  • Control A Servo Motor Using Potentiometer
  • 8 Channel Home Automation System In Hindi
  • Getting Started with Arduino In Hindi
  • What is Servo Motor In Hindi ?
  • Arduino Projects in hindi
  • Lcd Display Interfacing With Arduino In Hindi
  • Led की Brightness कैसे control करें
  • Arduino से तीन Servo Motor Control करें
  • Dc Motor की Speed कैसे Control करें

Reader Interactions

Comments

  1. Rupesh kumar says

    जनवरी 5, 2020 at 5:13 अपराह्न

    Sir
    Mai Arduino ko mobile se program ming upload kar rahe to usme error- uploadeding problem to board Bata Raha hai Kya Mera Android se uploading nahi ho raha
    help me
    Lekin jab Mai first blink sketch upload kiye the to ho gya tha

    प्रतिक्रिया

प्रातिक्रिया दे जवाब रद्द करें

आपका ईमेल पता प्रकाशित नहीं किया जाएगा. आवश्यक फ़ील्ड चिह्नित हैं *

Primary Sidebar

नयी और अपडेट

  • मैग्नेटिक रिलक्टेंस क्या होती है ? इसकी इकाई एव इसका उपयोग बताइये
  • रेफ्रिजरेंट क्या है ? इसके प्रकार | प्रॉपर्टी
  • द्रव्य तरंगे क्या है ? इसकी तरंगदेर्ध्य का सूत्र | विशेषताएँ
  • गैल्वनीकरण क्या है ? एवं इसकी विधि । नुकसान
  • तापायनिक उत्सर्जन एवं विकिरण की द्वैती प्रकृति क्या है ?
  • विद्युत लेपन क्या होता है ? इसकी विधि | उपयोग

विषय चुने


भौतिक विज्ञान

रसायन विज्ञान

मैकेनिकल
इंजीनियरिंग

इलेक्ट्रिकल
इंजीनियरिंग

इलेक्ट्रॉनिक
कंपोनेंट्स

इंजीनियरिंग
प्रोजेक्ट्स

कंप्यूटर

जीव विज्ञान

Footer

Gmail पर varify जरूर करें

Subscribe कीजिये
  • Facebook
  • Flickr
  • Instagram
  • LinkedIn
  • Pinterest
  • Twitter
  • YouTube

2015–2021

  • साइटमैप
  • संपर्क करें
  • हमारे बारे में
  • विज्ञापन दें
  • इलेक्ट्रिकल
  • रसायन विज्ञान
  • जीव विज्ञान
  • कंप्यूटर सीखें
  • इंजीनियरिंग प्रोजेक्ट्स