Control RGB LED for Arduino 1.0



Publisher Description



This app used in combination with an Arduino allows the user to turn on and off an RGB LED. It is designed to be used by teachers who wish to give students an introduction to basic electronics and computer coding.

You will need an Arduino, jumper wires, an RGB LED, and an HC-06 bluetooth device.

The code can be found here:

#include
int outPinRed = 9;
int outPinGreen = 10;
int outPinBlue = 11;
SoftwareSerial BT(1, 0); //TX, RX respectively
String color;

void setup() {
BT.begin(9600);
pinMode(outPinRed, OUTPUT); //RED
pinMode(outPinGreen, OUTPUT); //GREEN
pinMode(outPinBlue, OUTPUT); //BLUE
}
void loop() {
while (BT.available()) { //check to see if there is an available port
delay(10); // delay added to make things stable
char c = BT.read(); //conduct a serial read
color += c ; //build the string "blue, red, and green"
}

if (color == "red")
{
digitalWrite(outPinRed, HIGH);
digitalWrite(outPinGreen, LOW);
digitalWrite(outPinBlue, LOW);
delay(20);
}
else if (color == "green")
{
digitalWrite(outPinRed, LOW);
digitalWrite(outPinGreen, HIGH);
digitalWrite(outPinBlue, LOW);
delay(20);
}
else if (color == "blue")
{
digitalWrite(outPinRed, LOW);
digitalWrite(outPinGreen, LOW);
digitalWrite(outPinBlue, HIGH);
delay(20);
}
else if (color == "stop")
{
digitalWrite(outPinRed, HIGH);
digitalWrite(outPinGreen, HIGH);
digitalWrite(outPinBlue, HIGH);
delay(500);
digitalWrite(outPinRed, LOW);
digitalWrite(outPinGreen, LOW);
digitalWrite(outPinBlue, LOW);
delay(500);
digitalWrite(outPinRed, HIGH);
digitalWrite(outPinGreen, HIGH);
digitalWrite(outPinBlue, HIGH);
delay(500);
digitalWrite(outPinRed, LOW);
digitalWrite(outPinGreen, LOW);
digitalWrite(outPinBlue, LOW);
delay(500);
digitalWrite(outPinRed, HIGH);
digitalWrite(outPinGreen, HIGH);
digitalWrite(outPinBlue, HIGH);
delay(500);
digitalWrite(outPinRed, LOW);
digitalWrite(outPinGreen, LOW);
digitalWrite(outPinBlue, LOW);
delay(500);
}
else if (color == "fader")
{
analogWrite(outPinRed, random(0,255));
analogWrite(outPinGreen, random(0,255));
analogWrite(outPinBlue, random(0,255));
delay(250);
}
color = ""; //Reset the variable
}
}



About Control RGB LED for Arduino

Control RGB LED for Arduino is a free app for Android published in the Teaching & Training Tools list of apps, part of Education.

The company that develops Control RGB LED for Arduino is EpicMansDad007. The latest version released by its developer is 1.0.

To install Control RGB LED for Arduino on your Android device, just click the green Continue To App button above to start the installation process. The app is listed on our website since 2016-02-04 and was downloaded 31 times. We have already checked if the download link is safe, however for your own protection we recommend that you scan the downloaded app with your antivirus. Your antivirus may detect the Control RGB LED for Arduino as malware as malware if the download link to appinventor.ai_j_riddensdale.ArduinoControlRGB is broken.

How to install Control RGB LED for Arduino on your Android device:

  • Click on the Continue To App button on our website. This will redirect you to Google Play.
  • Once the Control RGB LED for Arduino is shown in the Google Play listing of your Android device, you can start its download and installation. Tap on the Install button located below the search bar and to the right of the app icon.
  • A pop-up window with the permissions required by Control RGB LED for Arduino will be shown. Click on Accept to continue the process.
  • Control RGB LED for Arduino will be downloaded onto your device, displaying a progress. Once the download completes, the installation will start and you'll get a notification after the installation is finished.



RELATED PROGRAMS
Our Recommendations






BarCode2D-PNG


Click stars to rate this APP!

Users Rating:  
  0.0/5     0
Downloads: 31
Updated At: 2024-04-22
Publisher: EpicMansDad007
Operating System: Android
License Type: Free