Hi Everyone,
Quick Question for you lot.
Im trying to figure out how much voltage comes out of each pin, i dont have a multimeter or anything on me so im not sure what it is or where to find it (im new to all this).
Here is my code and my Circuit.
int redPin = 13;
int greenPin = 12;
int bluePin = 11;
String myColour;
String msg = "What Colour do you want to Display? ";
String msg2 = "(Red,Green,Blue,All,Off)";
void setup()
{
Serial.begin(115200);
pinMode(redPin,OUTPUT);
pinMode(greenPin,OUTPUT);
pinMode(bluePin,OUTPUT);
}
void loop()
{
Serial.println(msg);
Serial.println(msg2);
while (Serial.available()==0)
{
}
myColour = Serial.readString();
if (myColour == "red" || myColour == "Red" || myColour == "R" || myColour == "r" || myColour == "RED" )
{
digitalWrite(redPin,HIGH);
digitalWrite(greenPin,LOW);
digitalWrite(bluePin,LOW);
}
if (myColour == "green" || myColour == "Green" || myColour == "G" || myColour == "g" || myColour == "GREEN" )
{
digitalWrite(redPin,LOW);
digitalWrite(greenPin,HIGH);
digitalWrite(bluePin,LOW);
}
if (myColour == "blue" || myColour == "Blue" || myColour == "B" || myColour == "b" || myColour == "BLUE" )
{
digitalWrite(redPin,LOW);
digitalWrite(greenPin,LOW);
digitalWrite(bluePin,HIGH);
}
if (myColour == "all" || myColour == "All" || myColour == "ALL" )
{
digitalWrite(redPin,HIGH);
digitalWrite(greenPin,HIGH);
digitalWrite(bluePin,HIGH);
}
if (myColour == "off" || myColour == "OFF" || myColour == "Off" )
{
digitalWrite(redPin,LOW);
digitalWrite(greenPin,LOW);
digitalWrite(bluePin,LOW);
}
}
Thanks.