RGB LED Simulation in Proteus
Автор: Satyam Singh
Загружено: 2020-04-25
Просмотров: 7890
Описание:
A Quick guide for RGB Led Simulation with arduino using Proteus professioinal, In this video i am using Common Cathode RGB led with arduino uno. Find source code of this simulation below.
Source code:
int redPin= 7;
int greenPin = 6;
int bluePin = 5;
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);
}
Music By: NoCopyrightSounds
Song : Alan walker
• Видео
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: