Want to create interactive content? It’s easy in Genially!

Get started free

LED RGB digital

vicky.sigler

Created on November 9, 2022

Start designing with a free template

Discover more than 1500 professional designs like these:

Randomizer

Timer

Find the pair

Hangman Game

Dice

Scratch and Win Game

Create a Word Search

Transcript

RGB לד

RGB קוד - לד

#define GREEN_LED 9 #define BLUE_LED 10 #define RED_LED 11 void setup() { pinMode(GREEN_LED, OUTPUT); pinMode(BLUE_LED, OUTPUT); pinMode(RED_LED, OUTPUT); } void loop() { //Green light digitalWrite(GREEN_LED, HIGH); digitalWrite(BLUE_LED, LOW); digitalWrite(RED_LED, LOW); delay(1000); //Magenta light digitalWrite(GREEN_LED, LOW); digitalWrite(BLUE_LED, HIGH); digitalWrite(RED_LED, HIGH); delay(1000); }

אתגרים נוספים

כתבו קוד שידליק את הלד בכל אחד מהצבעים הבסיסיים לשניה (ירוק, כחול, אדום, סיאן, מג'נטה, צהוב) רמז בשקף הבא

כתבו קוד שבנוסף יכבה את הלד, וידליק אותו לצבע לבן למשך שניה

צבעים בסיסיים