Wednesday 8 July 2020

Arduino - All You Need To Know

hey here to learn something new well to keep those knowledge gears greased remember to subscribe and hit the notification button to get notified when a poppin fresh video is ready for your consumption let's talk about Arduino 'he's the gateway drug to microcontrollers that can turn a novice tinkerer into a mad scientist the Arduino is the perfect tool for anyone that wants to get started with electronics but wants a fairly simple learning curve it all starts with this Hey I thought that was a bug sorry it all starts with this a microcontroller and in layman's terms it's basically an electronic brain robot right microcontrollers are micro in that they're small and controllers and that they can control other electronic components you can control leds motors buttons speakers sensors and tons of other electronic components but early in the days of electronics there was quite a learning curve to somehow connect components to microcontroller connect it to your computer and then program commands on to it there were some circuit boards that made the process easier but at the time they were very expensive enter a university team from ivory Italy who wanted to make a cheaper easier wage for people to get started with microcontrollers get below that Dizzy Dean Neil what will you call it arduino bellissimo i could kiss you and so it began arduino started as open-source software for programming microcontrollers but eventually became branded as the microcontroller platform itself the platform being this credit card sized circuit board with a microcontroller stuck on it the circuit board is intended to have everything on it to make it easier to connect things to it and program it which if you were to build the same thing on your own it probably looks something like this you have your USB port which not only plugs into your computer so you can program it but it can also power the thing and then you also have your external power port if you don't want to power through USB you have your power management pens here your analog pins here and your digital input/output pins here wait isn't that nice to you but I have no idea what you're trying to tell me okay grandma here let me simplify it these ports which I'm calling pins allow you to control electronic components such as your LEDs motors fan centers buttons etc so you can connect those components to these pins using wires and whatnot and then program the microcontroller to control those components you could start with something basic like controlling an LED light or you could connect multiple components and make your own Smart Watch that connects through your blue to the phone or something like that so let's take a look at that basic LED example shall we taking a simple LED and a 22 ohm resistor


I can connect the ground side of the LED to a ground pin on the Arduino and then the positive side of the LED to the resistor and then on to a digital pin on the Arduino will go with pin 13 but it could be just about any digital pin now we have to tell the microcontroller what to do so in order to do that let's plug the Arduino into the computer and in a web browser go to the Arduino website to download and install the Arduino software the Arduino software allows us to tell the microcontroller what to do by using coal I know it sounds intimidating but it's simple if you have a good teacher like me so let's jump right in here now after watching the program it automatically generates two sections of code the setup section and the loop section the setup section is where we set up the microcontroller and tell it how we're gonna use things like it spins the loop section is what we tell the microcontroller what we want it to do with the components so to set up our LED pens we type a command called pin mode and then we tell it which pin not including the ground pin the LED is plugged into then we say if we wanted to send output or receive input from it in our case we're gonna be sending output to and that output we're gonna describe in the loop section the information we want to send the LED is to turn on and then to turn back off we can write our output commands to the LED by using the digital write command we tell it what pen to write the output to and our output is gonna be to turn the power signal to high so that the LED lights up we'll use this delay command to keep the LED on for about 1000 milliseconds or one second and then we'll use digital write again to set the power signal to low which will turn the LED off and then we'll delay that command by one second that's it not too bad now we just need to upload this code to our microprocessor so first make sure the program is connected to your Arduino by going to tools and then board and then select the type of Arduino you have then just click the verify button to make sure you don't have any mistakes in your code and then click upload if you did everything correctly the LED should be blinking I know this is basic but it gives you an idea of how you can control bigger more complex components and eventually you can see how this can serve as the brains of your future robot project that's it for this chapter of the film guide that's one more tinkering tool to add to your toolbox want to suggest a guide head on over to tinkernut.com slash ideas to submit your idea if you want more tinkering videos you can click here or please be kind enough to like subscribe or comment if you made it this far here's your reward in Mexico City you can get free Wi-Fi by disposing of your dog poop


No comments:

Post a Comment