From the course: Learning Arduino: Foundations

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Creating your first sketch

Creating your first sketch - Arduino Tutorial

From the course: Learning Arduino: Foundations

Creating your first sketch

- [Instructor] All right, now you are ready to write your first adrenal sketch. In this example, we are going to use the built in LED in adrenal board that is connected to digital pin number 13 and I'll program it to make it blink. So I started a new file from scratch, if you're still using the same previous file, then you can go ahead to the file and then click new in order to start a new file. In this program, we are going to use it to turn on the led for a certain time and turn it off for a certain time. So the very first thing that I'm going to do is to initialize the pin number 13 as an output. So I'll go to the void set of function, write pin mode function, specify pin number 13, and then make it as a output. One of the recommended ways is that we can create a variable and name it and instead of using the pin number 13, we can use the variable instead. So the recommendation is, you go at the beginning of the…

Contents