Drakkheen

Untitled

Mar 1st, 2021
673
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int speed = 100;
  2.  
  3. int line[] = {4, 5, 6, 7, 8};
  4. int column[] = {9, 10, 11, 12, 13};
  5.  
  6. void setup() {
  7.  
  8.  
  9.   for (int i = 4; i < 14; i++) {
  10.     pinMode(i, OUTPUT);
  11.   }
  12.  
  13. }
  14.  
  15. void loop() {
  16.   LED(1, 1);
  17.   LED(2, 2);
  18.   LED(3, 3);
  19.   LED(4, 4);
  20.   LED(5, 5);
  21.  
  22.   LED(5, 1);
  23.   LED(4, 2);
  24.   LED(2, 4);
  25.   LED(1, 5);
  26.  
  27. }
  28.  
  29.  
  30. void LED(int x, int y) {
  31.   digitalWrite(column[y - 1], 1);
  32.   digitalWrite(line[x - 1], 1);
  33.  
  34.   digitalWrite(column[y - 1], 0);
  35.   digitalWrite(line[x - 1], 0);
  36.  
  37. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×