Skip to content

Instantly share code, notes, and snippets.

@zachflower
zachflower / rainbow.cpp
Last active February 19, 2024 09:34
Smooth RGB LED Color Transitions (Arduino)
int redPin = 11;
int greenPin = 10;
int bluePin = 9;
int r = 0;
int g = 0;
int b = 0;
void setup() {
pinMode(redPin, OUTPUT);