Ok Im just trying to walk before I run so to speak. Right now I have two rgb leds hooked up to my arduino, each represent one of Santa's eyes. Im looking to control each one individually with a simple AI app I will build but Im having trouble with code. I'm fairly new to Arduino, but I found this code in another related post(http://arduino.cc/forum/index.php/topic,124977.0.html) for BT communication:
//loop
char c;
if (mySerial.available())
{
c = (char)mySerial.read();
if (c=='H')
{
///// if the key is a letter H do your code here
//comprende?
}
}
In this example code, would I replace the 'H' with a 'L' (for left eye) then have make a similiar if statement for the right eye?
//loop
char c;
if (mySerial.available()){
c = (char)mySerial.read();
if (c=='L')
{
redvalueL=BTSerial.read();
greenvalueL=BTSerial.read();
bluevalueL=BTSerial.read();
}
analogWrite(redpin, redvalueL);
analogWrite(greenpin, greenvalueL);
analogWrite(bluepin, bluevalueL);
}