Want to create interactive content? It’s easy in Genially!
Get started free
LED RGB analog
vicky.sigler
Created on November 5, 2022
Start designing with a free template
Discover more than 1500 professional designs like these:
View
Correct Concepts
View
Microcourse: Artificial Intelligence in Education
View
Puzzle Game
View
Scratch and Win
View
Microlearning: How to Study Better
View
Branching Scenarios Challenge Mobile
View
Branching Scenario Mission: Innovating for the Future
Transcript
יציאות אנלוגיות PWM
RGB צבעי
RGB לד
Arduino סימולציה
ESP32 סימולציה
ESP32 ledc סימולציה
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() { rgb_color(0,0,255); //blue delay(1000); rgb_color(0,255,0); //green delay(1000); rgb_color(255,0,0); //red delay(1000); rgb_color(125,125,0); //yellow delay(1000); } void rgb_color(int r, int g, int b) { analogWrite(RED_LED, r); analogWrite(GREEN_LED, g); analogWrite(BLUE_LED, b); }