Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
const int redPin = 3;
#define FADESPEED 1
void setup() {
pinMode(redPin, OUTPUT);
Serial.print("Arduino control RGB LEDs Connected OK ( Sent From Arduinno Board )");
void loop() {
while (Serial.available() > 0) {
// look for the next valid integer in the incoming serial stream:
int red = Serial.parseInt();
red = constrain(red, 0, 255);
analogWrite(redPin, red);
Serial.print("Data Response : ");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment