School project|How to change the color of Led|RGB|Arduino|Tinkercad Tutorial|RoboticsCoding|By Navya

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ส.ค. 2020
  • How to change the color of LED RGB project |Simple coding step by step for kids
    Please subscribe and follows us
    Please find the below code for this RGB color changing project
    void setup()
    {
    pinMode(11, OUTPUT);
    pinMode(10, OUTPUT);
    pinMode(9, OUTPUT);
    }
    void loop()
    {
    analogWrite(11, 255);
    analogWrite(10, 0);
    analogWrite(9, 0);
    delay(3000); // Wait for 3000 millisecond(s)
    analogWrite(11, 0);
    analogWrite(10, 153);
    analogWrite(9, 0);
    delay(3000); // Wait for 3000 millisecond(s)
    analogWrite(11, 255);
    analogWrite(10, 0);
    analogWrite(9, 0);
    delay(2000); // Wait for 2000 millisecond(s)
    analogWrite(11, 0);
    analogWrite(10, 153);
    analogWrite(9, 0);
    delay(2000); // Wait for 2000 millisecond(s)
    analogWrite(11, 255);
    analogWrite(10, 0);
    analogWrite(9, 0);
    delay(2000); // Wait for 2000 millisecond(s)
    analogWrite(11, 102);
    analogWrite(10, 0);
    analogWrite(9, 204);
    delay(5000); // Wait for 5000 millisecond(s)
    }
    Learn coding
    www.tinkercad.com/
    For more projects on coding , robotics ,please comment us
    Thanks & Regards
    Navya N
    Ethical World Education

ความคิดเห็น •