This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

arduinolcddvd

By: a guest on Jan 20th, 2013  |  syntax: None  |  size: 14.21 KB  |  views: 25  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. int aa = 12; int ab = 11; int ac = 10; int ad = 9; int ae = 8; int af = 7; int ag = 6;
  2. int D1 = 4; int D2 = 3; int D3 = 5; int D4 = 2; int D5 = 1; int D6 = 0;
  3. int del = 1; //délai
  4. int it = 0; //itérateur
  5.  
  6. void setup() {                
  7.   pinMode(aa, OUTPUT); pinMode(ab, OUTPUT); pinMode(ac, OUTPUT); pinMode(ad, OUTPUT); pinMode(ae, OUTPUT); pinMode(af, OUTPUT); pinMode(ag, OUTPUT);
  8.   pinMode(D1, OUTPUT); pinMode(D2, OUTPUT); pinMode(D3, OUTPUT); pinMode(D4, OUTPUT); pinMode(D5, OUTPUT); pinMode(D6, OUTPUT);
  9. }
  10.  
  11. void reset(){
  12.   digitalWrite(aa, HIGH); digitalWrite(ab, HIGH); digitalWrite(ac, HIGH); digitalWrite(ad, HIGH); digitalWrite(ae, HIGH); digitalWrite(af, HIGH); digitalWrite(ag, HIGH);
  13.   digitalWrite(D1, LOW); digitalWrite(D2, LOW); digitalWrite(D3, LOW); digitalWrite(D4, LOW); digitalWrite(D5, LOW); digitalWrite(D6, LOW);
  14. }
  15.  
  16.  
  17.  
  18. // the loop routine runs over and over again forever:
  19. void loop() {
  20.   if(it<100){h(D1); reset(); e(D2); reset(); l(D3); reset(); l(D4); reset(); o(D5); reset();};
  21.   if(it>100){w(D1); reset(); o(D2); reset();r(D3); reset(); l(D4); reset(); d(D5); reset();};
  22.   if(it >= 200){it=0;};
  23.   it++;
  24. }
  25. void o1 (int D){
  26.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  27.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  28. }
  29.  
  30. void o2 (int D){
  31.   digitalWrite(aa, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  32.   digitalWrite(ab, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  33.   digitalWrite(ad, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  34.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  35.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  36. }
  37.  
  38. void o3 (int D){
  39.   digitalWrite(aa, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  40.   digitalWrite(ab, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  41.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  42.   digitalWrite(ad, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  43.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  44. }
  45.  
  46. void o4 (int D){
  47.   digitalWrite(ab, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  48.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  49.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  50.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  51. }
  52.  
  53. void o5 (int D){
  54.   digitalWrite(aa, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  55.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  56.   digitalWrite(ad, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  57.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  58.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  59. }
  60.  
  61. void o6 (int D){
  62.   digitalWrite(aa, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  63.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  64.   digitalWrite(ad, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  65.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  66.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  67.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  68. }
  69.  
  70. void o7 (int D){
  71.   digitalWrite(aa, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  72.   digitalWrite(ab, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  73.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  74. }
  75.  
  76. void o8 (int D){
  77.   digitalWrite(aa, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  78.   digitalWrite(ab, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  79.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  80.   digitalWrite(ad, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  81.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  82.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  83.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  84. }
  85.  
  86. void o9 (int D){
  87.   digitalWrite(aa, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  88.   digitalWrite(ab, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  89.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  90.   digitalWrite(ad, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  91.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  92.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  93. }
  94.  
  95. void a (int D){
  96.   digitalWrite(aa, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  97.   digitalWrite(ab, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  98.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  99.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  100.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  101.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  102. }
  103.  
  104. void b (int D){
  105.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  106.   digitalWrite(ad, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  107.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  108.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  109.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  110. }
  111.  
  112. void c (int D){
  113.   digitalWrite(ad, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  114.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  115.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  116. }
  117.  
  118. void d (int D){
  119.   digitalWrite(ab, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  120.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  121.   digitalWrite(ad, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  122.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  123.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  124. }
  125.  
  126. void e (int D){
  127.   digitalWrite(aa, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  128.   digitalWrite(ad, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  129.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  130.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  131.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  132. }
  133.  
  134. void f (int D){
  135.   digitalWrite(aa, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  136.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  137.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  138.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  139. }
  140.  
  141. void g (int D){
  142.   digitalWrite(aa, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  143.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  144.   digitalWrite(ad, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  145.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  146.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  147. }
  148.  
  149. void h (int D){
  150.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  151.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  152.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  153.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  154. }
  155.  
  156. void i (int D){
  157.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  158.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  159. }
  160.  
  161. void j (int D){
  162.   digitalWrite(ab, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  163.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  164.   digitalWrite(ad, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  165.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  166. }
  167.  
  168. void k (int D){
  169.   digitalWrite(ab, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  170.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  171.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  172.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  173.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  174. }
  175.  
  176. void l (int D){
  177.   digitalWrite(ad, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  178.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  179.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  180. }
  181.  
  182. void m (int D){
  183.   digitalWrite(aa, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  184.   digitalWrite(ab, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  185.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  186.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  187.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  188. }
  189.  
  190. void n (int D){
  191.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  192.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  193.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  194. }
  195.  
  196. void o (int D){
  197.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  198.   digitalWrite(ad, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  199.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  200.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  201. }
  202.  
  203. void p (int D){
  204.   digitalWrite(aa, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  205.   digitalWrite(ab, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  206.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  207.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  208.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  209. }
  210.  
  211. void q (int D){
  212.   digitalWrite(aa, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  213.   digitalWrite(ab, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  214.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  215.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  216.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  217. }
  218.  
  219. void r (int D){
  220.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  221.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  222. }
  223.  
  224. void s (int D){
  225.   digitalWrite(aa, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  226.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  227.   digitalWrite(ad, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  228.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  229.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  230. }
  231.  
  232. void t (int D){
  233.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  234.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  235.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  236. }
  237.  
  238. void u (int D){
  239.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  240.   digitalWrite(ad, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  241.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  242. }
  243.  
  244. void v (int D){
  245.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  246.   digitalWrite(ad, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  247.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  248. }
  249.  
  250. void w (int D){
  251.   digitalWrite(ab, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  252.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  253.   digitalWrite(ad, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  254.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  255.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  256. }
  257.  
  258. void x (int D){
  259.   digitalWrite(ab, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  260.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  261.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  262.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  263.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  264. }
  265.  
  266. void y (int D){
  267.   digitalWrite(ab, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  268.   digitalWrite(ac, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  269.   digitalWrite(ad, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  270.   digitalWrite(af, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  271.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  272. }
  273.  
  274. void z (int D){
  275.   digitalWrite(aa, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  276.   digitalWrite(ab, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  277.   digitalWrite(ad, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  278.   digitalWrite(ae, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  279.   digitalWrite(ag, LOW); digitalWrite(D, HIGH); delay(del); digitalWrite(D, LOW);
  280. }
clone this paste RAW Paste Data