In this election, can you show you how to run a simple program on the BBC, MacRobert that escrows
of that, we have a world text on the eight point eight bitmap display on the back of the micro bit,
and of course, that using micro python and funny idea.
So essentially there are some here already connected the micro bit on to my computer.
If I use B, once you do that, go to auctions and ensure that Margaret Python Micro is selected as
the interpreter for this session and then select the appropriate port.
And the thing to remember here is that the micro does not come from a factory with micro python interpreter
installed on it.
So if you are not able to make this work with your Sony ATV, once you have selected the interpreter
in the port click of the install or update firmware in order to go ahead and install the micro python
interpreter or the MacRobert.
I've already done that, so I'm not going to overwrite my family.
They don't cancel.
But in your case, you may need to do that.
If this is the first time that you're connecting your McAveety computer and wanting to use it as a micro
python interpreter in the target device.
So cancel and cancel.
Another resource that is very useful and I encourage you to look at if you are interested in using the
individual as a micro python device, is to look at the BBC market a bit micro python documentation.
And here is the location for that.
MacRobert nine inch python.
Don't read the Dockstader IO.
And let me take you here now.
There's a law that you can do with the macro between the macro bit that does come with a load of onboard
hardware, like it's got an accelerometer, for example.
It's got potentially two parts of this side.
It's got a dot matrix display, very bright red and is it's got outputs here and so on.
And the documentation shows you how to use all of that hardware in this case, in this simple example.
What I want to do is to just use the display and create a simple Hello World program that just printed
out how the world in a way that the text and the individual letters just scroll across the screen and
the commands for that scroll, which is inside the display module, which itself is inside the micro
bit package.
And you can see here in its constructor, the only requite value is a string in the first parameter.
The rest are optional and they have their own default value.
So choose to not provide them.
They've got the default values like this.
I'm going to go with the minimal instance of this core function and just use it like that.
So the first thing to do that, you're going to put the documentation on the side, make a bit of room
here, and I'm going to flip the bit upside down so we can see the dot matrix display in the back which
make it oriented.
Let's reorient it like this.
OK.
So that's actually going to do is to improve the whole Michael Vick package.
It's hard to say what Michael Vick and now say Michael Vick.
Plain and cruel, and I would like that.
And check out the contents of the screen now.
So the message is scrolling across the dot matrix display.
All right.
Another thing that she can do is just another example is to use the individual set pixel command.
So that would work like this.
So I can say to so let's say position zero point zero, so we've got five pictures across four, five
and then another five vertical.
One, two, three, four, five.
So five on the x axis and five on the Y axis.
And the starting from index zero.
So zero point zero.
And then I need to provide the intensity of the light that is going to come out of the ality.
One is the faintest, nine is the brightest, some of the brightest.
And there's the brightest ality.
Let's turn on one more.
Going to go for full and full.
And there is the bottom right corner.
Absolutely.
I can use clear.
It's a bit of typing
and that will turn off the screen.
Can also use get pixel and let's try this out bit.
And I'm doing a code completion, so I'm hitting the tab key and then Sony is going to give me information
about which keywords are available.
And I want to go for a get pixel keyword.
Sorry, it was display a got completed, and then from here on, again, I'm going to go get this plane
and I want to know whether the the pixelate position zero zero, for example, is on or off.
I'm just going to say is looking for the coordinates.
Oh, sorry.
Let's not get this that you get pixel like that and it's turned I its attitude on.
Let's go back to one of my previous commands like this one and get the picture at the same location.
And it's not getting that intensity, not just whether it's on or off.
So this just gives you a quick example demonstration of how you can use the display on the ABC.
MacRobert If you're curious and interested, you can have a look at the condition to learn how to use
its other capabilities.