Fwd: Arduino/Bluetooth based రోబో Robo program
---------- Forwarded message ---------
From: pingili vikram kumar <vikramkumar.volunteer@gmail.com>
Date: Tue, Mar 14, 2023, 22:16
Subject: Fwd: Arduino/Bluetooth based రోబో Robo program
To: Khalid Khan <khalidkhanece.ssits@gmail.com>
From: pingili vikram kumar <vikramkumar.volunteer@gmail.com>
Date: Tue, Mar 14, 2023, 22:16
Subject: Fwd: Arduino/Bluetooth based రోబో Robo program
To: Khalid Khan <khalidkhanece.ssits@gmail.com>
సత్యము పలుకు
------
char data = 0; //Variable for storing received data
void setup()
{
Serial.begin(9600); //Sets the data rate in bits per second (baud) for serial data transmission
pinMode(12, OUTPUT);
pinMode(13, OUTPUT); //Sets digital pin 13 as output pin
}
void loop()
{
if(Serial.available() > 0) // Send data only when you receive data:
{
data = Serial.read(); //Read the incoming data and store it into variable data
Serial.print(data); //Print Value inside data in Serial monitor
Serial.print("\n"); //New line
if(data == '4') //Checks whether value of data is equal to 1
{
digitalWrite(12, HIGH); //If value is 1 then LED turns ON
digitalWrite(13, HIGH);
}
else if(data == '3') //Checks whether value of data is equal to 0
{
digitalWrite(12, LOW); //If value is 0 then LED turns OFF
digitalWrite(13, HIGH);
}
else if(data == '2') //Checks whether value of data is equal to 0
{
digitalWrite(12, HIGH); //If value is 0 then LED turns OFF
digitalWrite(13, LOW);
}
else if(data == '1') //Checks whether value of data is equal to 0
{
digitalWrite(12, LOW); //If value is 0 then LED turns OFF
digitalWrite(13, LOW);
}
}
}
8331926163
కామెంట్లు
కామెంట్ను పోస్ట్ చేయండి
దయచేసి మీ సలహాలను సూచనలను స్పష్టంగా పేర్కొనగలరు. plz see that ur comments are 'acceptable' in a value based society.