Control RGB LED for Arduino

Control RGB LED for Arduino Free App

Rated 0.00/5 (0) —  Free Android application by EpicMansDad007

Advertisements

About Control RGB LED for Arduino

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.length() > 0) {
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
}
}

How to Download / Install

Download and install Control RGB LED for Arduino version 1.0 on your Android device!
Downloaded 100+ times, content rating: Everyone
Android package: appinventor.ai_j_riddensdale.ArduinoControlRGB, download Control RGB LED for Arduino.apk

All Application Badges

Free
downl.
Android
1.6+
For everyone
Android app

App History & Updates

What's Changed
Changed name and Icon picture.
More downloads  Control RGB LED for Arduino reached 100 - 500 downloads
More downloads  Control RGB LED for Arduino reached 50 - 100 downloads

Oh snap! No comments are available for Control RGB LED for Arduino at the moment. Be the first to leave one!

Share The Word!


Rating Distribution

RATING
0.05
0 users

5

4

3

2

1