Hello and we'll come to this in your lesson today we will talk about respited bike configuration.
Let's start by turn and go in the right spirit by and ORBIN by the new window if you will.
Yet talk about trust barabar you can check out course or respited by step by step guide to learn how
to turn it on how to use it and how to write your own code inside it.
You won't need to write the following code in the new window and save it saving it to your desktop is
a good place so you don't lose it.
This is the code.
Let's start by explaining this very simple rasberry by code so that you will know what you are writing.
First we are importing serial communication and time libraries.
We are also importing Arbi Berberis input output library which is for us buried by Ben's input and output
Berberis input output.
This is what this stands for.
These are for importing.
Next we are defining the serial communication so it equals cereal.
Cereal.
This is the location for the serial communication device which is in this case the Arduino.
We will change this in the few coming lessons but for now you need to understand this line and this
is the baud rate 9600.
Changing is the number which is here as found from us Dev D t y AC.
If we ran this command we will see a list of the serial communication device after connecting the dots
Barry.
We all find something like this with an iron bar after it.
We will need to change that number with the new one on bar after connected valgrind.
We will talk about this again in the few coming lessons.
See the quadrate is 9600.
This is for sitting at about the rate of the serial communication between the Arduino and rasberry by
next we have the diff Blinkx been.
This is for blinking LED Now John Berberis and would opt out booked for Ben which is he is is just a
bit and would output high so it will send 5 volts or 1 logic to this been so that it can blink it then
it will wait for one second.
Then it will send a low which is zero.
Then it will wait for one second.
After that it will tell again to hear.
If so this is like a veteran beat repeats itself.
That means returning to the point of the cord.
When this function was called after that we have general purpose and output mode for connecting the
board and it was an output setup for number 11 to which we connected the LED we defined this been as
out.
But John Berberis the book out so that it can be considered as output.
Now while true while true we needed to read the serial line we'd see which is Sierre the tree line.
It will read the incoming data.
Was in the area of communication between outman hospital buy and store these values or this data to
the value of valuable read separate this research will be Brinton's.
But in the lead set in the window inside rasberry by now if the value inside read search equals Hello
from Arduino and this mark it will blink.
Number 11 the number 11 and blank will go here to execute this.
Then returning it.
So as you can see blank is a function inside bifold language.
This was quick explanation of the rasberry bytecode.
Let's it these for importing the library's serial time and end up with libraries.
These are for these two lines for defining set and communication protocol and defining which you us
be serial communication been is the one that Albinus connected to this link to the that.
These lines are a function called blink when we define that ban it will use it to blink that Ben these
two lines for defining the number 11 as output for defining the board.
Now this one will keep repeating itself while through.
It will read the secret communication data that we send to the rasberry it will print it.
Then it will ask if it equals this line it will blink.
Number 11 Blinkx means call the function call the blank and execute its command on bin number 11 so
it will go here.
It will start as high then low which means that then it will turn on and off then it will have to wait
for fear of instruction.
That's it for the last bit of bytecode that spared my configuration.
I know that I explained the code very fast but since it's really simple and we don't want to waste time
on this code.
I did that for this lesson.
If you have any question please ask in the queue on their board.
If anything is unclear please ask.
We are here to help you have learning this is educational engineering.