1
00:00:00,720 --> 00:00:08,150
I mean, these pictures show you how to use the integrated effects sensor, so your ability to contains

2
00:00:08,160 --> 00:00:14,910
a sensor that can detect a magnetic field and it can give you a reading that is analogous to the strength

3
00:00:14,910 --> 00:00:18,000
of the magnetic field on and around the sensor.

4
00:00:18,540 --> 00:00:22,030
You can get some information about the whole effect sensor here.

5
00:00:22,290 --> 00:00:28,380
So I'm looking at the micro python documentation under SB 32 general board control.

6
00:00:28,380 --> 00:00:35,700
And you see here there's a method called hole sensor, and that is part of the ESP three two module,

7
00:00:35,700 --> 00:00:38,670
just core this method and you'll get back a number.

8
00:00:39,030 --> 00:00:48,030
And the number, depending on how strong is the magnetic field around the sensor, a very simple script

9
00:00:48,030 --> 00:00:50,650
that shows you how to use this capability.

10
00:00:51,180 --> 00:00:59,040
So first, will import the SB 32 module, also import the time module so we can add a little bit of

11
00:00:59,040 --> 00:00:59,460
delay.

12
00:00:59,850 --> 00:01:07,380
And I've got an infinite loop that just printed out whatever values are coming out of the whole effect

13
00:01:07,380 --> 00:01:07,980
sensor.

14
00:01:08,610 --> 00:01:11,850
So I've got my ears to do nothing connected to it.

15
00:01:11,850 --> 00:01:17,430
And I've got a fridge magnet here to stimulate the whole effect sensor.

16
00:01:18,060 --> 00:01:27,270
So let's begin sketch uploaded and there's no indicating the ambient magnetic field, so don't have

17
00:01:27,270 --> 00:01:28,680
a magnet around it.

18
00:01:29,300 --> 00:01:33,090
I'm going to put the magnet over the casing of the ECB.

19
00:01:33,300 --> 00:01:36,630
Two, you can see that the value increases.

20
00:01:37,810 --> 00:01:44,930
So relatively weak magnets, you got up to about three hundred and ten, there's a reading going to

21
00:01:45,440 --> 00:01:47,250
turn the magnet upside down.

22
00:01:47,290 --> 00:01:54,200
You can see that I'm also getting smaller readings and you can even get negative readings depending

23
00:01:54,200 --> 00:01:57,230
on the orientation of the magnetic field.

24
00:01:58,740 --> 00:02:08,750
I also have a motor which has committed maggots in it, so I check it out, see if there's any effect.

25
00:02:10,530 --> 00:02:11,910
Very little effect, actually.

26
00:02:15,650 --> 00:02:17,300
With the magnets from the modem.

27
00:02:17,540 --> 00:02:19,850
All right, so that's pretty much it.

28
00:02:19,910 --> 00:02:22,400
You have a magnet lying around.

29
00:02:23,360 --> 00:02:25,040
This is a fun experiment to do.

30
00:02:25,040 --> 00:02:25,820
Very simple.

31
00:02:26,210 --> 00:02:28,130
No additional components needed.

32
00:02:29,160 --> 00:02:31,270
And why not?

33
00:02:31,280 --> 00:02:39,020
Also, you can try out the portal, which give you a visual representation of the magnetic field.

34
00:02:40,240 --> 00:02:40,810
Akko.

35
00:02:46,520 --> 00:02:51,320
And when I turn the magnet upside down, you can see that the magnetic field or the light actually drops

36
00:02:52,160 --> 00:02:55,310
as compared to the ambient about two hundred.

37
00:02:56,230 --> 00:02:57,520
It goes down to about 100.

38
00:03:02,050 --> 00:03:07,540
All right, let's move on to the next lecture where I show you how to use an integrated temperature

39
00:03:07,540 --> 00:03:07,990
system.
