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

Download "Программирование МК STM32. УРОК 42. Подключаем акселерометр LSM6DS0. Часть 2"

input logo icon
"videoThumbnail Программирование МК STM32. УРОК 42. Подключаем акселерометр LSM6DS0. Часть 2
Table of contents
|

Table of contents

0:00
Введение
1:18
Продолжим писать функцию инициализации
18:26
Проверим инициализацию на настоящем акселерометре
19:05
Напишем функцию считывания данных
23:43
Проверим считанные данные монитором порта
26:22
Исправим функцию отображения считанных данных
27:41
Проверим считывание данных визуально с помощью программы NS Port Monitor
Video tags
|

Video tags

HAL
HAL stm32
STM32F4DISCOVERY
STM32F4DISCOVERY stm32
LSM6DS0
акселерометр
MEMS
Микроконтроллеры STM32
32 CUBE MX
STM32F4
МК STM32
keil
Hardware abstraction layer
Программирование
STM32 System Workbench
Программирование МК
Программирование STM32
STM32 Cube MX
Программирование СИ
Программирование микроконтроллеров
Микроэлектромеханические системы
Subtitles
|

Subtitles

subtitles menu arrow
  • ruRussian
Download
00:00:02
Hello everyone, dear friends, today we
00:00:05
continue with you a series of lessons on
00:00:07
programming stm32 microcontrollers,
00:00:09
today we have lesson 42 part 2
00:00:12
connected accelerometer lsm 6d with 0
00:00:16
which is installed on our
00:00:19
expansion board but with glue or on the evaluation
00:00:22
board in the last lesson we have already
00:00:26
connected this the board has already been connected to the
00:00:29
expansion board, the debugging board has already
00:00:33
contacted you, we have already contacted our sensor, read
00:00:40
the identifiers from it, they matched and started writing the
00:00:42
initialization function; we also added a
00:00:45
macro substitution header file for the future,
00:00:48
which is
00:00:51
also part of our
00:00:54
own hand-written library, in general, as
00:00:58
well we learned that the sensor data is not
00:01:00
only an oxymiron accelerometer but also a
00:01:02
gyroscope, well, since today we are working
00:01:05
with it exactly as an accelerometer, we
00:01:08
will not write the words gyroscope here so as
00:01:10
not to be misleading,
00:01:12
so that later in the future
00:01:14
we can work with it as a gyroscope,
00:01:18
then we will return to the
00:01:20
project
00:01:22
here you and I have added all the
00:01:26
macro substitutions, here we
00:01:30
have added a variable for now, but we’ll try to
00:01:33
collect them, of course, we have four
00:01:36
warnings there for now we wo
00:01:39
n’t pay much attention to them, well, let
00:01:43
’s try to write something here, in
00:01:46
general we will also I’ll write comments
00:01:50
about the mysterious species, I’ll
00:01:54
explain a little later who it is and what you
00:01:57
need to eat it with,
00:01:59
if you need to eat it at all,
00:02:05
but at first it will be hard to
00:02:08
write the first functions, then we
00:02:11
’ll basically copy the entire address here, it hasn’t
00:02:14
changed with you the address is always one
00:02:18
somewhere we have already used it here, and we
00:02:23
will continue to use it, we will continue to use it,
00:02:27
great, this is the
00:02:30
address
00:02:33
for the register, we will turn to the
00:02:38
eighth one, this one, which
00:02:42
has the meaning of its address 22, you can
00:02:47
call this an address in general, of course it
00:02:51
can maybe it’s not an address,
00:02:54
maybe this also has some meaning,
00:02:57
nevertheless, we turned to him, well,
00:03:01
why did we turn to him, let’s
00:03:04
look here, here he is, here,
00:03:08
some
00:03:09
general software Lisette, well, somehow these
00:03:11
sensors work well without software reboots, like
00:03:14
this concrete but
00:03:18
today we want p' I will work, in
00:03:20
general, I think I already explained it once,
00:03:22
maybe I didn’t explain it, that is, well, I’ll
00:03:25
explain it again so that I can give this block the date to give it away,
00:03:28
but it doesn’t allow me to update them in general, it does
00:03:32
n’t allow me to read it, it doesn’t allow me to update it at
00:03:36
that moment when the low byte is read,
00:03:39
because it’s all in separate
00:03:42
registers, there’s data in everything,
00:03:46
so we’ll turn on the bit in general,
00:03:50
today we’ll turn on the bit a little differently, so
00:03:53
we’ll read the
00:03:56
registers first, that is, we have to write
00:04:00
to the bit registers
00:04:03
in such a way as not to disturb the
00:04:05
structure of the
00:04:06
remaining bits, so we will not
00:04:09
immediately push the data into the
00:04:13
registry in a heap, we will somehow change one by two
00:04:15
by three only in the necessary bits with you,
00:04:18
which means we will take a mask year mask
00:04:23
this is what
00:04:25
we have here only the third one we have a bit,
00:04:28
that is, not the last 3, the penultimate
00:04:31
bit, we have 7 turned on,
00:04:35
but so that we can do it
00:04:39
right, so that it is on this particular bit,
00:04:43
so that we can just leave it there and here,
00:04:47
we add this little tilde with
00:04:50
you, that is, this is how we reset it with
00:04:54
you It’s this bit that
00:04:58
we don’t touch the rest of, that is, we
00:05:01
will already have it at 0 anyway, and then we
00:05:04
either install it or don’t install it; that’s
00:05:06
our question, that is, further, but
00:05:10
it will be like just a little bit of metal
00:05:12
through the reverse operation
00:05:13
that is, through this we won’t have a
00:05:16
tilde, not some kind,
00:05:18
and here we
00:05:21
turn it on, that is, again we are now like a
00:05:25
mask, a mask, and an inclusion, we
00:05:28
get the same number, but only
00:05:31
here it’s a little different happens, but
00:05:33
why are there different names, that for
00:05:36
convenience, it is reading our code
00:05:41
ourselves later, that is, we
00:05:45
see perfectly well that we turned it on with
00:05:47
you, that is, we installed it, we don’t
00:05:50
know what it was before, maybe
00:05:51
it was already zero, that is here we
00:05:54
made it so that it was definitely a
00:05:57
zero, that is, it is 0 or a one, here we
00:06:00
definitely already turn it on, that is, in this
00:06:03
case we could easily
00:06:05
do without masking without it, but suddenly
00:06:07
marzo we want to correct the code and
00:06:09
turn it off, then we we’ll forget
00:06:13
to add this line and we wo
00:06:16
n’t turn it off, so if it’s
00:06:19
already turned on because the operation or it doesn’t
00:06:23
know how to turn it off, it only
00:06:25
knows how to turn it on, it can turn it off, this
00:06:27
operation can be like this, now we’re all
00:06:30
left with only us
00:06:32
put everything back in place
00:06:36
for this, we have a function of an
00:06:40
inverse type like this, that is, this
00:06:44
function of an inverse type
00:06:47
will bring in the value of ours, well, let's
00:06:51
copy approximately, then we will have the same thing
00:06:54
inside the function, but this is again
00:06:58
very
00:07:00
approximately here because what
00:07:04
needs to be
00:07:05
added like this, that is, that we are with
00:07:09
you,
00:07:10
this is the value that you and I
00:07:13
lived in the process of these 3
00:07:15
operations and added,
00:07:19
well, in general, for now, here’s everything with
00:07:24
this register,
00:07:27
further on, another register
00:07:32
will be next with us,
00:07:34
for now, let's put our sensor
00:07:38
into a low-power mode,
00:07:44
we are our battle, the doctor who is responsible for our
00:07:50
speed, we
00:07:52
will perform until all are zeros, this is
00:07:55
how we will do this with you, that is,
00:07:59
we can calmly now
00:08:01
copy all this and just change the values, that
00:08:04
is, the resistor we will now have a
00:08:06
slightly different register we will have 6
00:08:09
now we will take it with you,
00:08:13
here we have a register at the 20 mm address
00:08:16
that is located and
00:08:21
we read them for now here, that is,
00:08:25
let's see who this
00:08:27
register is we have here this register
00:08:31
has several bits, for us at the
00:08:33
moment these bits are interesting, that is, this is
00:08:36
how their value depends, the
00:08:39
return of their values ​​depends on the speed or
00:08:42
even the inclusion of our sensor, that is, this
00:08:45
form is not set to 10 and the heart
00:08:48
will be that is
00:08:51
It will poll its axis 10 times a second, but everything at once,
00:08:54
of course, but this one, which we
00:08:57
will now be with zeros, it will simply
00:08:59
turn it off altogether or put it into a low-power mode, which is why
00:09:03
you and I first again
00:09:07
use a mask, that is, we are all with you Let’s
00:09:11
first turn off all three of these bits, that
00:09:14
is, well, we have the letters e, I think we know
00:09:17
what it is 1110, that is, we have them
00:09:21
because in the register the very first one is
00:09:24
1110, well, and here the hole is 0, and that is,
00:09:29
we’ll just turn it off, let’s go, don’t touch it
00:09:32
this is for those who don’t know what this
00:09:36
masking operation is,
00:09:39
we all turn them off, now you and I will continue
00:09:42
to use the bit with
00:09:47
which we turn something on,
00:09:51
take the power down here, which is from
00:09:55
scratch, and that is, we don’t do anything again, we turn it on
00:09:57
here, on the contrary, it doesn’t make sense for us
00:10:03
to program this line, that is, if
00:10:05
we comment out the same thing, we
00:10:07
have already disabled them, but if suddenly we decide to
00:10:11
do something else with you, again,
00:10:15
anyway, it will again need to be
00:10:16
uncommented about then we’ll just
00:10:18
add some value here with you,
00:10:19
that is, we will carry this technique
00:10:21
to the end everywhere, it depends on whether
00:10:23
you and I will put a bit of
00:10:26
zero or one, that is, it doesn’t matter, and in the
00:10:29
same register we will do everything again We
00:10:33
're bringing in something strange with you, I
00:10:37
got it
00:10:39
why 6 I'm
00:10:41
he 6 and why here I have 6 right there
00:10:46
8 why did I get 6 you're here 8 all 6
00:10:52
this is the sensor 6 and
00:10:54
here's everything
00:10:56
6 here 6 6 here are the registers 6 what am I - I’m completely
00:11:00
confused, well, everything seems so
00:11:04
simple, let’s try to assemble it, it won’t come together
00:11:07
here,
00:11:10
we’ll write the next comment so far, everything seems simple, but I think
00:11:13
further there it won’t be more difficult, we’ll write a scale file
00:11:23
selection
00:11:27
2 j but 2g is of course not gprs,
00:11:33
which can also be 3g and 4g and this is exactly
00:11:37
how much acceleration of free fall we have,
00:11:42
our sensor measures the maximum in this mode, that is,
00:11:45
well,
00:11:46
in many there is already an accelerometer, ah, this whole
00:11:51
thing happens if we
00:11:54
set the measurement to the minimum, that is, the
00:11:56
minimum measurement amplitudes, then
00:11:59
again we have zeros, that’s all these
00:12:04
bits here are responsible for this matter here
00:12:08
fs1 fs 0 that is, with a value of 0 and
00:12:12
they put 2 g01 16-10 4g and 11 8g in
00:12:20
general like this, but we will now take it
00:12:24
since we have already seen that they are also in
00:12:26
sixth registers for us to write minimally here
00:12:28
Scott will come, let’s take their
00:12:32
mask, it’s very convenient with a mask, I also
00:12:35
envied it in the example, I liked it, for
00:12:39
example, the
00:12:41
engineers came up with a very good idea,
00:12:44
well, let’s take the zero ones like this, now I
00:12:48
won’t explain anything, everything is already
00:12:51
extremely clear here, that is
00:12:54
with this we have done practically nothing to you
00:12:56
because we have all these and
00:12:59
so by default these are enabled, or
00:13:02
rather by default the
00:13:05
bits that we do not enable are disabled, but you
00:13:08
never know before that we did something else with you again we
00:13:10
will initialize
00:13:13
again, then we will at least reset them,
00:13:16
well, now the following comments about
00:13:20
seven will also include everything with you, let's
00:13:25
take it like this for now because
00:13:27
our axes are generally in the fifth register,
00:13:33
here in the
00:13:35
5th register, of course we'll
00:13:38
see now, we'll probably have it this
00:13:41
is the 1F address he has, so we will turn on
00:13:45
these bits for
00:13:50
this y and x, and that is, we will measure
00:13:53
all of them, I don’t know what it does, we
00:13:57
won’t use this
00:13:59
switch here with you. Well, here’s what
00:14:03
we can do here, in general,
00:14:06
here we are working with
00:14:10
several strokes at once, we
00:14:13
’ll take
00:14:17
this one for now, but not only with a stroke,
00:14:22
now you’ll see like
00:14:25
this, we take
00:14:29
a bracket, we use this,
00:14:33
we do this,
00:14:37
we do this, and we do this again but
00:14:41
since this line is too long, I doesn’t
00:14:43
look very nice, we’ll
00:14:48
do it like this, it will still be
00:14:50
a little prettier, but everywhere
00:14:54
here, of course, it’s not x and
00:14:56
here we have the
00:14:58
next one y and
00:15:02
this with this, that is, we are all these bits you and I
00:15:07
will reset us for some reason, but here I
00:15:11
erased x and to the salty ride excel remains, that
00:15:15
is, the same here, you and I will
00:15:22
logically add
00:15:24
several values ​​​​of
00:15:27
several bits and
00:15:29
do it on my computer, that is, here we are 4 no
00:15:35
3 4 5 bits and we also turn it on
00:15:41
while we write like this,
00:15:45
only here there will be z
00:15:48
here there will be
00:15:50
such a dash here there will be
00:15:53
y
00:15:55
also the dash
00:15:58
is nothing more than a transfer we have tracks with
00:16:02
you
00:16:05
this can be done
00:16:08
it works quite well and that’s probably all and
00:16:12
we enter the value in register
00:16:15
now you and I, after
00:16:18
all, let's
00:16:21
probably turn on our accelerometer,
00:16:25
it turns on
00:16:27
in the following way, it
00:16:30
turns on by installing
00:16:34
batteries, then the
00:16:37
frequencies are collecting data or reading
00:16:41
data,
00:16:42
well, let's turn on 119 hertz with you and
00:16:50
take com and from here we are here, we
00:16:55
turned it all off here, let's turn it on
00:16:58
this is the same thing here we have
00:17:01
right no this is not that I won’t but the
00:17:04
next one
00:17:07
here we worked with up to the container and this
00:17:10
with you
00:17:14
with a blow and we will find here in the
00:17:19
macros
00:17:20
119 here we have 60 60 and here we have
00:17:24
5 6 bits and
00:17:34
the mask is turned on, everything remains here we do
00:17:38
119 we all basically
00:17:43
carried out the initialization now we mean
00:17:47
here what we can do with you
00:17:50
we can probably do with you
00:17:55
here turn on the
00:17:56
LED
00:17:59
no turn off
00:18:03
turn off better because we are not anywhere
00:18:06
we check for an error and here we
00:18:08
turn it on, that is, that we don’t have
00:18:11
anything frozen anywhere with you, we thereby
00:18:14
find out, well, initialization is already
00:18:19
turned on in May, not that is, called, that is, we have
00:18:23
nothing to call, we don’t need to, we
00:18:26
only have with you compile the code,
00:18:29
flash the controller and see
00:18:32
the result,
00:18:33
now our LED is lit, you can
00:18:37
turn everything off again, everything is fine, we’ll
00:18:40
continue writing the code, we still have time,
00:18:43
we may
00:18:45
display something today, we may not even display it, but
00:18:48
we wanted to read, we’ll try, or we can
00:18:52
write a reading function you and I already
00:18:54
have
00:18:56
practically,
00:18:59
well, not that we exist, but at least there is a blank, so we’ll
00:19:04
continue to write
00:19:08
axor here, it’s not that complicated
00:19:12
read,
00:19:15
we have this address that doesn’t change with you, we
00:19:24
read the register,
00:19:28
but we’ll probably start with the first one
00:19:32
here is the low byte of the
00:19:36
x-axis register, we will read it,
00:19:44
but accordingly we will not just read it,
00:19:48
we will count it into the buffer,
00:19:53
its 0
00:19:56
cell 0 byte,
00:19:59
well then, as always, we
00:20:02
will do it like this and just
00:20:05
send the
00:20:10
entire value to our buffer,
00:20:14
let’s still take a look you and I, what
00:20:17
kind of registers are these from 28 to 2d? Let’s
00:20:21
make sure that on the body we read the registers and
00:20:24
this knowing that you are those registers and
00:20:28
someone maybe doesn’t believe him,
00:20:33
here they are, we have an output, we have an X output, an
00:20:38
output z from 22 up to 22 by 28 by 29
00:20:43
that is, this is a 16-bit value along the axes,
00:20:48
here we are now and we are reading them with you,
00:20:51
we have all read them, we will not multiply by
00:20:55
sensitivity as in the last lesson
00:20:57
we were shown there is no point in bothering with this,
00:21:01
well, in
00:21:03
this one the buffer is already such a 16-bit one,
00:21:08
it was entered by the company with you
00:21:11
alternately according to the cycle, all these our
00:21:15
values ​​are
00:21:23
not so I wanted
00:21:27
well, since we have these values ​​with you,
00:21:32
signed Tony uint just int
00:21:38
here
00:21:41
you are already this 16 we convert anyway on
00:21:44
yours first like
00:21:46
this order otherwise you and I risk
00:21:50
losing something
00:21:51
buffer
00:21:55
here 2 multiplied by
00:21:59
5 plus 1 close this
00:22:05
we shift by
00:22:07
8
00:22:10
closed the bracket and
00:22:13
plus
00:22:15
almost the same thing not shifted but
00:22:20
not added by one everything in general
00:22:24
here we have
00:22:25
all of us we considered this
00:22:29
function here with you, we
00:22:31
called
00:22:33
all the variables for now and
00:22:39
we’ll try to display it
00:22:42
here, we don’t touch anything here, as
00:22:45
we remember, we use Dima, today we’ll
00:22:48
just add houses and remove the
00:22:51
timings in the houses of timings and since it doesn’t
00:22:55
happen, this is all of us For now, let
00:22:58
's comment it out, of course, and
00:23:00
we won't forget to do it in an infinite loop, we'll
00:23:04
call
00:23:09
this function here, we'll
00:23:12
copy it, we have
00:23:15
a prototype for it, as we know, we have a
00:23:18
prototype of the court, it doesn't matter if we move it a little bit, then
00:23:20
we'll correct it
00:23:23
because now I don't want to
00:23:25
spoil it for me the clipboard in which
00:23:27
the functions are located
00:23:29
here and here without any delay we
00:23:32
also select the delay on stands here with
00:23:35
you well, according to my calculations here 10 is a lot we
00:23:40
will put 20
00:23:42
all of us at once with you and the LED we will check
00:23:46
them here we will check the whole economy
00:23:48
let's
00:23:50
collect the code but this is probably an hour for us,
00:23:53
or z is not used or something else
00:23:55
like that, so let’s see the tempo 16 we don’t need it, which
00:23:58
means in general we
00:24:00
haven’t used this variable for a long time, let’s
00:24:04
flash the controller and see
00:24:07
what’s going on with us for some reason,
00:24:15
the LED is constantly blinking, it shouldn’t
00:24:19
blink, it should be on sometime, sometime it shouldn’t be on,
00:24:22
something is wrong with it, it’s
00:24:28
not blinking like that,
00:24:31
well, nevertheless, we will now launch the
00:24:34
Art Yanovskaya program with you
00:24:36
which we use as an
00:24:41
arduino knightley terminal
00:24:44
there we have a
00:24:47
virtual com port, strange something is
00:24:51
wrong, probably
00:24:52
com 6, let the port monitor, but it’s here
00:24:57
because we need to
00:24:59
run it like this and we have
00:25:03
axes jumping here for some reason, they’re dancing now
00:25:07
Let's figure it out, I'll figure it out and come back in
00:25:11
general, the axes are jumping here just
00:25:13
for one simple reason, everywhere
00:25:17
we have the least significant bit is read, sometimes
00:25:21
it is necessary to read the most significant bit, we, that is,
00:25:23
repeated the operation of the axis to change and the bytes
00:25:27
older than the lower are not assigned, most likely
00:25:29
just just let's let's see,
00:25:33
we have a stream that lights up, that is,
00:25:37
just here we light up like this, that
00:25:40
is, well, it's better that we don't look at
00:25:42
the LED here, it's necessary to connect the anti-matrix
00:25:45
externally, and
00:25:48
of course we'll look at it normally,
00:25:55
so we start the port monitor, we have X's count
00:25:58
tend to zero since
00:26:01
we have a board on the plane, we will
00:26:03
turn it the other way around, z will become
00:26:06
negative,
00:26:07
so if we
00:26:09
turn it back to positive, we
00:26:12
will put a negative y, so we will
00:26:15
put a positive y,
00:26:19
that is, it all works, well, let’s do it
00:26:22
a little and in two parts we
00:26:24
completely dealt with you, which is very
00:26:26
surprising, of course we are growing, which means this is
00:26:29
generally very wonderful, then let us
00:26:32
now try to
00:26:36
display a normal visualization, that
00:26:39
is, through my program, but for this
00:26:42
we will need to not just write
00:26:46
the code here, but that goes without saying
00:26:53
this is necessary, but since I generally have the
00:26:58
following requirements in my program, here
00:27:01
we must put with you 11 here 55
00:27:07
well, let everything remain
00:27:13
that we don’t need 7 end ones here 8,
00:27:20
respectively, the axes are slightly different y
00:27:24
here here z and of course here too y
00:27:30
of course
00:27:32
here 2 there is
00:27:36
no Taimanov here,
00:27:39
let’s put it together for now and close the project with you, it’s
00:27:44
just that my normal program ran
00:27:47
at 512 and here for some reason I do
00:27:52
n’t even know why
00:27:53
512 thousand are just my own programs, I
00:27:57
mean any frequency, but in arduino 512 If I weren’t, I
00:28:00
would have stayed at 512, but there is a
00:28:02
maximum of 6 and we don’t change anything anymore.
00:28:05
Now we’ll regenerate the project,
00:28:07
rebuild it with firmware, run my monitor, here’s mine, we’ll
00:28:12
find mine for now, while
00:28:17
everything is assembled here, but the cais sources are in
00:28:20
one folder, here we have
00:28:25
it my people stream port monitor, that
00:28:29
is, we have a
00:28:30
project assembled now, let’s flash
00:28:35
this project for us,
00:28:39
the LED has not stopped working, everything works fine here,
00:28:41
that is, we can
00:28:43
safely run this program with
00:28:47
you here com 6 as we saw here, so
00:28:52
I added various Well, I’ll tell you the program
00:28:54
there, of course, I’m not your wife about this 512,
00:28:58
we press start and for
00:29:01
some reason we don’t see anything with you,
00:29:04
why I don’t know,
00:29:06
apparently something is not quite right here,
00:29:10
but there
00:29:11
seem to be no errors, it
00:29:14
starts up and drowns right now it’s normal for a
00:29:16
new one to start,
00:29:21
maybe something with the program, maybe something
00:29:23
with the emulation, in fact, everything
00:29:26
is displayed here, the z axis is red
00:29:29
at the top, here it is, here we reject the scarf,
00:29:34
turned the red one down, like
00:29:37
this, put it on the yellow bottom, like this,
00:29:41
blue at the top that is, you will play in general,
00:29:44
if of course you have such a board, well,
00:29:48
at least study it, and while the cat about the board
00:29:52
does not matter what the most important principle of
00:29:55
writing code and working with sensors is, I
00:29:58
think we achieved our goal in this
00:30:03
lesson, congratulations to everyone
00:30:06
that we wrote such the code actually
00:30:10
curbed such a sensor, subscribe to the
00:30:13
channel who hasn’t done this yet in order to
00:30:16
know when the next time
00:30:19
my next video comes out who liked
00:30:22
this lesson
00:30:23
press the button I like in the form of a
00:30:27
thumb which is located on
00:30:30
the right reasons for the video write comments
00:30:32
here in YouTube write also comments
00:30:36
questions discuss in groups on
00:30:39
social media all links are given on the forum
00:30:43
everyone wish you
00:30:45
good health

Description:

Продолжаем работать с библиотекой HAL. Сегодня мы продолжаем работать с акселерометром LSM6DS0, который установлен на плате расширения X-NUCLEO-IKS01A1, предназначенной для работы с отладочной платой Nucleo, с которой мы уже познакомились немного раньше. В данной части занятия мы продолжим писать функцию инициализации датчика, затем напишем функцию считывания данных, и, более того, мы в данной части закончим работу с данным акселерометром. Мы увидим показания и в текстовом виде и визуально с помощью программы NS Port Monitor. Отладочную плату Nucleo STM32F401RE можно приобрести здесь: http://ali.pub/1u80dx и здесь http://ali.pub/1u80gn Оценочную плату X-NUCLEO-IKS01A1 можно приобрести здесь http://ali.pub/1us417 Навигация по видео: 00:00 Введение 01:18 Продолжим писать функцию инициализации 18:26 Проверим инициализацию на настоящем акселерометре 19:05 Напишем функцию считывания данных 23:43 Проверим считанные данные монитором порта 26:22 Исправим функцию отображения считанных данных 27:41 Проверим считывание данных визуально с помощью программы NS Port Monitor Текстовая часть урока, исходный код, документация на акселерометр, на плату расширения, ссылка на программу NS Port Monitor здесь https://narodstream.ru/stm-urok-42-podklyuchaem-akselerometr-lsm6ds0-chast-2/ Рекомендуется также перед просмотром данного урока просмотреть данное видео: УРОК 41. Подключаем акселерометр LIS3DSH. Часть 1 https://www.youtube.com/watch?v=KWXJCJk-JV4 УРОК 41. Подключаем акселерометр LIS3DSH. Часть 2 https://www.youtube.com/watch?v=qrnTbYd6Gy0 УРОК 41. Подключаем акселерометр LIS3DSH. Часть 3 https://www.youtube.com/watch?v=CztrtMEIqNY УРОК 41. Подключаем акселерометр LIS3DSH. Часть 4 https://www.youtube.com/watch?v=_XJmKjqAQH8 УРОК 42. Подключаем акселерометр LSM6DS0. Часть 1 https://www.youtube.com/watch?v=jMKXOjJwOs4 УРОК 38. Знакомство с платой NUCLEO STM32F401RE и оценочными платами https://www.youtube.com/watch?v=L-ta_BhW6CU Группа в контакте http://vk.com/club116656325 Группа в Одноклассниках http://ok.ru/group/52987126153436 Группа в Facebook https://www.facebook.com/unsupportedbrowser Мой сайт "Программирование МК" https://narodstream.ru/ Форум https://narodstream.ru/forum/ Вы можете помочь проекту: ЮMoney https://yoomoney.ru/to/41001176473465 Webmoney Z341906933112 Карта Сбербанка (МИР) 2202201799288929 Можно в USDT 1) Сеть:TRC20 Адрес: TBBPFk5Widf1CYvF7Xk5ssKXeiPJHwtMgS 2) Сеть: BSC BNB Smart Chain (BEP20) (комиссия намного меньше) Адрес: 0x2e38754DF1e54649Bf0D5CD6fD6D8c96a9f22f17 3) Сеть: Huobi ECO Chain (HECO) (комиссия еще меньше) Адрес: 0x2e38754DF1e54649Bf0D5CD6fD6D8c96a9f22f17

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 "Программирование МК STM32. УРОК 42. Подключаем акселерометр LSM6DS0. Часть 2" 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 "Программирование МК STM32. УРОК 42. Подключаем акселерометр LSM6DS0. Часть 2" 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 "Программирование МК STM32. УРОК 42. Подключаем акселерометр LSM6DS0. Часть 2" 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 "Программирование МК STM32. УРОК 42. Подключаем акселерометр LSM6DS0. Часть 2" 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 "Программирование МК STM32. УРОК 42. Подключаем акселерометр LSM6DS0. Часть 2"?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 "Программирование МК STM32. УРОК 42. Подключаем акселерометр LSM6DS0. Часть 2"?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.