Arduino — Arduino Mega simulation

LED

An interactive Arduino Mega circuit simulation you can run free in your browser on Velxio, by eternal.

Components

Sketch code

// Arduino Mega 2560 — Blink LED
#define PINNUM 3
const int PINRGB[3]={13,12,11};

void setup() {
  for(int i=0;i<3;i++) pinMode(PINRGB[i],OUTPUT);

}
 
void loop() {
  for(int i=0;i<3;i++)  {
      digitalWrite(PINRGB[i], LOW);
      delay(1000);
      digitalWrite(PINRGB[i], HIGH);
      delay(50);
  }
}

More projects by eternal