1
00:00:01,080 --> 00:00:07,740
In this election, can you show you how to run a simple program on the BBC, MacRobert that escrows

2
00:00:07,920 --> 00:00:14,720
of that, we have a world text on the eight point eight bitmap display on the back of the micro bit,

3
00:00:14,730 --> 00:00:18,750
and of course, that using micro python and funny idea.

4
00:00:19,590 --> 00:00:24,750
So essentially there are some here already connected the micro bit on to my computer.

5
00:00:24,750 --> 00:00:33,270
If I use B, once you do that, go to auctions and ensure that Margaret Python Micro is selected as

6
00:00:33,270 --> 00:00:37,620
the interpreter for this session and then select the appropriate port.

7
00:00:37,980 --> 00:00:44,640
And the thing to remember here is that the micro does not come from a factory with micro python interpreter

8
00:00:44,640 --> 00:00:45,680
installed on it.

9
00:00:46,110 --> 00:00:52,620
So if you are not able to make this work with your Sony ATV, once you have selected the interpreter

10
00:00:52,620 --> 00:01:02,040
in the port click of the install or update firmware in order to go ahead and install the micro python

11
00:01:02,040 --> 00:01:05,110
interpreter or the MacRobert.

12
00:01:05,500 --> 00:01:09,320
I've already done that, so I'm not going to overwrite my family.

13
00:01:09,750 --> 00:01:10,800
They don't cancel.

14
00:01:11,010 --> 00:01:13,290
But in your case, you may need to do that.

15
00:01:13,290 --> 00:01:19,740
If this is the first time that you're connecting your McAveety computer and wanting to use it as a micro

16
00:01:19,740 --> 00:01:22,200
python interpreter in the target device.

17
00:01:22,440 --> 00:01:24,420
So cancel and cancel.

18
00:01:26,300 --> 00:01:33,010
Another resource that is very useful and I encourage you to look at if you are interested in using the

19
00:01:33,010 --> 00:01:39,970
individual as a micro python device, is to look at the BBC market a bit micro python documentation.

20
00:01:39,980 --> 00:01:41,990
And here is the location for that.

21
00:01:41,990 --> 00:01:44,370
MacRobert nine inch python.

22
00:01:44,840 --> 00:01:47,140
Don't read the Dockstader IO.

23
00:01:47,690 --> 00:01:49,400
And let me take you here now.

24
00:01:49,420 --> 00:01:56,030
There's a law that you can do with the macro between the macro bit that does come with a load of onboard

25
00:01:56,030 --> 00:01:59,630
hardware, like it's got an accelerometer, for example.

26
00:01:59,630 --> 00:02:02,590
It's got potentially two parts of this side.

27
00:02:02,990 --> 00:02:09,980
It's got a dot matrix display, very bright red and is it's got outputs here and so on.

28
00:02:10,220 --> 00:02:16,970
And the documentation shows you how to use all of that hardware in this case, in this simple example.

29
00:02:17,210 --> 00:02:25,070
What I want to do is to just use the display and create a simple Hello World program that just printed

30
00:02:25,070 --> 00:02:33,560
out how the world in a way that the text and the individual letters just scroll across the screen and

31
00:02:33,560 --> 00:02:40,850
the commands for that scroll, which is inside the display module, which itself is inside the micro

32
00:02:40,850 --> 00:02:41,870
bit package.

33
00:02:42,290 --> 00:02:48,560
And you can see here in its constructor, the only requite value is a string in the first parameter.

34
00:02:48,830 --> 00:02:52,450
The rest are optional and they have their own default value.

35
00:02:52,490 --> 00:02:54,740
So choose to not provide them.

36
00:02:55,150 --> 00:02:57,870
They've got the default values like this.

37
00:02:57,960 --> 00:03:04,680
I'm going to go with the minimal instance of this core function and just use it like that.

38
00:03:04,700 --> 00:03:09,980
So the first thing to do that, you're going to put the documentation on the side, make a bit of room

39
00:03:09,980 --> 00:03:19,630
here, and I'm going to flip the bit upside down so we can see the dot matrix display in the back which

40
00:03:19,640 --> 00:03:21,200
make it oriented.

41
00:03:21,710 --> 00:03:23,360
Let's reorient it like this.

42
00:03:25,370 --> 00:03:25,960
OK.

43
00:03:27,070 --> 00:03:31,270
So that's actually going to do is to improve the whole Michael Vick package.

44
00:03:32,530 --> 00:03:39,280
It's hard to say what Michael Vick and now say Michael Vick.

45
00:03:42,430 --> 00:03:49,410
Plain and cruel, and I would like that.

46
00:03:50,370 --> 00:03:52,710
And check out the contents of the screen now.

47
00:03:56,700 --> 00:04:01,920
So the message is scrolling across the dot matrix display.

48
00:04:02,820 --> 00:04:03,330
All right.

49
00:04:04,050 --> 00:04:12,290
Another thing that she can do is just another example is to use the individual set pixel command.

50
00:04:12,630 --> 00:04:14,190
So that would work like this.

51
00:04:16,110 --> 00:04:25,550
So I can say to so let's say position zero point zero, so we've got five pictures across four, five

52
00:04:25,560 --> 00:04:27,630
and then another five vertical.

53
00:04:27,660 --> 00:04:29,170
One, two, three, four, five.

54
00:04:29,190 --> 00:04:33,720
So five on the x axis and five on the Y axis.

55
00:04:34,020 --> 00:04:36,480
And the starting from index zero.

56
00:04:36,780 --> 00:04:38,300
So zero point zero.

57
00:04:38,310 --> 00:04:43,520
And then I need to provide the intensity of the light that is going to come out of the ality.

58
00:04:44,100 --> 00:04:48,300
One is the faintest, nine is the brightest, some of the brightest.

59
00:04:48,990 --> 00:04:52,350
And there's the brightest ality.

60
00:04:52,890 --> 00:04:55,020
Let's turn on one more.

61
00:04:55,020 --> 00:04:57,600
Going to go for full and full.

62
00:04:58,740 --> 00:05:00,480
And there is the bottom right corner.

63
00:05:00,690 --> 00:05:01,240
Absolutely.

64
00:05:02,430 --> 00:05:04,740
I can use clear.

65
00:05:07,150 --> 00:05:08,730
It's a bit of typing

66
00:05:11,820 --> 00:05:14,280
and that will turn off the screen.

67
00:05:14,790 --> 00:05:21,330
Can also use get pixel and let's try this out bit.

68
00:05:21,330 --> 00:05:29,580
And I'm doing a code completion, so I'm hitting the tab key and then Sony is going to give me information

69
00:05:29,580 --> 00:05:33,060
about which keywords are available.

70
00:05:33,420 --> 00:05:37,410
And I want to go for a get pixel keyword.

71
00:05:39,680 --> 00:05:48,010
Sorry, it was display a got completed, and then from here on, again, I'm going to go get this plane

72
00:05:49,090 --> 00:05:54,510
and I want to know whether the the pixelate position zero zero, for example, is on or off.

73
00:05:54,540 --> 00:05:57,400
I'm just going to say is looking for the coordinates.

74
00:05:59,200 --> 00:05:59,770
Oh, sorry.

75
00:06:00,540 --> 00:06:08,050
Let's not get this that you get pixel like that and it's turned I its attitude on.

76
00:06:08,780 --> 00:06:15,030
Let's go back to one of my previous commands like this one and get the picture at the same location.

77
00:06:15,280 --> 00:06:19,870
And it's not getting that intensity, not just whether it's on or off.

78
00:06:20,440 --> 00:06:29,710
So this just gives you a quick example demonstration of how you can use the display on the ABC.

79
00:06:29,710 --> 00:06:37,540
MacRobert If you're curious and interested, you can have a look at the condition to learn how to use

80
00:06:37,540 --> 00:06:38,850
its other capabilities.
