JustPaste
HomeCategoriesAboutDonateContactTerms of UsePrivacy Policy
JustPaste

Free online notepad — write and share instantly

Navigate

  • Home
  • Timeline
  • Categories

Info

  • About
  • Donate
  • Contact

Legal

  • Terms of Use
  • Privacy Policy

© 2026 JustPaste.app. All rights reserved.

Made with ♥ by JustPaste

Lab1 | JustPaste.app
26 days ago6 views
👨‍💻Programming

Lab1

int ledpins[] = {2, 3, 4, 5, 6};

void setup() {
  for (int i = 0; i < 5; i++) {
    pinMode(ledpins[i], OUTPUT);
  }
}

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

  for (int i = 3; i >= 1; i--) {
    digitalWrite(ledpins[i], HIGH);
    delay(1000);
    digitalWrite(ledpins[i], LOW);
    delay(1000);
  }
}

⚠️Content was pasted as plain text and auto-formatted as a code block. Use the Code Block button in the editor for proper formatting.

← Back to timeline