Arduino: Introduction to Open-source electronic prototyping platform

in utopian-io •  7 years ago  (edited)

IMG_20180612_204742.jpg

Github Repository

What is Arduino?

Arduino is an open-source physical computing platform based on a simple I/O board and a development environment that implements the Processing/Wiring language. Arduino can be used to develop standalone interactive objects or can be connected to software on your computer (e.g. Flash, Processing and MaxMSP). The boards can be assembled by hand or purchased preassembled; the open-source IDE can be downloaded for free at https://www.arduino.cc/en/Main/Software
SOURCE

Introduction

Welcome everybody to the start of new blog series that I'm going to have on the UTOPIAN-IO. Today's topic is going to be Arduinos and the Arduino integrated development environment was commonly known as an IDE.

images (3).png
SOURCE

Reason, I wanted to start a tutorial series is to get people interested in basic electronics and to start with something. That is the most available to everybody out there. A lot of people are probably familiar with Arduino. Or at least have heard of an Arduino.

arduino-uno.jpg
SOURCE

They are a small microcontroller that you can purchase anywhere between $6 up to, almost 50 or 60 bucks. They are readily available or more readily available through radio shack when it was in business. But it is one of the more easier systems to learn and start with. So again, with what we're going to open up, we're going to take a look at the IDE itself.
IMG_20180612_204408.jpg

IMG_20180612_204351.jpg

Post Body

Alright? So when you open up a brand new sketch, which is basically the term for a file or workspace, depending on what you may or may not be familiar with, if you know, if you do programming. When it opens up, you get this very simple screen and I liked the fact that it's very minimalistic, in the fact that it doesn't give you a lot of different things. And it doesn't throw too much at you. Now the version I have is Arduino 1.8.5. Which you can download from the windows store.

Screenshot_2018-06-12-18-13-21-30.png

Programming Setup

So to begin, when you open up a brand new sketch, you get to predesigned components. Art One is void set up.
set up is basically where you would put anything you want to have run at the very beginning of your program.

Examples would be variables, setups for serial connections, setups for connections to other things like for instance. If you wanted to use LEDs, you would need to enable any type of Philip resistor. Which we'll get more into those as we kind of go through different blog.

IMG_20180612_205907.jpg

But those pull up resistors basically tell the signal connection on that particular pin. If they're going to be an input or an output or a couple of other options out there depending on which go with then is the void loop.
IMG_20180612_210120.jpg

Now, void loop is basically your primary component of your program. This is where you would put the bulk of everything that you're going to code. So if you're going to be taking in input, putting out different based on that input, all of it goes right within this area. The nice thing about the Arduino IDE is the fact that it also gives you, down here, this black kind of bar looking thing is actually a terminal.

Nice thing about the terminal is the fact that. This terminal will show you different things like say are deploying the code. To an Arduino is going to tell you how long it's taking. The errors kind of helps you with error checking before deployment. It will also tell you what model of Arduino you're running and what port it is on and you need to make sure you're on the right column is if you're not, you're going to end up in a situation. Where you're going to have not a fun time trying to figure out. Why you can't talk to you or do we know I'm up here. You've got your standard file edit sketch. Now with sketch, you can compile it, upload it shows sketch folders. So you've got other things going on. You can run those different sketches or open up a sketch folder to show the different things you're working on.

Screenshot_2018-06-12-21-05-29-00.png

Screenshot_2018-06-12-21-05-32-65.png

You get your standard tools and help with sketch. You do have include library options and these are the ones that you have currently installed. I believe all of these. All of the ones I have here are the standard install one, so when you brand new, install the IDE or set it up for the first time. These are the ones you're going to see right off the bat. And you can download additional libraries through Arduinos website or other places depending on what you're working on. Like if you buy an LCD panel, some of those companies will produce a library specifically for their product. This is where you would find that after adding it as a zip file and managing it. One thing we'll take a look at here, which I really like, is they've got examples. So we've got all of our basic examples and some more, interesting examples.

Screenshot_2018-06-12-21-05-45-89.png

Screenshot_2018-06-12-21-05-57-02.png

They've also got a retired polar. Which I don't have anything in. But let's take a look at a digital link without delay. This is an example.

Screenshot_2018-06-12-21-05-57-02.png

Screenshot_2018-06-12-21-11-32-79.png

So if we run this example,

Screenshot_2018-06-12-21-11-51-61.png

Screenshot_2018-06-12-21-11-55-57.png

we open it up, will tell us blink without delay, turns on and off a light emitting diode, IE and D that we are pretty common around nowadays.

Connected to a digital pen that using the delay function. This means that other code can run at the same time without being interrupted by the LED board. And again, that goes back to that looping scenario. If you use the delay, it actually causes the code right at that moment and then you can't run anything else. So he kind of talks about the circuit and talks about you know, who created it. Who modified it, kind of some of the basic legal that we will find in a lot of different professional code packages.

IMG_20180612_212840.jpg

We're not going to worry about that right now. And you can just kind of see the basic layout.

Screenshot_2018-06-12-21-31-13-99.png

So we have constant into LED pin, LED will attend a go away. These are kind of some of the setup things. Now these here are outside of the one time setup. Because these are things that don't really change. We're going to have one starting number where within setup, this is more about setting up the hardware itself.
So again, you can also put in A. We want to say we have a variable a and we want to make it equal to a thousand at the beginning of the program. You can do that most of the time you're going to do it up here. Another thing that's not here is also hashtags for including stuff. So like let's say we wanted to go in and include a library bridge ash include and then it tells you bridged that age or rich client at age.

Screenshot_2018-06-12-21-33-25-01.png

Screenshot_2018-06-12-21-33-28-50.png

These are all different header files. If you want to learn more about C programming, which is what the languages that we see here. I can create a tutorial series if you'd like. It's not my forte. But I can definitely give it a go. We can discuss it even further later on once we start creating Arduino projects and working with them. Right now I'm just going to leave that alone and not touch it. So we'll close out of this. Not going to save it. I don't want to lose that.

Screenshot_2018-06-12-21-36-18-22.png

Screenshot_2018-06-12-21-36-25-39.png

And that's kind of just a brief overview of some of the main things with the Arduino IDE. I'm not going to worry about too much right now.
We'll talk about it more and more in depth as we create more projects. So the next thing I want to bring up is arduinos website.

Arduino Website

Screenshot_2018-06-12-21-38-50-10.png

Now I've gone right to the purchase page for an Arduino Uno, which is the microcontroller that I was gonna talk about. There's tons of different things here on the Arduino site, but big thing is, is like we're looking at what does the offer us a basic overview. You can read this if you want.

Screenshot_2018-06-12-21-40-47-60.png

I'm going to click on tech specs over tech specs.

Screenshot_2018-06-12-21-42-51-24.png

We find out the microcontroller, which is this ship right here is an Atmega 328. Now an Atmega 3:28 p is pretty much the standard that I have found for a lot of the Arduinos. The other thing to keep in mind, Arduino is open source. So it is your open source friend. Which means you can create your own boards if you really, really want to. I'm not going to get into that's way too advanced for some of the stuff we're going to be doing. But still kind of a cool concept and the fact that you can create your own version of this board. And I know there are tons of websites out there for that. So look them up. They're really cool. This particular microcontroller runs on 5 volts, only 5 volts. If you try to give him more than that, the thing will crater and you will let the ghost out of the machine. Basically, white smoke means now you're done.

IMG_20180612_214630.jpg

Along with this, it has an input input voltage recommendation. Now they say 7 to 12 volts most of the time. And pretty much everything I've ever run, I'm running the 12 volt side of this prison is 12 volts is pretty common. Especially if you use a couple of days or if you're hooking up some of those lead acid batteries. I actually have a lead acid battery sitting right next to me that I use for a lot of testing. And that's what the 12 volts comes into. It do have a maximum input voltage range of 24 as low as 6. I don't know why you would ever put 20 volts into this thing that's just kind of crazy, but it does have some surge protection on it. Don't go and test it. Don't push it too hard as you can smoke these things pretty easily.

Next you've got 14 pins for digital IO. Now, the nice thing about digital IO or digital input output options is 14 pins. You see a decent amount to start with while not a ton. When you get into more complex programs or projects, really good for just entry level stuff though six of those provide what is called a PWM or pulse width modulation output. Really good for if you're using a server and stuff like that. We'll talk more about the PWM later on when we start using a servo or anything. That uses them and explain how PWM word again, reiteration of how many of those are actual PWM pins and we have something called the analog input pin. Now some of you might be familiar with analog versus digital, some may not. Basic concept behind it is this digital pins have either an on or an off state, so a 1 or a 0.

That's all they read. The analog input pins still have that range of 0 to 1, but they have everything in between that and depending on what kind of converters you have, converters that you have. Whatever kind of converters you may have, you might be able to get as close to say .5, 1.02 and some may not have that resolution where you can go that deep. They might only allow you to go to point one, point two, point three. It kinda depends. That is something called the ADC or analog to digital converter, and again, we'll discuss more of that once we start diving into programming and kind of playing with this microcontroller on its own. Next step, it tells you a little bit about how much current can each of these pins take it.

Again, if you're rolling over 20 million amps. You're going to fry this stuff. So be very weary of that flash memory, 32 kilobytes very very small. Not compared to like your hard drive that runs five terabytes or 500 gigabytes or what have you. Very little space, but you have to keep in mind we're only storing a text file that gives the program because the control or instructions and those things are in the kilobytes. Really, really tiny or invites actually when you load up a file and send it to the Arduino is going to tell you how many bytes you're using. Then we've got Sram, which is the same concept as regular ram. He EEPROM, again, kind of more complex stuff. We're really not going to get into this stuff. You're never going to use these that much when it comes to what you're doing with the Arduino.

You got your clock speed, which is 1600 mega or 16 megahertz. LED Built In, how many LEDs and can roll, and then the standard length and weight of set Arduino. Then we see some fun little projects down there.

Screenshot_2018-06-12-21-52-04-62.png

Next, I'm going to click on documentations. This is what I was talking about. The open source hardware. They actually give you these schematics for this stuff. The board information and the zip files for the actual ECB that you can produce your own if you want to. That's up to you. Again, if you wanted to delve into that, you can. Another thing that I want to point out is they do have their own resources and tutorials. They do recommend you guys look through these. If you really want to get into this just because it'll give you more basic than what I'm going to show throughout my Blog.

Screenshot_2018-06-12-21-53-35-90.png

You've got the built in examples. We talked about examples from libraries, these are the different libraries I was talking about. They have a ton of them out there, foundations and packing. Again, those are more advanced tutorial options and we may get into some of that stuff. But it's not going to be anything we're going to look at today and another thing I want to look up, look at.

Arduino Project HUB

Screenshot_2018-06-12-21-55-03-35.png

Actually I found a project on the arduino project hub called fritter crawling or do we know robot and it has a creative Commons license on it. Really Nice thing about this is like you can click on this. It's going to give you information about, these are the things that you need to buy in order to produce one of these robots. So I click on a little trick out icon here.

Screenshot_2018-06-12-21-56-49-17.png

Screenshot_2018-06-12-21-56-57-03.png

Gonna, take me two little robots and their little arms servos that are used in this particular build. That's really nice. You got your table of contents and it just walks you through how to build it, how to make it, and like the schematic layout of all this stuff.

Screenshot_2018-06-12-21-57-16-81.png

So pretty neat. Pretty Fun. Again, this is more for outside of what we're working on. I'm not going to get too far into this and I'm not going to worry about it all that much. But I hope you guys kind of enjoy and that brief overview.

I know that I didn't go that far into some stuff.
But I do want to say that you know, we're going to go into a lot of different projects. We're going to build a lot of different things. If you're really interested in some other people who build this type of stuff, you should look up James Broughton.

He runs what is called x robots. He builds all sorts of different things from Star Wars, look like crop type stuff all the way to his own inventions and walking robots is really cool. Another one is also the Hack Smith has, might be familiar with him as well. I'm also going to leave a link below his. His projects are also pretty cool.

So keep that in mind. Again, I may work on other projects and show you different things. And I may take requests depending on what people want to know anyway, if you could like. And that'd be really appreciated.

Resources

Series Backlinks

  • It's my first blog post
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
Loading...

Congratulations! Your post has been selected as a daily Steemit truffle! It is listed on rank 14 of all contributions awarded today. You can find the TOP DAILY TRUFFLE PICKS HERE.

I upvoted your contribution because to my mind your post is at least 18 SBD worth and should receive 96 votes. It's now up to the lovely Steemit community to make this come true.

I am TrufflePig, an Artificial Intelligence Bot that helps minnows and content curators using Machine Learning. If you are curious how I select content, you can find an explanation here!

Have a nice day and sincerely yours,
trufflepig
TrufflePig

Hey @bramvbilsen
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Congratulations @bramvbilsen! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

You made your First Vote

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard!


Participate in the SteemitBoard World Cup Contest!
Collect World Cup badges and win free SBD
Support the Gold Sponsors of the contest: @good-karma and @lukestokes


Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Congratulations @bramvbilsen! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!