У нас вы можете посмотреть бесплатно Arduino MASTERCLASS | How to Use Variables PART 5 или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
🤩 FREE Arduino Crash Course 👇👇 https://bit.ly/get_Arduino_skills **Want to have some fun programming your own electronics?** https://bit.ly/3y24ai7 **Get the code, transcript, challenges, etc for this lesson on our website** https://bit.ly/3tK2t6k **We designed this circuit board for beginners!** Kit-On-A-Shield: https://amzn.to/3lfWClU FOLLOW US ELSEWHERE --------------------------------------------------- Facebook: / programmingelectronicsacademy Twitter: / progelecacademy Website: https://www.programmingelectronics.com/ ________________________________ Are you ready to learn the basics of coding in no time flat? If you have never programmed before, but you still wanna learn how to control electronics with code then hold on because we are gonna jump through a bunch of stuff. This is what you're about to learn, how every Arduino program is laid out, how to use variables to store information, how to use control structures to actually build logic, and then sprinkled in there we're gonna talk about the most important Arduino-specific functions that you need to know to get started. The best part is we're gonna use actual Arduino programs to learn this stuff, so you're actually gonna see it in action. Let's do this. All right, here we are in the Arduino IDE, and this is the stuff we're gonna go over, how every Arduino program is laid out, how to use variables, how to use control structures, and we're gonna be talking about all the most important Arduino-specific functions as we go through this. So, the first thing we're gonna do is go ahead and open up a new sketch. We're gonna talk about how an Arduino program is laid out. So, here's a new sketch, and what do you notice? There's some words here, some stuff. Well, this stuff, these are functions. And the reason we know they're functions is they've got these open and closing, so here's an open and here's a closing, parenthesis after a word. So, that kind of setup, when you see an open-closing parenthesis, maybe some stuff would be in here, that's gonna give it away like hey, this is a function. So, the name of this function is called setup. It has an opening curly brace and a closing curly brace. Same thing with this function, this function is called loop, and it also has an opening and closing curly brace. Now, you can forget this word void, don't worry about that. But these two functions, setup and loop, need to be in every single Arduino program you write. If we read the information that's in here it says put your setup code here to run once, and in loop it says put your main code here to run repeatedly. Well, what does it mean to run code, what are they talking about? Well, that just means that if we write any code in here it's gonna execute the code, and it's gonna execute the code from the top to the bottom. So, if we have code 1, code 2, it's gonna execute code 1 first, and then the next line of code, code 2. And it's gonna go on till it gets to the end. And once it gets to the end setup is over, and then it moves on to the loop. So, setup runs once, and the code you'll put in here is stuff that only needs to run once. It's like code that's gonna set up the other part of your program. Now, the loop, it's gonna run over and over again. So, in loop, it also starts at the top, and it's gonna work its way down. First, it's gonna execute this code on line nine, and then this code on line 10. Of course, this isn't code, this is just gibberish, but I'm just trying to give you an idea. Then it gets to the bottom curly brace, and when it gets here it starts back up at the top and it runs this code step by step. And it's gonna do that forever. That is, it just repeats the same thing over and over and over until either you remove power from the Arduino board or I don't know, the universe ends in heat death. Now, you might be thinking wait a second, how can a program that does the same thing over and over again actually do anything really useful? Doesn't that kinda limit it to doing simple stuff? Now, at first blush you are totally right, but w CONTINUED... https://bit.ly/3tK2t6k **About Us:** This Arduino lesson was created by Programming Electronics Academy. We are an online education company who seeks to help people learn about electronics and programming through the ubiquitous Arduino development board. **We have no affiliation whatsoever with Arduino LLC, other than we think they are cool.**