Control RGB LED for Arduino 1.0 Icon

Control RGB LED for Arduino

EpicMansDad007 Education
0
0 Ratings
100+
Downloads
1.0
version
Feb 06, 2016
release date
1.4 MB
file size
Free
Download

What's New

Changed name and Icon picture.

About Control RGB LED for Arduino Android App

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
}
}

Other Information:

Requires Android:
Android 1.6+ Donut (API 4)
Other Sources:

Download

This version of Control RGB LED for Arduino Android App comes with one universal variant which will work on all the Android devices.

Variant
3
(Feb 06, 2016)
Architecture
Minimum OS
Android 1.6+ Donut (API 4)
Screen DPI
nodpi (all screens)

All Versions

If you are looking to download other versions of Control RGB LED for Arduino Android App, We have 1 version in our database. Please select one of them below to download.

Loading..