[MUSIC] Module one, Lesson three, Lecture 3.2, Arduino Basic Setup. So, right here, we're gonna talk about how you set up your Arduino environment in the first place. We'll just go through the basic set up, and we'll have you install the Arduino environment, and then run a program just as a sanity check to see that you got it all installed. And you should definitely do this first thing you get your Arduino. You should do this just to make sure the whole setup is working cleanly. So, setting up the Arduino IDE. You wanna download it first. So, you go to arduino.cc specifically, on the link that's shown there, arduino.cc/en/Main/Software. Or just go to arduino.cc and at the top there's a download button and it'll get you there. So easiest to run the installer. Now I'm using Windows so say Windows installer but you can do this on Mac and on Linux as well. So you run the installer. Now that will automatically install all the drivers that you need, specifically the USB driver and other drivers. Drivers are basically software code that runs on your machine to communicate with other devices. Okay? So on your desktop, laptop. Right? So it'll have drivers. Any operating system has a set of drivers. So there'll be drivers to talk to the USB port on the Arduino. So this, if you just run the install, it will automatically, when it asks you, should I install the USB drivers, yes. Any drivers it says, okay, okay, okay. So, you install those and actually, this process has gotten much better over the years. It used to be error filled. Right? But now it's pretty clean. Okay, then connect your board to the computer yards. We know board to the computer. Use a USB cable, connect it. Launch the Arduino application. So start the IDE however you wanna start it. Maybe you have a desktop icon, you double click on it or do a search, find search for Arduino and double-click on it. So you start the IDE with the board connected. Now when you start it, first you get the image you see on the left. You're gonna get basically an empty screen. It's not completely empty, this one has sort of a shell set up and a void, but there's no code inside there. Right? They're blank. So you start off with something blank like that, and if you wanted to you could write code and fill in the blanks. Write all your code right in there. That's not gonna be the first thing you're gonna do. First thing you wanna do is basically upload, open a sample problem, a sample file, and run that. Just as a sanity check to see that your whole system is working. Now the Arduino comes with this whole, a big set of examples. Example programs that should work. So I'll advise you to look at the Blink example. So go to file. Go to the file, pull down file, examples, basics, and blink. There's a program called Blink, you click on that. Then you'll get the image you see on the right. It'll open up the Blink code. Now, that's the just beginning of the Blink code, but there's a little bit more of it down there. But it'll open up a new window with the Blink code in it. Now, then what your goal's gonna be is to run that program. And what it should do, it should make an LED Blink on the Arduino. Okay, and then you know my setup is working correctly. So in order to get to that point where you run the code, first you wanna make sure that the machine has recognized your Arduino correctly. Now this you may not have to do. It may if you're happy, if you're lucky, it may just, as soon as you plug it in your OS will detect it and everything will be fine. But here are some checks you typically do before you program, first select your Arduino board in the Tools Board menu. So if you to Tools and go to the board link it lists a bunch of Arduino boards. Arduino Uno is typically what you are going to be using. But there are many variants on Arduino board. Arduino Lilypad, Arduino Duemilanove and all this. So, there'll be a whole bunch of them, and hopefully, usually it detects it automatically and highlights the one that you are using. But just in case it didn't you go in there and you select the one that you are using, Arduino Uno let's say. Then you wanna select your serial port in the tools ports menu. Serial port, this is more detailed than I wanna get into, but there are these COM ports, communication ports, on any windows machine. And the windows machine should, when you plug in an external device, it should automatically map the external device to a particular COM port. Whichever one is available, first one to find is available. So, if this is working right there should be, when you look at the tools port menu, there should be one option there. Say COM3 or COM5 or whatever's available, there should be one option and you select it. Okay? And that should be all there is to it. Sometimes there's multiple options and then the easiest thing to do, there's a way to figure out which one is the right one, but the easiest thing to do is just guess. Try one and program it and see what happens, if it fails, try again. But there should be one option, and you select it. If there's no option, then probably the USB drivers are not installed correctly. Okay? So then once you've selected the serial port, then you upload the program. You press the Upload button. Now, you press the Upload button on the IDE, it will compile the program, checking for errors and the Blink program will have no errors. It will compile it and then it will upload it. When it's done, that'll take several seconds. Okay, ten seconds, let's say. Some lights will blink on the board quickly, and then they should stop blinking, and it should be programmed. And you should see a little message that says done uploading. When that happens, as soon as that happens, the Arduino will start executing the program, as soon as it's done programming, done uploading. So, what should happen, is there's an LED panel on the board next to the pin 13, digital pin 13 and it should start blinking once every second. And if it had happens, then you know that your install is right and everything is working. So you should do that as soon as you get your stuff. Thank you. [MUSIC]