QC

Hiển thị Led 7 đoạn Arduino

 HIỂN THỊ LED 7 ĐOẠN ARDUINO


CODE CHƯƠNG TRÌNH:

  1. /*
  2. Display 0 to 9 Numbers on 7Segment Display.
  3. */
  4. // give it a name:
  5. int a = 2;
  6. int b = 3;
  7. int c = 4;
  8. int d = 5;
  9. int e = 6;
  10. int f = 7;
  11. int g = 8;
  12. // the setup routine runs once when you press reset:
  13. void setup() {
  14. // initialize the digital pin as an output.
  15. pinMode(a, OUTPUT);
  16. pinMode(b, OUTPUT);
  17. pinMode(c, OUTPUT);
  18. pinMode(d, OUTPUT);
  19. pinMode(e, OUTPUT);
  20. pinMode(f, OUTPUT);
  21. pinMode(g, OUTPUT);
  22. }
  23. // the loop routine runs over and over again forever:
  24. void loop() {
  25. //Disply 0
  26. digitalWrite(a, HIGH);
  27. digitalWrite(b, HIGH);
  28. digitalWrite(c, HIGH);
  29. digitalWrite(d, HIGH);
  30. digitalWrite(e, HIGH);
  31. digitalWrite(f, HIGH);
  32. digitalWrite(g, LOW);
  33. delay(500);
  34. //Disply 1
  35. digitalWrite(a, LOW);
  36. digitalWrite(b, HIGH);
  37. digitalWrite(c, HIGH);
  38. digitalWrite(d, LOW);
  39. digitalWrite(e, LOW);
  40. digitalWrite(f, LOW);
  41. digitalWrite(g, LOW);
  42. delay(500);
  43. //Disply 2
  44. digitalWrite(a, HIGH);
  45. digitalWrite(b, HIGH);
  46. digitalWrite(c, LOW);
  47. digitalWrite(d, HIGH);
  48. digitalWrite(e, HIGH);
  49. digitalWrite(f, LOW);
  50. digitalWrite(g, HIGH);
  51. delay(500);
  52. //Disply 3
  53. digitalWrite(a, HIGH);
  54. digitalWrite(b, HIGH);
  55. digitalWrite(c, HIGH);
  56. digitalWrite(d, HIGH);
  57. digitalWrite(e, LOW);
  58. digitalWrite(f, LOW);
  59. digitalWrite(g, HIGH);
  60. delay(500);
  61. //Disply 4
  62. digitalWrite(a, LOW);
  63. digitalWrite(b, HIGH);
  64. digitalWrite(c, HIGH);
  65. digitalWrite(d, LOW);
  66. digitalWrite(e, LOW);
  67. digitalWrite(f, HIGH);
  68. digitalWrite(g, HIGH);
  69. delay(500);
  70. //Disply 5
  71.  
  72. digitalWrite(a, HIGH);
  73. digitalWrite(b, LOW);
  74. digitalWrite(c, HIGH);
  75. digitalWrite(d, HIGH);
  76. digitalWrite(e, LOW);
  77. digitalWrite(f, HIGH);
  78. digitalWrite(g, HIGH);
  79. delay(500);
  80. //Disply 6
  81. digitalWrite(a, HIGH);
  82. digitalWrite(b, LOW);
  83. digitalWrite(c, HIGH);
  84. digitalWrite(d, HIGH);
  85. digitalWrite(e, HIGH);
  86. digitalWrite(f, HIGH);
  87. digitalWrite(g, HIGH);
  88. delay(500);
  89. //Disply 7
  90. digitalWrite(a, HIGH);
  91. digitalWrite(b, HIGH);
  92. digitalWrite(c, HIGH);
  93. digitalWrite(d, LOW);
  94. digitalWrite(e, LOW);
  95. digitalWrite(f, LOW);
  96. digitalWrite(g, LOW);
  97. delay(500);
  98. //Disply 8
  99. digitalWrite(a, HIGH);
  100. digitalWrite(b, HIGH);
  101. digitalWrite(c, HIGH);
  102. digitalWrite(d, HIGH);
  103. digitalWrite(e, HIGH);
  104. digitalWrite(f, HIGH);
  105. digitalWrite(g, HIGH);
  106. delay(500);
  107. //Disply 9
  108. digitalWrite(a, HIGH);
  109. digitalWrite(b, HIGH);
  110. digitalWrite(c, HIGH);
  111. digitalWrite(d, HIGH);
  112. digitalWrite(e, LOW);
  113. digitalWrite(f, HIGH);
  114. digitalWrite(g, HIGH);
  115. delay(500);
  116. }




Error No module Onnx opencv

 Error No module Onnx opencv Lệnh :  pip install onnx==1.9 Mã lỗi PS F:\opencv_e\2.video> & C:/Users/youtb/Anaconda3/envs/virtualenv/...