background top icon
background center wave icon
background filled rhombus icon
background two lines icon
background stroke rhombus icon

Download "Arduino Проекты #14 "Матричная клавиатура" Часть I"

input logo icon
Video tags
|

Video tags

ардуино проекты
ардуино умный дом
ардуино уроки
ардуино робот
ардуино уно
ардуино программирование
ардуино для начинающих
ардуино
матричная клавиатура
матричная клавиатура ардуино
arduino uno
arduino проекты
arduino уроки
arduino
подключение ардуино
управление ардуино
arduino ide
arduino датчик
программирование ардуино
кнопка ардуино
светодиод ардуино
дисплей для ардуино
Subtitles
|

Subtitles

subtitles menu arrow
  • ruRussian
Download
00:00:03
issue of the arduino projects program is coming out,
00:00:05
by this time we already have the
00:00:07
first 1000 subscribers on the channel, for which
00:00:10
we can be congratulated, and I also want to
00:00:12
express my gratitude to everyone for
00:00:15
watching our episodes and thereby
00:00:17
learning a lot of new things, but today we
00:00:19
will talk about such a matrix keyboard
00:00:22
and connection to our board, and
00:00:25
we will also look at several interesting circuits
00:00:28
with its participation. I
00:00:29
also recommend that you visit the website of your
00:00:32
hobby.
00:00:33
there you can find interesting articles on
00:00:35
robotics and also buy components
00:00:38
for arduino, including those that
00:00:41
use in their lessons I
00:00:44
will leave a link in the description but we are starting
00:00:53
now in front of us is that same
00:00:55
matrix keyboard, in my case it is a 16-
00:00:59
button keyboard because it has
00:01:01
four lines and 4 columns By the way, you
00:01:04
can make it yourself and for this we
00:01:06
need a printed circuit board like this and
00:01:09
several buttons 12 or 16, but also plus
00:01:13
connecting wires, why is
00:01:16
this module needed? For example, let’s take a regular
00:01:19
button like this, like you know, this is the
00:01:21
simplest
00:01:23
electromechanical device to
00:01:25
connect it to the board we
00:01:28
only need a pull-down resistor
00:01:30
and also 2 contacts 1 contact
00:01:33
power and ground contact then with such a
00:01:37
button you can perform a certain
00:01:39
action, for example we can control the LED with
00:01:42
various drives, engines,
00:01:45
mechanisms and so on, we
00:01:48
need to connect several buttons
00:01:50
then we will have to use more
00:01:52
contacts and more cities
00:01:55
and you can’t do without a breadboard here,
00:01:57
plus you’ll have to
00:01:59
use resistors in larger quantities,
00:02:02
you’ll agree that they don’t provide convenience, that’s why they
00:02:04
came up with
00:02:07
a keyboard like this to simplify connecting a
00:02:11
larger number of buttons,
00:02:12
such devices are found everywhere,
00:02:15
for example in a calculator or
00:02:17
computer keyboard connect such a keyboard,
00:02:20
at least in my case with eight
00:02:23
pins, each of these pins
00:02:26
reads a value from certain rows
00:02:28
and columns,
00:02:29
these pins should be connected to the pins
00:02:32
on the digital panel on our board, I will
00:02:35
connect them to apply to pins from 2
00:02:38
to 9 inclusive 0 1 which is located
00:02:42
here very much and can be used since
00:02:45
they are intended for the uart interface and, for
00:02:47
example, for connecting a bluetooth
00:02:49
module and it would be more rational to leave them
00:02:53
free just in case, but this is what the
00:02:57
simplest diagram using
00:02:58
this module looks like and also for more convenient
00:03:02
work with it it was written there is a special
00:03:04
library called keypad, you can download
00:03:08
it as well as other sketches for this video and
00:03:11
other libraries using the
00:03:13
links in the description, and then
00:03:16
after you have installed the library, you can
00:03:19
go into the game and on the IP and see the
00:03:22
examples that are offered to us
00:03:25
in the example Let's take the simplest
00:03:27
example for reference; this example allows you
00:03:30
to read a value from the keyboard when you
00:03:33
press a certain key and output
00:03:35
this value to a port. In this case, it
00:03:38
will be a port monitor on the computer, that is,
00:03:40
if we press
00:03:43
the number 1 on the keyboard, then ch1 will
00:03:46
appear in the port monitor.
00:03:48
the sketch here is essentially very simple,
00:03:50
the only thing worth noting is the
00:03:53
first lines of code, first we
00:03:56
include our library using the
00:03:58
include function, then we indicate
00:04:01
how many rows and how many columns our
00:04:04
keyboard has, in my case it’s 44,
00:04:07
then we need to correctly position
00:04:09
the name of our keys to make it more convenient to
00:04:12
use keyboard, if you
00:04:16
do this incorrectly, then when you
00:04:19
press ch4,
00:04:22
the number 6 or any other symbol may appear on your port monitor;
00:04:25
in fact, it is better to determine experimentally
00:04:27
experimentally, which is what I did and
00:04:30
thus arranged all the symbols
00:04:33
as they are indicated as they are located on
00:04:37
my keyboard then also needs to
00:04:39
indicate which pins on the board we
00:04:42
connect to control rows and
00:04:44
columns,
00:04:45
that is, these are just our pins from 2
00:04:49
to 9 inclusive,
00:04:51
then we have a mandatory function
00:04:53
called led, in it we indicate the speed of the
00:04:57
serial connection, that is, the
00:05:00
data transfer speed with pact monitor
00:05:02
as 9600 baud or bits per second, in fact,
00:05:07
this function is only needed to supply
00:05:09
power to the module, then we go to
00:05:11
such a mandatory function in this
00:05:15
we prescribe the conditions there, we use the
00:05:18
variable cha, which is used to
00:05:21
store only one character, that is,
00:05:24
one byte
00:05:25
for example, it will be 1 or a or 5, that is,
00:05:30
some specific symbol is
00:05:32
appropriate for our situation and
00:05:34
then we set the conditions, that is, if
00:05:38
pressing it was fixed,
00:05:40
then the symbol is output to the
00:05:43
port monitor, this happens using the function
00:05:46
serial you screw the brackets in this function, you
00:05:49
must indicate which
00:05:51
variable you are outputting to the port, if you
00:05:55
did everything correctly, then in the port monitor we
00:05:57
will get that symbol ready we clicked;
00:06:00
also, do not forget that in the port monitor at the bottom
00:06:03
right you must also indicate the
00:06:06
data transfer rate
00:06:08
that we indicated in the sketch then there is
00:06:11
9600, but let’s say we don’t want to connect
00:06:15
the board to the computer to see this data,
00:06:18
let’s then display it on the display,
00:06:20
I will use for this purpose
00:06:22
the display associated with the Washi modules site,
00:06:25
this also simplifies the connection because
00:06:28
it reduces the number of pins
00:06:30
16 to 4k displays and this module
00:06:35
cannot be viewed in the twelfth issue,
00:06:37
for an ipad with a bus display from bc, you
00:06:41
also need to install a special
00:06:43
library, a link to it will also be in the
00:06:46
description under the video,
00:06:48
so the sketch and we will indicate it to the
00:06:51
include functions. After installing this
00:06:54
library, we can start doing the sketch; we will
00:06:57
also use the previous sketch as a
00:06:59
base one and supplement it with the condition
00:07:02
that we will connect the display,
00:07:04
so here are the sketches, we indicate the library
00:07:07
using the include function, that is, now we
00:07:09
already have two connected libraries,
00:07:12
then we indicate the display size,
00:07:15
my display contains 16 characters in each
00:07:19
of two lines,
00:07:20
I indicate this further with us the following
00:07:23
function will sit here we will
00:07:25
only add that we will supply power to the display and
00:07:29
turn on the backlight for this we have
00:07:31
two functions lcd begin and lcd backlight but
00:07:36
in order to display this data on
00:07:38
the display we must find our function
00:07:40
howls whoop find the conditions there and in Here we can
00:07:44
write out the function sit point, which
00:07:47
serves exactly to display data on
00:07:49
the display.
00:07:50
We can also set the position of
00:07:53
the cursor, that is, from which place on the display we
00:07:57
will display the symbol. For
00:07:59
this, we write 2 numbers in brackets while 1
00:08:04
indicates the number of the symbol of the author, this is the
00:08:06
number lines,
00:08:07
and you also need to remember that here the
00:08:10
countdown starts not from one, but from zero,
00:08:12
that is, here there are lines under us for
00:08:15
the scale 0 and 1, they are 1 and 2, as it may
00:08:20
seem at first, in principle, this is where
00:08:22
the sketch ends, we load it into the
00:08:26
board using usb cable and let's see
00:08:29
what will happen, this is what the circuit looks like, assembled
00:08:32
on the basis of the sketches we wrote,
00:08:35
the only change here is a
00:08:37
naturally connected display, it
00:08:39
is connected with four
00:08:41
outputs, two of them are pins for
00:08:45
connecting barely syntax with and
00:08:48
with the purpose,
00:08:49
they are connected respectively to the
00:08:51
analog output on the board they
00:08:54
are called a4 a5
00:08:56
well, and also two with two jumpers, we have
00:08:59
power and ground connected, now let's
00:09:01
see how it will all work, for
00:09:04
this we will supply power, it is advisable to power the
00:09:07
board from 9 to 12 volts, as we see in the
00:09:11
clock displays there is a backlight,
00:09:13
let's try to type some symbol on
00:09:16
who in the end,
00:09:17
for example, is 9 and as we see it is
00:09:20
displayed, press 8 and
00:09:25
the numbers eight will appear on the display and as we see it
00:09:29
turns out that if you move the symbols
00:09:31
further, then each previous
00:09:34
symbol will be erased and a
00:09:36
new one will appear in its place, as in our case
00:09:39
so if you want to enter symbols,
00:09:42
then you just need to delete the sketches
00:09:45
where we indicated the position of
00:09:48
the cursor and then we can simply run
00:09:51
various symbols on the keyboard and they
00:09:54
will not be erased, but you will get one big
00:09:56
long number, and accordingly, if
00:09:59
you want to stitch our link, then we we
00:10:03
just have to press the
00:10:04
reset button on our fists and then the
00:10:08
line itself is just on the street. Well, the
00:10:10
last scheme for today we will have to
00:10:13
perform a certain action when you
00:10:15
press a certain key on our
00:10:18
keyboard, which is why we actually all
00:10:21
gathered here, but I’ll immediately note that
00:10:24
There will be two issues on this topic at once and
00:10:26
the next one will tell you about more complex
00:10:28
and interesting circuits, and in this issue we
00:10:31
actually get acquainted with our module and
00:10:34
remember the construction of the code from all
00:10:36
uses, so now we’ll try to
00:10:42
turn on or off
00:10:45
the LED when you press a certain key on the keyboard. Naturally,
00:10:47
we will connect the LED to our board, I will
00:10:51
use a breadboard for this, the
00:10:53
LED itself and a 220 ohm resistor can be
00:10:57
used from 150 to 220 ohms if you have
00:11:02
just such a resistor, you also don’t need two
00:11:05
jumpers with which I will close
00:11:07
the circuit by
00:11:08
connecting them to the power pins by the way it
00:11:11
will be powered from the 12 pin to which
00:11:15
the LED is connected and the ground pin is
00:11:18
here, so let’s immediately see this
00:11:22
circuit in action and then we’ll look at the
00:11:24
sketch,
00:11:25
that is, and again I supply power to the
00:11:28
LED, we don’t goget and so I’ll press
00:11:34
key 1
00:11:35
if you’re an idiot it lights up I press at 2 it wo
00:11:39
n’t light up,
00:11:40
basically everything is logical, but now let’s
00:11:43
look at our huge cat as a basis, we
00:11:46
’ll take our very first sketch and just
00:11:49
added it at the beginning, using a very
00:11:52
useful function called define, we
00:11:55
’ll assign a name to the LED connected to pin
00:11:58
12, but let’s call it for example,
00:12:01
lapin functions volt setup we specify
00:12:06
the signal from the LED as an output. By the way,
00:12:09
if we did not use the
00:12:12
keypad library, we would have to write the
00:12:14
same thing for our eight pins with
00:12:17
which our keyboard is connected,
00:12:19
you will agree that this causes inconvenience,
00:12:22
then we have the function howls whoop there
00:12:25
there is a condition and here we
00:12:28
press a certain key when they enter it
00:12:31
to the value of the variable kei, that
00:12:33
is, on whatever symbol we press,
00:12:35
this is all we have the value of the variable kei,
00:12:38
then we must write about the pirates
00:12:41
switch it is required in these diagrams
00:12:44
these sketches of the candles will compare the
00:12:48
values change key and give
00:12:51
certain commands depending on
00:12:53
this value, it consists of two
00:12:56
auxiliary operators, one
00:12:58
is called case from and hand is called
00:13:01
break things saying if the
00:13:03
value of the program unit variable is found
00:13:06
as we have written in the sketch, then the
00:13:10
action will be performed, namely
00:13:12
the LED turns on if
00:13:15
this variable will not be found with this
00:13:17
value, then no action will be
00:13:20
performed, there will be no peak, so break
00:13:23
services just to exit the
00:13:26
case operator, respectively, when we
00:13:29
click on one, we will perform the
00:13:31
maximum voltage supply to our
00:13:33
LED, it will light up, when we click on
00:13:37
2,
00:13:38
it will not light up this will be all we
00:13:40
indicate the functions digital and it die in
00:13:43
brackets the name of the variable is given and
00:13:46
instructions to it accordingly the name of the
00:13:49
variable is here is the pin and the indication can
00:13:53
be the maximum feed or the smallest,
00:13:55
that is, a hack or y, you can
00:14:00
write specific commands for each
00:14:02
button in this way, that is for all 16 buttons and
00:14:04
you can control a large number of
00:14:07
LEDs, even 16 or 30, and
00:14:10
you can generally create one command for
00:14:13
all LEDs at once, or
00:14:15
vice versa to turn off all LEDs,
00:14:17
but by connecting LEDs and other modules, you can
00:14:21
control not an LED, but a light bulb
00:14:25
which will be powered directly from
00:14:27
the network, that is, 220 volts,
00:14:30
this sketch ends here; it is, in
00:14:33
principle, quite simple to understand
00:14:35
and now all that remains is to once again
00:14:38
enjoy this circuit made of cotton wool; I press
00:14:42
one, the LED lights up;
00:14:44
I press two, it stops lighting;
00:14:47
everything is basically logical and quite understandable.
00:14:51
this is the end of our issue, I
00:14:54
hope that you liked it and was
00:14:56
useful for you, but also do not forget that
00:14:59
soon there will be a part of this
00:15:01
issue where we will look at some more
00:15:03
interesting schemes, also do not forget to
00:15:06
like if you liked this
00:15:08
video, do not forget to subscribe on the
00:15:10
channel, also go to our group in
00:15:13
contact, a lot of
00:15:15
interesting news and a lot of useful
00:15:17
information are also published there. Also, don’t forget to go
00:15:19
to your hobby website. I
00:15:22
hope you will also find a lot of interesting things in this
00:15:24
and see you in the next
00:15:27
issue

Description:

Присоединяйтесь к нашему сообществу: https://vk.com/arduino_blog Разработка и скетчи Arduino на заказ: https://vk.com/wiresdesign Что такое матричная клавиатура? Подключение к Ардуино ( Arduino ) и управление ей. Сегодня рассмотрим несколько простых схем с использованием дисплея, светодиодов, понятных даже начинающим, и изучим структуру программного кода я с использованием этой клавиатуры. Скетчи и библиотеки тут: https://yadi.sk/showcaptcha?cc=1&mt=2DCFF94EDE4D9E7061253EB12B7C4B3623BF16712D93BF5FEF03A050A94D103A13DD3BDC235AA3D1E7C395EB0E527B66B0BE582154BF546863330EDCDB8239275B87BC30B7300CF793B4ECE362D16B09EED69FBED1F0A2DFA13BC8F77CFDBECA33A9912698765FA3D61B1715B0A35840564D74FDC692158400060B97FE4F374C3CEFAF654BD9BCAC9D0A56EF331BAC83731738FE7ECACF5D6C7FC1ED4C7C514A1A6B1FA8A8D1CA11E2731E33AE9446563CE9E4C6A8C739234701F71067B52AFAC76558D6CDEC971013E7BCB60769EA944F9E5C8B8C3F88B2CD471493&retpath=aHR0cHM6Ly95YWRpLnNrL2Qvall3ZHdTM1UzRVo3Ykc__8d72c3690271108c6425effc42d31c93&t=2/1717344351/feb0d930e377c28352e27edfb8239261&u=8ad9a484-c7f1b717-3ec77045-c54f9406&s=ed31fe2633b4f0d17b8defdc5d3c4d78 Смотреть вторую часть тут: https://www.youtube.com/watch?v=AIL0A5hgEy8 Статья, дублирующая видео: https://edurobots.org/2017/03/arduino-keypad/ По всем вопросам и предложениям: https://vk.com/don_arturos Подписывайтесь на наши социальные сети: Facebook — https://www.facebook.com/unsupportedbrowser Telegram — https://telegram.org/ VK — https://vk.com/arduino_blog

Preparing download options

popular icon
Popular
hd icon
HD video
audio icon
Only sound
total icon
All
* — If the video is playing in a new tab, go to it, then right-click on the video and select "Save video as..."
** — Link intended for online playback in specialized players

Questions about downloading video

mobile menu iconHow can I download "Arduino Проекты #14 "Матричная клавиатура" Часть I" video?mobile menu icon

  • http://unidownloader.com/ website is the best way to download a video or a separate audio track if you want to do without installing programs and extensions.

  • The UDL Helper extension is a convenient button that is seamlessly integrated into YouTube, Instagram and OK.ru sites for fast content download.

  • UDL Client program (for Windows) is the most powerful solution that supports more than 900 websites, social networks and video hosting sites, as well as any video quality that is available in the source.

  • UDL Lite is a really convenient way to access a website from your mobile device. With its help, you can easily download videos directly to your smartphone.

mobile menu iconWhich format of "Arduino Проекты #14 "Матричная клавиатура" Часть I" video should I choose?mobile menu icon

  • The best quality formats are FullHD (1080p), 2K (1440p), 4K (2160p) and 8K (4320p). The higher the resolution of your screen, the higher the video quality should be. However, there are other factors to consider: download speed, amount of free space, and device performance during playback.

mobile menu iconWhy does my computer freeze when loading a "Arduino Проекты #14 "Матричная клавиатура" Часть I" video?mobile menu icon

  • The browser/computer should not freeze completely! If this happens, please report it with a link to the video. Sometimes videos cannot be downloaded directly in a suitable format, so we have added the ability to convert the file to the desired format. In some cases, this process may actively use computer resources.

mobile menu iconHow can I download "Arduino Проекты #14 "Матричная клавиатура" Часть I" video to my phone?mobile menu icon

  • You can download a video to your smartphone using the website or the PWA application UDL Lite. It is also possible to send a download link via QR code using the UDL Helper extension.

mobile menu iconHow can I download an audio track (music) to MP3 "Arduino Проекты #14 "Матричная клавиатура" Часть I"?mobile menu icon

  • The most convenient way is to use the UDL Client program, which supports converting video to MP3 format. In some cases, MP3 can also be downloaded through the UDL Helper extension.

mobile menu iconHow can I save a frame from a video "Arduino Проекты #14 "Матричная клавиатура" Часть I"?mobile menu icon

  • This feature is available in the UDL Helper extension. Make sure that "Show the video snapshot button" is checked in the settings. A camera icon should appear in the lower right corner of the player to the left of the "Settings" icon. When you click on it, the current frame from the video will be saved to your computer in JPEG format.

mobile menu iconWhat's the price of all this stuff?mobile menu icon

  • It costs nothing. Our services are absolutely free for all users. There are no PRO subscriptions, no restrictions on the number or maximum length of downloaded videos.