Surilli
Published © LGPL

Interface an RGB LED with Surilli GSM

Combine Red, Green & Blue in an RGB LED to produce over 16 million hues of light.

BeginnerFull instructions provided15 minutes852
Interface an RGB LED with Surilli GSM

Things used in this project

Hardware components

RGB Diffused Common Anode
RGB Diffused Common Anode
×1
Surilli GSM
Surilli GSM
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Code

Arduino sketch RGB

C/C++
    int redPin= A0;
    int greenPin = A1;
    int bluePin = A2;
    void setup() {
      pinMode(redPin, OUTPUT);
      pinMode(greenPin, OUTPUT);
      pinMode(bluePin, OUTPUT);
    }
    void loop() {
      setColor(255, 0, 0); // Red Color
      delay(1000);
      setColor(0, 255, 0); // Green Color
      delay(1000);
      setColor(0, 0, 255); // Blue Color
      delay(1000);
      setColor(255, 255, 255); // White Color
      delay(1000);
      setColor(170, 0, 255); // Purple Color
      delay(1000);
    }
    void setColor(int redValue, int greenValue, int blueValue) {
      analogWrite(redPin, redValue);
      analogWrite(greenPin, greenValue);
      analogWrite(bluePin, blueValue);
    }

Credits

Surilli
196 projects • 65 followers
Surilli is a premiere Internet of Things centric Technology Company aimed at providing cutting edge innovative solutions.
Contact

Comments

Please log in or sign up to comment.