Плата Arduino UNO R3 CH340

Матеріал з Навчання Ардуїно
Перейти до навігації Перейти до пошуку

Arduino Uno R3 CH340

Купити

Вступ

Arduino Uno R3 CH340g - це одна з найпопулярніших та доступних плат мікроконтролера, яку використовують для створення різноманітних електронних проєктів. Ця плата містить багато входів і виходів, що дозволяє контролювати різні пристрої та сенсори. Завдяки великій кількості ресурсів, які є відкритими та доступними для користувачів, Arduino Uno дозволяє легко програмувати мікроконтролер для виконання різноманітних завдань. Arduino Uno є чудовим вибором для початківців, оскільки вона дуже проста у використанні. Крім того, є багато навчальних матеріалів, які допоможуть вам швидко зрозуміти, як користуватися платою Arduino Uno та програмувати мікроконтролер. Якщо ви шукаєте надійну та доступну плату мікроконтролера для своїх проєктів, то Arduino Uno може бути прекрасним варіантом. Вона дозволяє виконувати багато завдань і додатково має велику спільноту користувачів, яка завжди готова надати підтримку і допомогу вам у вашій роботі.

Плата Arduino UNO R3 Ch340

Для початку, давайте більше детально ознайомимось з платою та зрозуміємо що де розташовано та як може бути використано.

Плата Arduino UNO R3 ch340G.jpeg


  • USB: USB-порт використовується для живлення плати від USB-порту комп'ютера, а також для передачі програмного коду з комп'ютера в мікроконтролер Arduino.
  • External Power: It is used to power the board if the USB connector is not used.An AC adapter(9 volts,2.1mm barrel tip,center positive) could be used for providing external power.If there is no power at the power socket,then the Arduino will use power form the USB socket.But it is safe to have power at both the power socket and USB socket.
  • Digital Pins(I/O): The Arduino Uno has 14 digital pins(0 to 13) of which the 6 are PWM(~).This pins can be either inputs or outputs.But we need to mention it in the Arduino sketch(Arduino programming).The PWM(Pulse Width Modulated) pins acts as normal digital pins and also used to control some functions.Say for example,control the dimming of LED and control the direction of servo motor.Both digital inputs and digital outputs can read one of the two values either HIGH or LOW.
  • Analog Pins: The Analog pins(0 to 5) acts as inputs which is used to read the voltage in analog sensors such as temperature sensor,gas sensor,etc.Unlike digital pins which can only read one of the two values(HIGH or LOW),the analog inputs can measure 1024 different voltage levels.
  • ATmega Microcontroller: The Arduino uses ATmega328 microcontroller. It is a single chip microcontroller created by Atmel. This chip works well with Arduino IDE.If damaged,this controller can be easily replaced.The Atmega328 has 32 KB of flash memory for storing code (of which 0,5 KB is used for the bootloader).It has also 2 KB of SRAM and 1 KB of EEPROM.
  • 3.3V Pin: A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
  • 5V Pin: The regulated power supply used to power the microcontroller and other components on the board. This can come either from an on-board regulator, or be supplied by USB or another regulated 5V supply.
  • Reset Button: It is used to reset the microcontroller. Pushing this button will temporarily connect the reset pin to ground and restart any code that is loaded on the Arduino.

Технічні характеристики

  1. Мікроконтролер- ATmega328
  2. Робоча напруга- 5 V
  3. Вхідна напруга (рекомендуємо) - від 5 до 12 V
  4. Цифрові контакти -14 (з яких 6 забезпечують вихід ШІМ)
  5. Analog Input Pins-6
  6. DC Current per I/O Pin-40 mA
  7. DC Current for 3.3V Pin-50 mA
  8. Flash Memory-32 KB (ATmega328) of which 0.5 KB used by boot loader
  9. SRAM-2 KB (ATmega328)
  10. EEPROM-1 KB (ATmega328)
  11. Clock Speed-16 MHz

Програми для програмування плати Arduino

Hardware and Software Required

Arduino IDE

A sketch is the name that Arduino uses for a program.It is the unit of code that is uploaded to and run on an Arduino board to execute the function like blinking a Led. To write a sketch,we need to install the Arduino Software known as Integrated Development Environment(IDE).Check this link for installing Arduino IDE.

Початкова програма "Блимання світлодіода"

Arduino Uno має вбудований світлодіод. Програма, наведена нижче, вмикає та вимикає світлодіод із затримкою в одну секунду. Ви можете знайти цю програму у вбудованих прикладах Arduino IDE. Перш ніж завантажувати ескіз на плату Arduino, переконайтеся, що ви вибрали правильну плату та послідовний порт у меню інструментів.

Файл:Ezgif.com-rotate.gif
Output for the program
 void setup() 
 {
    pinMode(13, OUTPUT);    // ініціалізувати цифровий pin 13 як вихід.
 }
  void loop()               // the loop function runs over and over again forever 
 {
  digitalWrite(13, HIGH);   // увімкніть світлодіод (високий рівень напруги HIGH)
  delay(1000);              // почекати 1 сек.
  digitalWrite(13, LOW);    // вимкнути світлодіод (низький рівень напруги LOW)
  delay(1000);              // почекати 1 сек.
 }

Додаткові посилання