SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void setup() {              
  2.   pinMode(2, OUTPUT);
  3.   pinMode(3, OUTPUT);
  4.   pinMode(4, OUTPUT);
  5.   pinMode(5, OUTPUT);
  6.   pinMode(6, OUTPUT);
  7.   pinMode(7, OUTPUT);
  8.   pinMode(8, OUTPUT);
  9.   pinMode(9, OUTPUT);
  10.   digitalWrite(9, 1);  // start with the "dot" off
  11. }
  12.  
  13. void loop() {
  14.   // 0
  15.  digitalWrite(2, 0);
  16.  digitalWrite(3, 0);
  17.  digitalWrite(4, 0);
  18.  digitalWrite(5, 0);
  19.  digitalWrite(6, 0);
  20.  digitalWrite(7, 0);
  21.  digitalWrite(8, 1);
  22.  delay(1000);
  23.    // 1
  24.  digitalWrite(2, 1);
  25.  digitalWrite(3, 0);
  26.  digitalWrite(4, 0);
  27.  digitalWrite(5, 1);
  28.  digitalWrite(6, 1);
  29.  digitalWrite(7, 1);
  30.  digitalWrite(8, 1);
  31.  delay(1000);
  32.     // 2
  33.  digitalWrite(2, 0);
  34.  digitalWrite(3, 0);
  35.  digitalWrite(4, 1);
  36.  digitalWrite(5, 0);
  37.  digitalWrite(6, 0);
  38.  digitalWrite(7, 1);
  39.  digitalWrite(8, 0);
  40.  delay(1000);
  41.      // 3
  42.  digitalWrite(2, 0);
  43.  digitalWrite(3, 0);
  44.  digitalWrite(4, 0);
  45.  digitalWrite(5, 0);
  46.  digitalWrite(6, 1);
  47.  digitalWrite(7, 1);
  48.  digitalWrite(8, 0);
  49.  delay(1000);
  50.       // 4
  51.  digitalWrite(2, 1);
  52.  digitalWrite(3, 0);
  53.  digitalWrite(4, 0);
  54.  digitalWrite(5, 1);
  55.  digitalWrite(6, 1);
  56.  digitalWrite(7, 0);
  57.  digitalWrite(8, 0);
  58.  delay(1000);
  59.        // 5
  60.  digitalWrite(2, 0);
  61.  digitalWrite(3, 1);
  62.  digitalWrite(4, 0);
  63.  digitalWrite(5, 0);
  64.  digitalWrite(6, 1);
  65.  digitalWrite(7, 0);
  66.  digitalWrite(8, 0);
  67.  delay(1000);
  68.         // 6
  69.  digitalWrite(2, 0);
  70.  digitalWrite(3, 1);
  71.  digitalWrite(4, 0);
  72.  digitalWrite(5, 0);
  73.  digitalWrite(6, 0);
  74.  digitalWrite(7, 0);
  75.  digitalWrite(8, 0);
  76.  delay(1000);
  77.          // 7
  78.  digitalWrite(2, 0);
  79.  digitalWrite(3, 0);
  80.  digitalWrite(4, 0);
  81.  digitalWrite(5, 1);
  82.  digitalWrite(6, 1);
  83.  digitalWrite(7, 1);
  84.  digitalWrite(8, 1);
  85.  delay(1000);
  86.           // 8
  87.  digitalWrite(2, 0);
  88.  digitalWrite(3, 0);
  89.  digitalWrite(4, 0);
  90.  digitalWrite(5, 0);
  91.  digitalWrite(6, 0);
  92.  digitalWrite(7, 0);
  93.  digitalWrite(8, 0);
  94.  delay(1000);
  95.            // 9
  96.  digitalWrite(2, 0);
  97.  digitalWrite(3, 0);
  98.  digitalWrite(4, 0);
  99.  digitalWrite(5, 0);
  100.  digitalWrite(6, 1);
  101.  digitalWrite(7, 0);
  102.  digitalWrite(8, 0);
  103.  delay(1000);
  104.  
  105. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top