1
00:00:01,110 --> 00:00:07,440
In this lecture, I want to give you a quick demonstration of how you can use the IDB and Micro Python

2
00:00:07,740 --> 00:00:14,330
to do something simple with the big picture, which is this case to make the board ality link.

3
00:00:14,910 --> 00:00:23,220
At the moment, I've got my inspirited connected, so it's unconnected and instead connect the Raspberry

4
00:00:23,220 --> 00:00:27,760
Pi pickle back into the thorny idy.

5
00:00:27,780 --> 00:00:38,460
And the two options change the integral to the three pickle and show that the port is properly selected

6
00:00:38,460 --> 00:00:39,300
and OK.

7
00:00:39,750 --> 00:00:47,330
So now we've switched the target device to the Raspberry Pi pickle, which means running micro python.

8
00:00:47,850 --> 00:00:49,860
This is actually how it comes from the factory.

9
00:00:49,890 --> 00:00:56,340
It didn't have to do anything in terms of installing a micro python interpreter from on it.

10
00:00:56,760 --> 00:00:57,780
Just plug and play.

11
00:00:58,410 --> 00:01:02,990
We can find information about the pickle on its Web page.

12
00:01:03,000 --> 00:01:06,570
You can see here Raspberry Pi dot org documentation.

13
00:01:06,570 --> 00:01:12,030
They could get started and scroll down and the board specifications.

14
00:01:12,030 --> 00:01:15,560
You see the pin map out there.

15
00:01:15,780 --> 00:01:23,780
Big picture is well equipped with all sorts of Tapio capabilities and communications capabilities.

16
00:01:24,150 --> 00:01:31,740
One interesting technology that comes with that is a programmable input output, Appio State machines,

17
00:01:32,040 --> 00:01:37,350
which basically allow you to write simple programs and execute on specific bios.

18
00:01:37,800 --> 00:01:45,660
And because they run directly on the side of the checkpoint, not occupying any MCU cycles, they're

19
00:01:45,670 --> 00:01:46,710
very, very fast.

20
00:01:47,010 --> 00:01:52,380
It's a fairly advanced topic, though, but I thought I should mention, because it's really a feature

21
00:01:52,380 --> 00:01:56,580
that stands out when compared to other microcontroller units.

22
00:01:57,180 --> 00:02:02,640
Anyway, in this simple example, I can show you how to toggle the state of the built in.

23
00:02:02,640 --> 00:02:08,140
And just as you can see in the pin map out, it is connected to the chip.

24
00:02:08,610 --> 00:02:11,700
Twenty five using thony to eat.

25
00:02:13,960 --> 00:02:20,080
All right, so the first thing that you need to do is to import the PIN module from the machine to the

26
00:02:20,080 --> 00:02:26,490
library and the machine library, you learn about this in more detail a bit later.

27
00:02:26,950 --> 00:02:36,220
It is a library that is available for all of units that support micro python, and it contains functions

28
00:02:36,220 --> 00:02:40,600
that are specifically created for the microcontroller that you're targeting.

29
00:02:40,990 --> 00:02:48,190
So in this case, the machine library contains functions that specifically apply to their pickle.

30
00:02:48,580 --> 00:02:54,460
Later on will be using a different version of the machine library that specifically applies to the capabilities

31
00:02:54,760 --> 00:02:57,020
of the HP 32 and so on.

32
00:02:57,340 --> 00:03:04,750
And that's because each hardware target is different in terms of its hardware capabilities.

33
00:03:05,050 --> 00:03:10,420
And those differences are reflected in the individual machine libraries.

34
00:03:11,930 --> 00:03:19,490
So now that you've got the PIN module, I'll be able to use the capabilities the PIN module provides

35
00:03:19,490 --> 00:03:27,140
me to do things such as toggle the state of the entity, which is, as you said, connected to JP twenty

36
00:03:27,140 --> 00:03:27,530
five.

37
00:03:27,930 --> 00:03:35,120
The first is going to create the entity object and I'm going to use the PIN constructor so that we are

38
00:03:35,120 --> 00:03:37,860
targeting JP twenty five.

39
00:03:38,120 --> 00:03:44,720
And this is going to be an output which that's how you set this up in Raspberry Pi.

40
00:03:44,720 --> 00:03:51,410
Piggot and now that we've got this object we can collect on the work of.

41
00:03:52,340 --> 00:03:52,540
The.

42
00:03:54,600 --> 00:03:59,550
Perhaps I should say, to not talk like that there, Verizon.

43
00:04:01,250 --> 00:04:06,680
That's also another way that you can do this if you want to be more specific about the value that you're

44
00:04:06,680 --> 00:04:12,890
writing to the top twenty five, which is the only thing, is to use the venue method.

45
00:04:13,280 --> 00:04:16,870
And in this case, the world is turned off now.

46
00:04:17,300 --> 00:04:21,340
So I'm going to turn it on by putting value one like that.

47
00:04:21,800 --> 00:04:27,430
You can also check the state of the ality by just calling the value, but had a parameter.

48
00:04:27,450 --> 00:04:34,820
You could see now that it is on a fight top level and check the value again, you'll see that it's off

49
00:04:34,820 --> 00:04:35,180
now.

50
00:04:35,180 --> 00:04:35,780
It's zero.

51
00:04:36,810 --> 00:04:41,990
It's just a quick demonstration is the focus of this course is on the three.

52
00:04:42,530 --> 00:04:49,850
But if you're curious about learning more about the Cross-Breed Pekoe, then have a look at the documentation

53
00:04:49,850 --> 00:04:57,140
here, a full book with a lot of content, including the link example that I've just shown you and lots

54
00:04:57,140 --> 00:05:00,440
of other bits of information that you'll find interesting.

55
00:05:02,210 --> 00:05:06,590
All right, so then the next thing that I want to do in the next lecture is to show you how to do something

56
00:05:06,590 --> 00:05:08,600
similar with the BBC.

57
00:05:08,600 --> 00:05:13,910
MacRobert The purpose of this, of course, is to show you how the versatile micro python nature allows

58
00:05:13,910 --> 00:05:20,180
you to jump from one kind of hardware to another with some small, relatively small modifications to

59
00:05:20,180 --> 00:05:21,950
your Microplace approach.

60
00:05:22,760 --> 00:05:26,030
So let's go ahead and extend the ABC a.
