Want to create interactive content? It’s easy in Genially!
LED RGB digital
vicky.sigler
Created on November 9, 2022
Start designing with a free template
Discover more than 1500 professional designs like these:
View
Teaching Challenge: Transform Your Classroom
View
Frayer Model
View
Math Calculations
View
Interactive QR Code Generator
View
Interactive Scoreboard
View
Interactive Bingo
View
Interactive Hangman
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); }
אתגרים נוספים
כתבו קוד שידליק את הלד בכל אחד מהצבעים הבסיסיים לשניה (ירוק, כחול, אדום, סיאן, מג'נטה, צהוב) רמז בשקף הבא
כתבו קוד שבנוסף יכבה את הלד, וידליק אותו לצבע לבן למשך שניה
צבעים בסיסיים