Guest User

guile

a guest
Dec 14th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. void G(){
  2. for(int i=0;i<250;i++){
  3. PORTB=B000001;
  4. PORTD=B00000000;
  5. delay(1);
  6. PORTB=B111110;
  7. PORTD=B11011101;
  8. delay(1);
  9. PORTB=B010000;
  10. PORTD=B11110011;
  11. delay(1);
  12. PORTB=B001100;
  13. PORTD=B11110111;
  14. delay(1);
  15. }
  16. }
  17. void U(){
  18. for(int i = 0;i<500;i++) {
  19. PORTB=B010001;
  20. PORTD=B00000000;
  21. delay(1);
  22. PORTB=B001110;
  23. PORTD=B11111100;
  24. delay(1);
  25. }
  26. }
  27.  
  28. void I(){
  29. for(int i = 0;i<500;i++) {
  30. PORTB=B000100;
  31. PORTD=B00000000;
  32. delay(1);
  33. PORTB=B111111;
  34. PORTD=B11011101;
  35. delay(1);
  36.  
  37. }
  38. }
  39.  
  40. void L(){
  41. for(int i = 0;i<500;i++) {
  42. PORTB=B000001;
  43. PORTD=B10000001;
  44. delay(1);
  45. PORTB=B011111;
  46. PORTD=B11111101;
  47. delay(1);
  48. }
  49. }
  50.  
  51. void E(){
  52. for(int i = 0;i<500;i++) {
  53. PORTB=B000001;
  54. PORTD=B10000001;
  55. delay(1);
  56. PORTB=B011111;
  57. PORTD=B11111101;
  58. delay(1);
  59. PORTB=B011111;
  60. PORTD=B11110111;
  61. delay(1);
  62. PORTB=B011111;
  63. PORTD=B11011111;
  64. delay(1);
  65. }
  66. }
  67.  
  68. void prettyColors(){
  69. for(int i=0;i<500;i++)
  70. PORTB=B111111;
  71. PORTD=B00000000;
  72. }
  73.  
  74.  
  75. void setup()
  76. {
  77. for(int i=0;i<13;i++){
  78. pinMode(i, OUTPUT);
  79. }
  80. }
  81.  
  82.  
  83.  
  84. void loop()
  85. {
  86. G();
  87. U();
  88. I();
  89. L();
  90. E();
  91. }
Advertisement
Add Comment
Please, Sign In to add comment