Hello. We'll be going over ATmega which is the platform for Arduino Development. So here's a brief overview as always. We'll first gonna go through describing what the ATmega is and some available pins you can use for your sensors and modules and apps that will be programmed with the ATmega. We'll first do a walkthrough using the graphical IDE and then we'll also do a walkthrough using command line tools and just using text-based IDEs. And after those two walkthroughs, we'll be reiterating some instructions about how to do both. So a little bit about ATmega. So, ATmega is a microcontroller made by this company called Microchip, and headers on the Dragon for compatible with Arduino Uno shields. And here are some important pins on the DragonBoard itself. So as Simon will show you later, these are the blue thin pins. Yeah, headers. Thin headers, sorry, with little dots on them and and then the nine Grove connectors are white connectors themselves and these need to be controlled by an Arduino program. We will show you two ways to do this. There may be more ways but we'll just give you a brief simple tutorial on how to do both. So we'll show you guys the board itself. So as you can see here, as Andrew was talking about early, here are the two blue headers here and then here are some of the white Grove connectors that we were talking about. We'll also talk about where the actual ship is. So this nice square right here is the actual ATmega chip and this is basically the brain of this board. You can run an Arduino sketch on it and you control these pins. So this header here is all the 13 digital I/O pins and the I2C SDA and ACL pins. And these six right here are the analog input. And then, here are the bank of reference pins that you can use. The good thing about these headings are, it's the same layout positioning as an Arduino Uno. So you can use a shield you can use with an Arduino Uno, you can just place on here and it will know what to say. So instead of just connecting it directly to these pins, there are some in that system growth connectors to be used. So using see here five growth connectors here. These are mapped to the digital pins specifically 3D 7. And then you can use these, instead of actually going to the blue headers and some of the analog pins are also mapped to grow connectors. Three of them are here on the side. It's a 0 through a 2 Yeap. And then last one is the I2C pin Arduino ITC. There's other I2C but we're focused on the greener one the ATC is here on the far right yeah. And we'll be going back to the skies to teach you more about ATmega and other things about it. So before you guys go to it tutorial, make sure you guys have the dependencies that we've installed in earlier lessons. The two main ones are Arduino_MK and Arduino. Make sure you know how to communicate with the Dragon board through the UART using serial ports. And there are two ways for Arduino development as I mentioned earlier, but I'll tell you what they are. One way is through using the Arduino IDE which you install through sudo get install Arduino and other way as using your favorite text space editor and then making this through the terminal and running it. And Simon will show you how to do the Arduino IDE. Yeah. So just go to the screen share and show you a simple program just like an LED on the dragon board. So we'll see on the screen share there you go. So there are two ways to actually access the id the first way is you can go through the graphical way and just go through here. And then programming and then you click on that. So I don't want to do that because I like the command line the most, so I'm typing Arduino and then you can just press Enter. And I also just do the same thing, but I think am more used to accessing it through this way. So here you can see just a blank Arduino sketch. You have to fill that same with all your own code if you want to use it. Just a quick tour is here's some tools. This is important for the serial monitor to read from the Arduino anything it prints out for serial. Also choosing the correct board for this is always going to be. So that's fine. And also choosing the correct serial port. So we're all in Dragon board now we want communicate to the Arduino chip so it's connected through the specific port right here. It's already checked off, so we're good. And then after that here if you're not familiar with Arduino IDE here's the verify button it just compiles it without letting card we know just checking if it works. And here's the upload button which was actually put the program you just wrote onto the chip and just run it. So just do the simple examples gadget that they have available and they'll be in examples basics and blink so yeah this sketch was just make a little larger. So this sketch is essentially just to choose an LED pin 13 and I link the LED on for one second and offer one second. And then repeat on the loop. So, we can verify that using this we don't need to. It's an example one so we're fine. So we just upload directly. It's like a little bit because it's both compiling it and just uploading it onto the chip itself. As you can see here it's done and then we can go to the actual board itself and show you guys to LED Blinky says and see here there's a little red LED and it's just breaking off for about a second actually is probably exactly a second. Yeah exactly a second because we specified it. So it's all we wanted to show for now we go back to the IDE and show you guys had a turn off so you guys can see the difference. So that's a turn off for just uploading in an unrelated program to the LED good examples basics again. And just this one it's unrelated to its so we going to upload it and go. And there we go. It's done uploading. We'll go back to the board itself and show you guys. Ellie just off it's kind of boring but still you guys. It actually effects the board. So yeah I can see that the LED is not blinking anymore. Ignore the little blinking here that's just from the USB port. So yeah, that controls the LED you can do more and just collect more sensors to it and click like to control them that way. So let's go back to the IDE area and then just close this out and get ready for Andrew's walk through to the command line. This yeah I hand off to Andrew so to show you guys how to do just purely from the command line. Okay, we will start by showing you all the files in this current directory. So we created an Arduino file ourselves. As you can see by that dot I know after blink this basically means that it is an Arduino file as CPP represents a C++ file and so forth. And the first part of making is actually winking the Makefile and if you want to do this through the ln_ s command and you may ask where we might have gotten into May Kwao. Yeah. So we actually got it through. As you can remember, we did sue to get install Arduino and Arduino.make or _make and that's when we install those packages we actually install the make files that was use for use it on the command line. So, we link the Makefile and endless hours again to see if it's successfully linked and here's the Makefile. And then we're not going to go deeply into it. We're just going to show you how to use it. So the command that makes end runs the program is make upload reset_stty and there are more commands on the Makefile itself but we just want you to use your most use search engine to find out more about the Makefile or you can just look through the Makefile itself but if you know enough about it. So if we go back to the Arduino itself we can see that LED is indeed blinking. And then write a program for turning it off unfortunately but you can just write it yourself. Yeah well will just leave it there for now. So we will go back to the slides and just go over some quick formation. So as you can see this is just a quick instructions for the IDE. So this year we just have to open the program the LED itself right in order to sketch in our case we just took an example one used it choose the correct port it's often times we chosen for you or set up. And then just clicked upload button and hope it works well. And then on the Command Line Tools, we want to make sure that the sketch that we wrote is the.ino file this represents an Arduino file itself and you want to link this to the Makefile. And you want to upload it through that command and make upload reset_stty. So if you want to learn more about the things we talked about, like maybe Arduino or the Mezzanine, you'll find more information in the readings that we'll provide. And there will be links to sources they know more about it. So the takeaway is that, we gave specific instructions on how to use the mezzanine through 18 Mega. And then, we shall show you that you can use 18 mega interface with sensors and devices. In this case, there is just an LED that's on board the actual mezzanine itself but you could have easily just plug it in and when the LED module of the buzzer module is controlled it through the Arduino program. We showed you how to do this through the Arduino IDE and then through the terminal and yeah.