Learn to Build Advanced Embedded Systems using Arduino | Amit Rana | Skillshare

Learn to Build Advanced Embedded Systems using Arduino

Amit Rana, Engineer, Programmer and Trainer

Learn to Build Advanced Embedded Systems using Arduino

Amit Rana, Engineer, Programmer and Trainer

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
64 Lessons (6h 48m)
    • 1. Introduction

    • 2. Embedded System Lecture_1

    • 3. Embedded System Lecture_2

    • 4. Embedded System Lecture_3

    • 5. Embedded System Lecture_4

    • 6. Embedded System Lecture_5

    • 7. Embedded System Lecture_6

    • 8. Intro To Arduino Lecture 1

    • 9. Arduino LED Program Lecture 2

    • 10. Arduino Simulation Lecture 3

    • 11. Arduino Vs C Differences

    • 12. C vs Arduin Differences

    • 13. Breadboard

    • 14. LED Chapter 1

    • 15. LED Chapter 2

    • 16. LED Chapter 3

    • 17. LED Chapter 4

    • 18. Buzzer Chapter 1

    • 19. Buzzer Chapter 2

    • 20. Switch Interfacing_1

    • 21. Switch Interfacing_2

    • 22. Switch Interfacing_3

    • 23. Switch Interfacing_4

    • 24. Serial Chapter 1

    • 25. Serial Chapter 2

    • 26. Serial Chapter 3

    • 27. Serial Chapter 4

    • 28. Serial Chapter 5

    • 29. Serial Chapter 6

    • 30. LCD Chapter 1

    • 31. LCD Chapter 2

    • 32. Concepts around keypad

    • 33. Analog To Digital Converter Chapter 1

    • 34. Analog To Digital Converter Chapter 2

    • 35. Analog To Digital Converter Chapter 3

    • 36. Analog To Digital Converter Chapter 4

    • 37. Analog To Digital Converter Chapter 5

    • 38. LDR Chapter 1

    • 39. LDR Chapter 2

    • 40. Ultrasonic Chapter 1

    • 41. Ultrasonic Chapter 2

    • 42. DHDT Chapter 1

    • 43. Relay Interfacing Chapter 1

    • 44. Relay Interfacing Chapter 2

    • 45. Relay Interfacing Chapter 3

    • 46. EEPROM

    • 47. DC Motor Interfacing Chapter 1

    • 48. DC Motor Interfacing Chapter 2

    • 49. Servo Chapter 1

    • 50. Servo Chapter 2

    • 51. PWM Chapter 1

    • 52. PWM Chapter 2

    • 53. PWM Chapter 3

    • 54. I2C Chapter 1

    • 55. I2C Chapter 2

    • 56. I2C Chapter 3

    • 57. I2C Chapter 4

    • 58. RTC Chapter 1

    • 59. RTC Chapter 2

    • 60. RTC Chapter 3

    • 61. RTC Chapter 4

    • 62. SD Chapter 1

    • 63. SD Chapter 2

    • 64. Conclusion

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

The super simple and beginner friendly course to learn about embedded systems development with Arduino and C Programming

Are you passionate about circuits and coding?

Do you want to learn Arduino faster than ever?

Go on…

I firmly believe that anyone, irrespective of experience, age or technical background can learn and experiment with technologies. With the single goal in mind, I've created this Course on Embedded Systems designing with Arduino.

And I also believe from my personal experience of more than a decade, that

LEARNING should not be LENGTHY!!!

My purpose is to get you started quickly with Arduino and start programming and making systems fast, with less learning and more experimenting. Hence the course is divided into small chunks which you can jump directly at any time and learn any particular module you’re interested in.

You’ll download your first program into Arduino Board within 30 minutes of starting this course

Arduino is probably the number 1 microcontroller board used today in the world in a variety of industries , be it for prototyping the new product or just creating a hobby project for your home. Arduino is no 1 choice of many developers as well as hobbyists. And this course is to make you an expert in Arduino. Yes you've read it correct, an expert!!!

This course includes many interfaces starting from LEDs to I2C interface and memory card data logger. See complete list below

This Course is suitable for Everyone Including:

· Complete Newbees

· Arduino Hobbyists

· Students (School / college)

· Working Professionals

· Retired Personal’s seeking interested in DIY hardware

This is a complete course on learning Arduino Programming, interfacing and creating projects using Arduino with more than 30 different project and tasks included with this course. Everything related to Arduino programming and connecting various interfaces with Arduino is covered in complete details, yet the course length is such that anyone can finish it within a single week.

This is a complete hand on driven course with more than 30 different programs/projects to be done throughout.

You can enroll and start experimenting with this course even if you do not have Arduino board!!!

Yes, I’ve included steps and instructions to use a free online simulator for Arduino where you can perform most of your programs, so if you don’t have Arduino board, or just planning to purchase, you can still enroll to this course, start learning and gather your hardware later.

List of Hardware Interfaces to learn

  • LED's

  • Switches

  • Buzzer

  • Relay

  • DC Motor

  • Servo Motor

  • PWM

  • Analog Input

  • Voltmeter

  • Thermometer

  • Light Sensor

  • Temperature and Humidity sensor

  • Keypad Interfacing

  • Ultrasonic Distance Sensor

  • Serial port

  • Liquid Crystal Display

  • I2C

  • SPI

  • Real Time Clock

  • Memory Card interfacing and data logger

  • Usage of EEPROM Memory.

You're also going to learn about

  • How to use breadboard

  • whats the difference between C and Arduino's C programming

  • Simulating Arduino using online tool

  • Project Making Tips

Anyone can not only learn but excel in arduino and hardware project making

Don’t get overwhelmed by the long list of interfaces to study. All of these are included to make you an expert in as less time as possible. Although its an advanced course, its equally applicable to everyone. Even if you’re complete newbee who’s never done coding before or never seen or used Arduino, you can still join and start experimenting.

All the source codes are included in the downloads area of respective lesson so that you can either try them yourself or just directly download them and start using.

I’ve been training and developing Arduino based systems for about 10 hours a day for more than 10 years, I’ve trained students from age 7 to 70 and have trained more than 10000 students from over 65+ countries. So when I say you can learn and excel in Arduino in quickest possible time, I mean it.

Enroll now and start experimenting with Arduino!!!

Meet Your Teacher

Teacher Profile Image

Amit Rana

Engineer, Programmer and Trainer


Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Your creative journey starts here.

  • Unlimited access to every class
  • Supportive online creative community
  • Learn offline with Skillshare’s app

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.



1. Introduction : Hi, Dad. My name's Medrano on an engineer programmer developer Stanton. I firmly believe that anyone can learn and experiment with technology with proper guidance and the right truth. This course is about advanced and very insistent development with, you know, microcontroller. This is an advanced level course, because the number of interfaces which you're going to study with our, you know, is huge. At the same time, this is also a beginner friendly course. If you have not done anything with respect to our you know before, it's completely fine, you can jump start with this course and create your first program and upload it onto the board within the 1st 20 minutes off, citing discourse. We have included the interfaces such as inputs outputs led its switches, really, Then buzzer sensors and logging putsch. Analog outputs are, which is also called disputable, then serially profess the number off a digital sensors like an ultrasonic sensor beach to censor. Then I two separate upon SP I protocol and in stick our detail over an RTC won 307 real time clock. The number of intra processes huge on that is why it is sit as an advance embedded system scores. Even if you're a beginner, you may be able to jump. Start with creating your projects with this course. The objective of this course is for an apple. Every man be the student up blocking professional or even a retired person to start creating the popular ships. Electronics projects are are little projects for consent and growing up and start experimenting with are you Thank you. 2. Embedded System Lecture_1: hello event letting us started with Stinney off embedded systems with Audino. Now, I don't know how much idea you have about embedded systems and not on. That's what decision is particularly dedicated to the discussions about embedded assistance . So next begin not to begin with it. I would like you to give a simple scenario there. I'll be giving you some choices to choose from, so just listen to me carefully. I don't know who you are, but assume that you are a university student and you're starting somewhere. Mobile phones are completely not allowed into the campus, so just keep it out of the question. For now, money is not a concern for you because considered you are a very good student on money is not a big thing for you. You can just have any any kind of money and you can buy anything as you want on. You have a very tight Chilean from morning nine tooling seven every day except Sunday. It's also the days are packed for you. No, In this case, if you want toe, listen toe some quality music for some time for some breaks that you get in between the lectures are when you goto by your grocery or venue of when you buy some essentials for you on Sunday or anything like that. If you want to listen to quality music, what will you buy out of this tree choices First, a cassette player. Second an MP three player, third electoral elegant Tell you cost our money is not at all a problem for you. What would you choose now? Some off. You may definitely say laptop some off you miss it and pick Ripley Castle. There is completely out of question for now for symbolism, because castles are no better. But still, if you had to choose Castle clear, why wouldn't you do that? See, Massive Player is an analog technology. Where the kassid rotates, it drops against a Naylor to magnet, it completes a circuit. And somebody who is generated in comparison to CASS a player, a digital sound file or MP three file generals are far superior quality off are you? So first thing off First grade area off your choice, its quality because the quality you want to discuss it clear. But you will should something between Olympic trivia render laptop now talking about the quality itself. Will MP three player provide but regulated and laptop? Or was there some? I don't think so. Both of them will give you a similar kind off audio playback. Now the price is a bit difficult, and many people at this moment, if they know that the only purpose is to listen to music and nothing else, then they will definitely choose what MP three player since logical via now. Once they're done with the cost, what is the other factor? The most important factor. No guns is sites, even though I am a super rich person, and I can afford a laptop just to listen to songs. But I can't just put it in my pocket and just roam around my campus by listening to songs I can't I just can't do it because of the side. Sconce trench and bitter players are small, slick fits in your pocket, and you can carry it anywhere very easily. Another constraint, I would say about from sides aids again that storage Now here, MPA tree and laptop are comparable to each other, so MP three has ample storage for storing songs. Laptop also has much more storage, but they're both comparable with each other where they differentiate mostly its size and cost. Not even the answer Burridge. I will definitely mind saving some amount of my money by simply buying an MP three player as compared to a laptop. And lastly, and one of the most important one is part consumption. A sandwich iPod that you can use our A normal MP three player. Whatever you buy from will definitely give you at least 9 to 12 hours off battery backup, whereas the laptop can only give you 3 to 4 hours of better America. Now I know that because of the vile phones, all this comparison is useless. Mobil's can give us and poetry they last for 24 hours and so, But the consideration is purely considering a scenario where you're not allowed periods. When that's I told you before, and I am eight doing this competitors in because I'm trying to compare two major things one in scored as a computer, and another one it's called adds a system. Now the beauty off this system is it acts exactly like a computer. It has exactly the same level of accuracy off reporters in the EPA to file it exactly performs like a computer itself. The reliably day, the accuracy. Everything is like a computer, but it is not a general purpose computer. What it is them. Yes, it is an embedded system. That's the point I was coming on to. And that is the reason why I gave you so much example. An embedded since Stream is a kind of computer system itself, which is smaller insights lesser in cost, and it is designed to perform one particular dusk only. Of course, there will be related tasks like in particular can also record audio's. It can also play the FM radio, but the major job is to provide you with a decent experience off quality music that's a laptop is designed to do a lot more things here. A laptop is a computer and MP triplets, an embedded system original is blocked off and embedded. Sastri is like this, which shows that the central part off this system is always a central processing unit. Remember, I just went to say, central processing unit in purely technical Trump's I do not win Micropal Sister, I do not mean microcontroller. Nothing. It's just a processing unit. Then what an embarrass system may contain it. Make until inputs inform off sensors or some kind of human surface like switches or keyboard or button. There may or may not be an analog. Traditional convergent may or may not be our digital to analogue conversion, but there it's some kind off output. The generator, which will either turn on some actuators, are produced that output from speakers display a petition off motor turning on off device. Anything that can be anything. All the blocks shown here actually are optional. They may or may not present. There may or may not be a feedback from output. Going to the input there may or may not be an electromechanical backup and safety system. The only one thing that will definitely be present return embedded system is this dashed part, which is called It's a soft drink. So this software will definitely be deciding and say this CPU on. That's the General Islam Bagram off embedded system. So it's just a computer system, which is artistic. Few inputs, outputs, and then they did some piece off processing. This processing will accomplish the job that has been given to it. For example, if I'm just using a temperature controller that the imports of the sensors temperatures answer. There will be some kids to say this eight point at the airport friend there will be a display, and there would be a really to power on and power off, particularly ways. That's a basic and the most simplest example of embedded system that is temperature controlled. So this is a generalized form off embedded system in the next video, what we'll do is we'll take a close look at again. One more example of familiar systems and how we do make yourself microprocessors and microcontrollers in embedded system that's watching this video. 3. Embedded System Lecture_2: Hello there while dismissing the embedded systems. Let's take another very simple and classic example off a coffee wind ignition. Now one of the parts of offer ending mission. What are the basic or general parts of bigger parts? Off cough winding mission. First of all, there would definitely be a water tank where we store all the water and there would be another container. Very. Restore the flavor about, like, say, coffee or tea or something. Definitely. Then there would be the voter hitter. There would be a temperature sensor unless temperature sensor we won't be turned off the heater. So temperatures since it has to be there so that one particular temperature of an attendant we can turn off the heater. Then there would be a motor, which will act a threat. A stroller on mixer for this coffee meaning mission, which will properly mix the hot water and the flavor bolder with each other. Then there would be a dispenser hole through which the coffee or the tea or whatever hot liquid or liquid with Rick Prepare would be dispensed. There would be buttons for selection. Let's say if I'm designing a coffee vending machine to dispense four different flavors. Then there would be four different buttons so forever, but expressed that particular flavor off Coffee will be dispensed true dispenser of all for a particular number off second so that fixed or literal minds amount off quantity off the liquid is dispensed. Actually, this may or may not contain a display, which will show you are welcome message on a number of different things like that. So marrow transplants are welcome message or choose your flavour. But if the machine is down, then the display V show are the machines and remain tin issues it after some time and so on . Now this is the most basic and the simplest coffee vending machine. If it is an advanced version, it will also have a coin except er unknown except ER, which Canara politic money and dispense the coffee. Now consider that we as a company have to design this product, and you want to sell it into the market. I have two options to create this kind off coffin languish in first, and the most classic approach is toe make yourself and along in digital circuits in combination with each other. Like Pam's sensor processing issue Children a local murder and look traditionally converter than digital circuits. Counters flip flops. I can definitely create this kind of coffee vending machine by simply isn't analog and digital I seeds, electronic components and all the sockets without using any micro persists or microcontroller. That coffee vending machine is definitely possible. But then, what are the drawbacks? The very first drawback is the process itself off designing the coffee vending machine, which can dispense a particular liquid for particular number of seconds. Turning the ball on and off at the right times, then handling the mixing, the temperature controller part, the hitter part correctly. Everything. Designing off all these elements using basic Elektronik sockets would be definitely possible, but a lot more difficult and time consuming process. Second, the modification off any such knowledge. Say, if you have designed this coffee and ignition and tomorrow gets an order from a company who say is that you have created a product with four flavors, but we wanted to get five different flavors in a much compact sites would be difficult for us again. If they did, somebody worked. We would have to think with normal Development team and then again have to sit. Sometimes we make it a customer who says I want 1000 missions, but I just want a single flavor off, which then definitely again really have to Revis and all the soldiers and make it short so that it can only serve a single flavor. This is again one more drawback, but the biggest Rebecca's this If, for example, we as a team. As a company launched this machine today, the very first customer of this machine would be a competitors off hours. Who will spread up on the machine? Did the circuit out? Look at all the isis and companies that we have connected easily replicated that bore and create a coffee vending machine off his own. Maybe he'll get manufactured from somewhere else, and he might even sold it cheaper than us. Protection off intellectual property is definitely not possible with the basic electronics or the bear electronic sockets. What is the alternative underneath you is by making us off programmable system are programmable. I see our religious colleges and option is to created using an embedded system. There we will use a computerized center, persistent socket, so to process all these things, there will be an additional elements called microbe in to live on My Purposes, says something which will do all the processing and everything would be program. So it is very easy to resign as violence. Mortified if someone tells me I want six flavors will just add six input buttons, six output livers, the respective arrangement in the mechanism. Understand? All we need to do is we need to change the software in a buried system. So addition off new features are from all of the features would be easy. Let's time consuming there by much beneficial toe overall cost. Lastly, DYP it's purely protected. So even if a complicated buys over machine, they will look at all the important or put circuitry. But he won't understand how is exactly happening the things how what is exactly happening when I pressed the switch and then some liquid has been created and then dispensed off course. If my competitors nose embedded programming, he will live live here or his own system. But at least we can make sure by protecting our I p, that complete nonsense person or a complete illiterate person will not be able to copy our system if someone is having that much intelligence are that much team effort to have a knowledge of microcontroller on all those things. They were probably not even going to this mess off. Buying my machine on insert politically designed his own mission. So because of these reasons, it perfectly makes sense to make yourself a computerized embedded systems to develop off the vending machine and for that sick, any kind off electronic system. Now what is therefore is made using microcontroller on my carpet schism. There's a tiny processing element in number of the French casualties that we use were literally surrounded by guy just disease. Even the health tracker or the fitness man in your hand is an embarrassed system in violence and embarrasses will be literally surrounded by ambulances, since this is, and most of them do make yourself a microcontroller, best embedded circuitry that's watching this video. In the next video, we'll continue our discussion with the microprocessors and microcontrollers comparison. Thank you 4. Embedded System Lecture_3: hi there. Now that we have established why we need to design a metric systems using programmable elements Mexican. Look at the elements actually used as a programmable chips in embedded system. So there are my Kopassus is there are micro controllers. There are pl leads or programmable logic devices like F g R c, P L E and latest. There s all seeds on system on ship. We are looking at the image systems from a business perspective and therefore we will skip DPL days and system on ships from our discussion and self. Now we'll just focus on Michael wants to send a microcontroller on which one we're going to use, and we'll try to justify that. So let's see. My criticism is a general purpose processor. As you might know, if you don't know that existed and liberals per sisters, what it means is, if you have seen the list of computer that we use, it employs a micro processes. Um, so there is a very big socket there, The microsystems six and onto the circuit. There are a number of different things connected, like there is a round shape. There is Rome shape or their around chips. There are storage hard disks, their ireports. There is USB serial port, parallel port on audio jacks, a number of different things. The video port is there time where I say's serial communication ports. Whatever communication nowadays, land, port and number of different ports Soucy onto that board. Why we call what we call that board is a mother butch. And then to have seen a mother board is bigger and many a times expensive vendor city or the microbes is itself. What I'm trying to say it. CPU is generally used to create a computer system where you're supposed to do a number of different things apart from one dedicated tough, so I'll lose it for recording videos. I lose it toe download programs into my microcontroller. I will use it to create graphics. Emily Was it to browse Internet? Send emails. Want you to watch Netflix videos. Number of different things on That is the reason the CPU is a complicated system, or the computer is a complicated system it across all the things which needs to be corrected externally, although this is the fact the microbes themselves are sometimes used to create the embedded systems as well, take the classic example of your A T M machine. A T M machine is built it the computer system inside, and you're not supposed to play games. So tell by the way, what is the next time tonight, apart from the microprocessor, there is a micro controller and violet prefer migrant owner. The reason is very simple. All the sockets, which you need to connect externally to microprocessor, are there already present onto the same chip on microcontroller. Definitely. Now the amount of RAM are wrong or timer our airports or serial port. Whatever it shone onto this block. Bagram. The amount in which this features will be present will be less of because it is all existing on a same icy off the same chip. But then the benefit is as we don't need external hardware and as we don't need external mother. But the cost is reduced drastically drastically, and that ship becomes completely suitable for small applications are for simpler application. Now let's consider of temperature controller. What is the price of temperature controller enemies? That is expected. If I talk in terms off US dollars, then it should not be more than 10 to $20. In India, we buy temperature controller. Starting attributes 304 105 100 troopers. That's the Mexico State. That's and that's why it needs. It is built using microcontroller, which is having the minimum required features on ship, and it can be directly used inserting into the socket, nor amraam anything needed to be connected to it externally. The examples are a number of different microcontrollers out there. We look at them one by one afterwards, but the classic example is Intel Services of Ivan and the microchip speak. Then there came back Mills in here. Then act meant savior. A bill to the RD knows then loose simply a couple of years back. Microchip purchase the mail and now here is also developed by microchip. There the microcontrollers on. We are going to focus on studying the microcontroller for development off and bury system. Conventionally, the microcontroller programming are developing a system using microcontroller has a particular set off instructions decided it is dedicated. Lee used for Elektronik. Scintillating people are it is meant to be done by electrolysis injuring people. That's a Lady Sander former, so we'll just call it electron. ICS are computer, but no other people would be able to study microcontrollers. It requires a deep understanding of the microcontroller prediction. It makes you to have very sound programming knowledge, using any programming language apart from sea or member assembly. It was special sockets like development boards and programmer for using it on. It is definitely not certain for those people who do not have background off electron ICS, our technology, so generally a microbe internal study involves the entire study off the architecture, the instructions, how to write, does instruction, how toe create a program out of those instructions and had Then how could down load that onto the controller and then doing on the steps? What happens is all these things blocks a non science background person from entering into the microcontrollers feet and find they're going to struggle. Only know is because of the same reason. The main purpose of development. Ordina itself. Forced to allow anyone to be able to write down programs for microcontroller. Stay tuned. We'll see all the details slowly, even by one in the subsequent videos. That's college in this video 5. Embedded System Lecture_4: Welcome back to Discourse. Let's see, we have discussed about the micro controllers and micro buses comparison, you know, Let's again take the example off the temperature controller If I had to create a temperature controller. Is it microcontroller? What are the things I need to do in terms of programming? Mammoth controller I will have to use an I. D e or integrated development and homage. Do I know my microcontroller program? I didn't see language or assembly language. Then, using the same i d. What I do is I will have a gel it a dot hex file that is a standard procedure for programming microcontrollers. Then I will have to use a dedicated device programmer hardware, which will anabel this X Files to be downloaded onto my microcontroller in terms off big Magadan Turner. There it's picked it in terms of a beer micro grant owner, David Xavi Arise scheme, kid to a year dragon or there are many open source for members. Also, once they have a dedicated remember hardware, you will also need a dedicated programmer software. As I said, if say you're using pick, then pick it too. Has its own software and remember this software is different than this i, d e unit to use and irrigated software to download a program onto microcontroller. Then using that software and expel you have created onto the PC, you will born the X file into the microcontroller, then inside that microcontroller into your system and then use it. Overall, the process sounds interesting, but definitely not easy. And that doesn't as I told you before, it blocks people from non technical background from entering into the spate. Now this is a dull procedure off using microcontroller. Now let's turn our discussion a bitch towards our deal. Oh, like why are you know and what is the difference with Arbeloa? So what happens? In a normal scenario, any student gets completely stuck get stuck at this point because he has to create a project which is to be built using microcontroller, he has to understand the microcontroller architecture. He has to understand the assembly or C language. Whatever the interfacing of different courts, he also has to create his or her own project hardware. The PCB made to arrange the programmer on do a lot of different things. Then animator system has to be designs the problem for a normal student are even if I don't call student harvest on anyone who is not from technical background also is that person doesn't know anything about any of this thing. So it is our conviction. What is the hardware? What is the programmer? What? It's what is the C language? What? Is there simply language for it? And exactly to address this problem Are Dino Waas invented? What are, you know, basically is it's a microcontroller board. It is beach around open source hardware concept. It doesn't mean that they just provide her leaderboards free, of course. But all the schematics, all the layout, every descent filed with which are, you know, board its creator is available for download freely so that you can create your own world. Also secondly, the RD know when developed, it wasn't microcontroller board and along with the microcontroller board what? The date where the developed an i. D. E. R. A computerized open source software Also which is on several leads, are, you know, in which you can write down program for our you know, and that's after is also free. Unlike other microcontrollers I ve is vision it so it purchased Are, you know, provide Since the freedom off having open source hardware and free open source software that can be downloaded free off cost from their official website are, you know, is a very flexible and easy to use hardware and software combination. How, uh let's see the concept of hard in of itself is that whenever you want to create any particular project or any particular embedded system, then instead off using a microcontroller, I see and doing all this complicated jobs by yourself the are, you know, terminology or philosophy essays, instruments in the microcontroller directly use that they really available bold. Okay, it you're embedded system. That's how it works. So instead of a microcontroller, all you need is just in our little board. It has all the required things which is needed for their pressure creation. We look into the details off the board slowly in our next video. The shortest of our you know is it was developed in 2005 in Italy. It was basically creative as a multi disciplinary project work. It is a very simple to understand hardware on because the hardware and software both off which were made open source around the world. People started using our dino and a wave off open source community started to flood in because I do know what such a beautifully designed, easy to use microcontroller board and it was almost free off course, given to everyone except the harder cost. People started creating number of different projects. Sammartino and they also started posting their projects onto their websites on their blogged and number of different places with started creation. Off a lot off pre compiled libraries for number of different advance interfaces because it's starting to do is a microcontroller unity. Is this temperature sensor that kind of compass I to see bits device a spy base device you need? Oh, Elsie leads to be driven TFT display distribute driven. There are hundreds and thousands off interfaces for a microcontroller because I hardly know what happened. What's People started using their own application area interfaces with hard, you know, they're started creating courts for it, and then they will start doing it to publish it to the public. Now what is almost for every single peripheral? You will definitely find an argument office in court onto the Internet, and that's the beauty off the Arduino hardware. It is a beautiful, smart projects to standard products, and it is built using eight. Which a VR families RISC microcontrollers aviaries, ak mills, micro control of family. Now I don't know. Microchip has been taken over the act men, so it's no more active Bellavia. It's called us Microchip here, except in which this kind of picture that was the microcontrollers built and the next video we'll see. How are you know bold is built around the savior microcontroller and how we can use it and how, actually simple it is what we're saying for such a long time. Let's say all the details of our, you know, in next video that's watching. 6. Embedded System Lecture_5: Hi there. Welcome back to our discussions. Over millions assumes with are you know on enough off discussions about our you know, Let's just get directly jumped over to the board. What you're looking at is the RD knows you know, which is their flagship product are most widely sword most widely used Microcontroller board. This is our me. No, no, no. Let's look at it. What it consists off it is having the size off. Hardly a bit more than our normal size credit cards. What are all the things? Presenter? There is a USB port here exhibited connector to which you can connect the USB cable and directly connect your board with your PC if needed, you can connect external power over here through this disempower check. There is a world is illegal Iran ship. Then you can see crystal and some smaller electronic circuits or components on. Then let's sick of our attention to this main I see. Which is the microcontroller board or microcontroller chip? Are you know you know is bait around at mega 3 to 8 microcontrollers. You don't need to study the detection of this microcontroller in order to study about cardio will definitely go into the details at a later stage off. What are you know at Mega 32? It ease and all. But as of now you don't need toe. Get into the details of microcontroller to use it. But you need to do understand is the pins as against E on two sides on the top said as a less. On the bottom side of this board, you can see a number of different pins taken out for interfacing. These have the connectors and there are pin numbers written below it he owns. Now, if we are slightly aware off the architecture er, then you might know that the general purpose sports off via microcontroller are liberal. Let's port a port, be port, See? But here you won't see any such name. And still you just see pin number zero The number one, 23456789 10 11 12 Talking So 0 to 13 a. Some off total for 10 pins and then a zero to a five total went totally for first sixpence . So this 14 and this six total 20 pins are there to argue. No, no, no which can make profits true external signals. Entities such as sensors, number of different things about From that disconnect, it is a power connector. Whenever you're interfacing with external circuits, you can connect V in. Over here, Vienne means nothing. But if you are using this external voltage input pin, if I have a nine volt adapter use then that nine hold will appear here. If I have 7.5 world adapter used that will, this will appear here. If I have a 12 volt adapter, use traveled will appear at this point. Then there are these two ground pin connections. One, it's five connection. If external socket needs the regulated five volts supply that can be obtained from this five help in. There is also a very small 2.31 regulator primarily used for the U. S. Will professing. I see off our dino. So that three point table it is also available over here the microcontrollers that is set up in and this is reference hold. Richman's are available at this point. So this is a day gentle introduction of the Arduino board. Merrick Self, this is the reset switch over here. And this is the SP I pour off our dino present over here. What it does we'll see when the time comes. But this is how they are. You know, hardware. It's this is the U. S. Mint office and I see which connects this microcontroller to the computers. He was report. Now we have been saying that programming using our you know is easy programming is inordinate is now let's say what exactly in see it, it's This is how they are doing a program. It's generally so It's a C program. Our dino has created their own i e. Where you have to create a C program, but that several Graham has to be between this true board, it's what it's called as words set up another one. It's called us for a look. Whatever Piece off course, you want to be executed only once you will like that inward set up and whatever bits off court you want to execute repeatedly on in any finite Lou, You like that court involved. Loop that somebody. Is that so? If I have to just make a particular pin go out, put our makeup, articular pin work and output, Then I need to do it or live in. So I'll just write that line in words set up if I want to make that particular pin high, low, high, low, high, low infinitely that I will write in Voyage Luke. 7. Embedded System Lecture_6: So that's about it, for we are little board. In the next video, we'll see how we can write a sample software for this board using this structure off programming, and we'll try to blink a single lady and try to understand how to read on the program for it. Thanks for watching this video. 8. Intro To Arduino Lecture 1: hi there in L. A station we had seen about the Arduino board, but that it spends on how we can have a bearable program for our dino. So let's continue the same discussion and let's try to write down our first program for our denying decision. Let's begin, says Nancy, Are you know you know has got zero to talk in a total of 14 pins on this side and a zero to a five total off sixpence on this site. All in all, we have total 20 pins, which can be used as a digital i O or digital input as a less output. Plus a zero to a five are the pins, which you can also use as an alarm input. So all 20 of them can be used as digital ill, and its expense can be incense and long inputs. Now, the very first program we usually do with any embedded systems study or any microcontroller is the connection led to a particular been off the microcontroller, and then we try to make it on and off, which is also called as the hello World Program Off embedded system, which is led blinking, so we'll do the little blinking program now for our you know, let's look in. So this was the bare minimum court. We had sin. We also discussed plus in last session, that void, center and void loop are the two main bodies where the program for our dealers, written on the only cord that is needed to be executed only once, is stupid and then set him on the court. That, designated to Britain reputedly, is to build it in In what Look now consider that I haven't already connected to a painless sipping number 13 on our you know, so that led will be connected to pin number 13 to register toe the ground that so you can connect and led to pin number 13. If we have toe, make this particular led go Hi, Lou. High low on Simply Blink facility, then what should be our program? Let's look at this coat. What is the first line of the scored inch led is going through tartan Mince. We have declared an individual whose name is already the value. It's starting. That's about it. Lord Center, what we have done Inward Center been more a little coma Output boy look digital rights led comma high daily 1000 digital. Right? Led Khumalo Delitos. Now tell me in order to make some guests out off what this program is doing is it needed that you should be from technical background? Are you should be an engineer. Are you should be a science student? Not at all. Why? Because things are very simple. Registered forward, isn't it been more energy? Comma output? Well, simply do what will make this particular tuppence more said talk. But what is that? Finality Tartan! And that's about that zonal. And in set up what we're done in look digital, right Lady Khama Hye Min's digital valuation of Billiton on this particular pin What is that value? High really? 1000 Digital, Right, Lady Khumalo Delitos um so digital right Highwood Britain. And then a delay off 1000 units Women taken then love level Billiton! And then again, a daily off 1000 units. We Britain, we don't know. The unit says off now, so let's understand that this unit is nothing but micros milliseconds. So 1000 milliseconds after making the already high and 1000 millisecond after making an led blue. Now we don't know what is high and low. Actually keep in mind our, you know, walks on plus five volts operating supply. So I don't give it from us. We ought to give it from the sea. Check the whole operation. The microcontroller works on bless five foot. And that's why when you write down high our logic high onto any pin, then plus five old appears onto that been. And then you write law, then zero hold our ground potential appears onto the pin. What is four level then? Drew is this line will make the lady go high, are led, will turn on after insulation off this line. Then the controller will wait for one second and then the next line will make the led go low or simply turn off the lady and again with for one second. But after that, the court is a genuine loop. So after the last lands execute er again, the first land on this look may be executed. How long this will continue forever. This is an infinite loop. And after execution of this score, this infinite loop will execute forever, making the lady go on off on off after every second. So that's about it. That's getting certain or the first blinking program off, you know, and I'm pretty sure that there is more technical knowledge required to understand this much amount. Of course, in the next video, we'll see how we can actually write down this program on our dino software, and then we'll try to download that into the Arduino board. So I have an Arduino board over here. If you can have a look, may not be that clearly visit me, but yeah, I have an Arduino board on which you're going to perform our experimentation. So that's watching this video Surgeons in the next video will install their dear oh, softer and do this program toe download onto over make love each other. Thank you. 9. Arduino LED Program Lecture 2: Hi there. Let's get started with programming the Cardinals in actual and in order to do so, we need to install the Arab in a softer or they are, you know, any E? Let's go to the Cardinals website that is, are doing no dot sissy. There's official homepage of hard, you know, here you have two options off using the software one day visit on land. Compile. Um, and fellas, you can download the software onto a computer and install it. We prefer downloading this after onto the computer and installing it off land so that were not limited to Internet connectivity in order to use owner do little damage. So this is the website. Maybe over the period of time, the look and feel of the said will change, and for sure it will change. But one thing is sure that somewhere in this after our Lord section, you will find out the already knows. Downloadable software so soft turned down lords, as you can see our November later, are downloaded the or Denoix de. Based on your operating system, either Mac Ardley, next different versions or windows, you can choose which one you want to use. I mean we're not stand, so I can. Also noted directly from Windows Store, are in a conventional way. Just download the installer by clicking this button so it will down or the windows installer. If you want, you can contribute something to our, you know, being open source are just get on, just don't know and it will start downloading the software for you. So then this offer is downloaded. What we get. It's any exit file. Notices of indoor specific instruction on black on leaders and sections are different. So what you get is any exit file by double clicking, which you can install the ordeal a softer onto your computer. Remember when our dino softer is being installed. Make sure you install all the related drivers that asks, well, installing. So I'll just begin the installation. So I didn't virgin. Important Pernetti is already in stolen must be and installed before you install the surgeon. So I have the original really and started. That's I'm getting this message, but you won't get this message. All you need to do it's a wreck, the location and just keep on clicking OK and next and our dinner will be installed on your computer? No one's artisan start. What we need is, are you No, no, no board. So that is our, you know, no board. As you can see, I just do one thing. I dragged this video use. Okay, so there's already no no board. What you need is a USB cable which gets connected into the board here, and then you need to connect it to the computer. So that's the Borj, and there's the cable. Now this cable gets connected to the U. S. Report off your computer. And if you have installed the drivers correctly, the board we've been detector in the computer on windows. Let's see how we can see it. Just click on start menu and just state device manager in the device manager window. The ardent aboard will be seen in Port Section Or do not know if I remove this board. Then there are, you know, you know, it's disappearing from the clues and that's Eliza collected. You can see it back there, Cindy. Now what? We need to do it. We need to open their dinner software. You can also see. They are you know, appears. Anscombe. Eight, you need to remember this number because there is the same thing you have you're going to use when you're downloading the program onto the arguable. Once he opened the original, it opens like this. Usually a blank sketch opens. So what I'll do is elastic new And what do you get this word set up and would look, This is our vinos editor. This is the ADM failure or put messages or other messages will be split and simple minutes file edit sketch tools Help will get to know them one Bible first let's died. That core which made it so intended Izabal toe certain in order to make it more level. It just go to find but offenses. It's changed the and it was fun says tow it in so intelligence able to talk in. Then put your set up court here to done once been mode they didn't comma put and the here and I don't digital right. It's sort of taught in you can on you should actually use the name. Energy doesn't matter. You can use the pin number also, but the purpose of giving name itself is that you don't get confused if you have multiple number of inputs and outputs. Then using the pin number can confuse the programmer. And that's reveals this kindof means it's sort off. 13 will just use led, come out, put the natural light headed you gonna hire? Then I'll give the layoff 1000 milliseconds and then digital right already comma low and then deal 1000 milliseconds. I will save this sketch on libraries. Documents on here and create are, you know, copes. The beauty of it are, you know, is you don't need to save the program in a new file. So whenever you just save it in a folder by giving it a name, if I go into the folder documents, do you know courts, you can see a full that is by default creator and inside the foldable decides that you don't sketch five, which is called us or rituals, and I own no fight. The extension is not i n. Now let's get back to the court. So this is they are, you know, sketch. They call it sketch insert off a court or a text editor. So the court is written now what they have to do is go to tools. I said all the things will be clear to you slowly. I just want you to get started with experimentation fast that so I am just directly telling you how could download the program supported tools in the board's many select Are they know slash January? No, no, no Import section Select become H, which is where they are gonna port. It's or arguable disconnected. And then you just have a look. Simply click the upload button, remember and seen in this so presentation and led by default. It's connected to pin number 13 on every ardent aboard. So the experimentation core to blink an led connected to pin number 13 will broken very single rd notebooks. I'll just take this board in front off you holding it upside down, But okay, I think there's enough on, then. What I'll do is I'll just like this button over here. It reads. A floor after Gennep floor. You can see here some messages are arriving, compiling Skitch. Then program downloading instructions will also be shown here itself compiling sketch. After the compilation is done, it will rid uploading. Then similarly, blinks will happen on the board and then uploading. Now the program has been uploaded. Now can you spot an orange color and led being drinking? Yeah. So that's our program, which has been uploaded onto the are gonna bore, which is blinking. This led right over here. It's really off One second it's leaving. You can just make the changes. So instead of one second, it will blink with three seconds And just like this upload button over here again, the same process will happen. So compiling, sketch, uploading. Then, while uploading some ill, it is very blink onto the board itself. And then now the Emirates Lincoln way to the love three seconds. Exactly. Okay, Again Not needed to be three seconds like that are you can also take as low as 100 milliseconds and we can still you look at that court and see how they led. Is blinking that fast? I hope my camera captures it correctly. So that's the little blinking wit or delay off 100 milliseconds 100 milliseconds, 100 millisecond off in a single second. So in a single minute it's appearing smoking in this fashion. So that's how you upload the programs onto your Arduino board. Make sure you follow all the steps correctly and see if you are able to upload the program onto the board or not. Remember previously used to install your drivers for our dinner board. Now what is with the Aryan installation itself? All the drivers are installed, which immediately detects your board. Been connected to some kind off comport. So make sure you install the organo softer correctly by installing all the time this time fortune this video from the next program off from the next video, we'll see. Furthermore, experimentations, and we'll also see how we can compile this online to perform a simulation. Thank you. 10. Arduino Simulation Lecture 3: Hi there. In our last lecture, we have seen how we can get started with already know, directing down the program into its I d. And downloading that onto the board. Now, in this video, we'll see what to do if you don't have an ardent aboard right now in your hand and you still want to experiment. So first question is, Is it possible? Dancer definitely is. Yes, it is possible how you can do it there. A number of different cardinal simulative online as the less off land which you can use, I personally prefer the Autodesk stinker can just go to tinker cat dot com. Remember, Tinker Card is a pretty designing and 30 modeling software, but Autodesk was having Autodesk circuits before, which has been shifted to Tinker Card. Now, as off recording the scores, it is available, it tinker can in the coming times. If it gets moved somewhere, then just Google searches for Autodesk sockets and you will get to know the new location. Then what happens with tinkle can, as I told you is, but I'm really sitting reprinting activity or three d printing three d modeling software, but there is also doting kirkirt circuits present inside it. So what you have to do is just like on joined now Onda and create an account on Autodesk. By following the steps, I will just sign in to my existing account, which I have. Once you log into Dhingra, can you can see you differently? Can off course create really models if you want. True. But that is not the off course off our current discussion. So what? Our discussion currently is about sockets. As you can see, there are three dissents. Then their circuits scored blocks and lessons. So go to the circuit section and here you can see you can create new circuits and you can have different components like our Dino into it. So let's create new circuit here that's gonna be seen. A lot of different things are there, but you can use to create your socket. So let's just that if you take an arm, you know, and then just like shown before, what you can do is you can just taken ality. Remember? Usually on hardware, you have to connect ability, better register. But since I'm doing a simulation, the led is not needed here, so just kind of captured of the ability to ground and in order to start it, that simple and straightforward as that. Then that's how you just use that are you know, you know and then connected and led to which if you go to court section, you can see there is a block Best according structure presents over here. So either you can choose blocks, blocks plus text or simply text. I have an entire course created on bloggers programming. So this is an advanced programming course. We want to study everything in detail. So let's stick to the text escorting. So the same program is already little over here. Starting come out. Put that in common high 13 come alone with a daily. All you need to do is just click on start simulation. So they ladies on off, on off, on off. You can also see there is a built in led given over here usual so blinking. And if I stop the simulation And if I changed the Dele over here, then it again becomes interesting. No, it will bring fast. But remember, simulation had some limits as compared to hardware, so maybe it will not surrender completely to you or it will not look properly, do you? The island off moments says Right hander. Let's take a bit sufficient dealing with 300. So stocks a militia quite fast, and it's been simulated. Isn't it great to have a complete ideal simulative in your browsers? So this is how it goes. You can create the experimentation over here if needed. You can download the program here and and I Oh, no files will be downloaded, which will open just in an Arduino board. There are other features also like hiding some librarians debugging the core and select the board. Currently, only are you No, no, no. It's selected or only are you No, no, no. Its present that so you can just check the, you know, kick on the court window again and the court will vanish, and they will be able to use any different difference after this. So thanks for watching this video from any videos or any subsequent videos that we're going to do. You can either create the socket and program on hardware or you can also try to simulate them over here in tinkle Catch. I hope you like this video on hope. You find it easier to experiment with our you know no one onwards. Thanks for watching this video 11. Arduino Vs C Differences: and decision we're going to see What are the differences between the conventional C programming that you might have a launch on the computers on What is the Arduino programming on? Where does it stand? So let's begin now. If you have done any amount off C programming are if you are even remotely knowing about this equality, then you must be familiar with the structure There we just hash include library something like a studio, not Etch. They don't The program in the body avoid me. And whatever is this is a good table off our sequel. Write all that down here into this too curly brackets. Whereas as we have seen in the last session in our you know, we don't do like this, we don't We haven't included any hash. Include, yet we haven't written. Avoid me instead, what we wrote waas avoid sit up and then void Luke. So there was no print if actually in case off are you know, I'm just keeping it year for illustration. So what we do here is we do something like more or something on here. What we do is something like digital rights. Are anything ignorant now what is the difference between these two things. First of all, remember the language is C programming itself. But the orbital folks have just converted it into intra fighting a single Wardman function . They have complex that they have just sliced that part in their compiler to be accepted. That still functions. So one will before it set up and one would be word, Lou. Now get five Atkinson, let me tell you, because before you know how people used to write down program in Embedded World was also exactly the same. So hash include anything that you need and then write down for men. And then whatever is the initialization core or what you might call it, has set up good what's supposed to be done here. And then when you want to start the men program, it has two wooden legs. So why one structure was very famously used because it's a constant search always remains true, and whatever is the executable. Ford was being written at this particular point. So this is also the same format which is being followed by many microcontroller programming even at this point and will remain the same. But what happens is many a times. Beginners find it difficult to write down, above even and water it down below. Valmon. What needs to be executed once and what next to be executed infinitely, are repeatedly they did some doubt in Indy programmers head, especially the beginning ones, and that is why they are doing it split into this, to Warren's words set up and for a look. Apart from that, there is no difference off course in our you know, you can have hash includes if you want to add any additional every or any building library on any custom and landed. So that's about the basic programming structure. Second thing is about the data types. If you have known about see good. If you have not known about see, just listen to this line on it will get more clear when we're doing the programming. So data David something which we use or declare while doing this, he programming in order to sell some piece of data. We also call it as a variable. Say I want to measure temperature that I want to save the temperature into some value or some variable on that variable has to be declared using some off the redefined or allowed data types basically data. That's just what let's say, if I declare carb temp, then it will do what it will locate a bit off memory inside the lamb off my computer for the variable time. Now that is a did it. So if you declare something as inability, then it a locker. It's 6 10 with space for that particular variable called Led Inside My Exam. So that's the data type, and there are no more bigger Let's and see. These are the data nights, which are provided by our dino, so the inch it's still Bateer on computers here. In this discussion our computers are below. When you're talking about C compiler regular C compiler, your computer is actually the pink in process. Our aim, the persistent, whichever you're using, which is much faster on much bigger picture than argument are tonight small a bit controller. So the variables are according to that aid, with only some bite isn't a bitch. Cat is in a bit and sent carries in a bit. Carrots change and center, of course, is unsent. Similarly, word are inch of 16 bridge, usually on computer programming, language, word and up to two bit ones. But here they're six in betweens. Then send longs there, which is targeted with insane. Later. I long is there, which had signed it today, and flute is there. So these are the most popular and most commonly used data types can see as villas in our you know. But in our you know, the definitions are a bit different by the same carrot. Same but inch on some other data types lend may be different. All units as ill, most of dance. What we do is we either make use off cab. Our inch are long are flute. This is just to demonstrate the similarity. There is no big difference between embedded C and the regular C programming language that we use on 12 computers. The according structure is exactly like C, so there are far lobes. There is if condition there, Mr Lives, they switch straight. Man, there is fine Lew function president known and see pointers as you use and see added structures, unions, even the librarians hashing clothes macros, which you declare using has defined every single piece off the Kuban structure remains exactly the same. There is no change including structure. So whatever. If you have learned about, see before good. Even if you don't have land about C better, we will be explaining anything and everything as leader. But whatever that is presenting C programming is exactly present into the RV nobles. So there is no change in the structures. The change lies there it lies in the librarians like STD I or not edge in your dotage. Not these are the standard input output libraries returning. See, for CompuTrace programming, which just has an input device which does has an output device. But since we don't have display, we don't have a city, our dotage or even print If put us or put care functions, we don't have a keyboard connected world, you know? So we don't have scan ever get this or get to see each kind of functions. We have a very small aid with brain. And that's why we don't have this. He me mad. Really? It's like a studio door, Rachel, in your dotage. Present insert. They are, you know, But yes, we can do the bit ways I operation. Like making particular bits go high and low there. We can perform serial communication and we can bridge detail exactly like we print on a computer screen by sending throat even despicable to the computer personal communication. Then there is SP I and I two c communication design against some electronic serial communication protocols will be discussing about them also in detail. We can do an hour British still convention. We can convert any analog signal into digital version off it, using the bacon on the Lockridge to convert weapons off our you know and we can also perform, it appears imagination means we can generate square Aviles from any penal far below to the program. But at constants like a NATO displaying keyboard, inputs are not presented. So those are the things that are absent on what are the constraints while doing the programming. The variables always take the lance bass on the entire program that you write down. And as we have seen in love last video we uploaded onto the board. It is stored into the flash space. So because of the lamb and fresh space constraints, the thing becomes very tricky. Semi that is because are you no, no has got only two to Tokyo, your flash and merely to keep you off them on fabled operation. Now imagine you doing programming on your computer which has got maybe a J V six engine be or maturity of ram are, you know has to keep me off now. So that's why any variable that you declare has to be justified if your program is Lindy. If your program is a longer one, then you need to make sure you choose the variable skillfully. For example, if there are religions that needs to be turned on and off and you want to send a number to them if possible. Instrument using word are inch because off camp, because it will take only a bit off space and said the memory and it can store 0 to 55 are medicine 22 1 28 to 1 27 numbers. So these are the constants that you need to take care off. Doing the programming in order. No, but arrest off the things almost remains the same between several ramming and argue. Thanks for watching this video. Keep experimenting 12. C vs Arduin Differences: I have ran. We are discussing about the art dealer programming on decision We're going to see what are the differences between the conventional C programming that you might have launch on the computers on what is the Arduino programming on? Where does it stand? So let's figure now if you have done any amount off C programming are if you are even removed Renewing about this equality that you must be familiar with the structure There we just hash include library something like a studio, not Etch They were done. The program in the body buoyant me. Whatever is there is a good table off our sequel. Write all that down here into this too curly brackets. Whereas as we have seen in our last session in our you know, we don't do like this, we don't We haven't included any hash Include, yet we haven't written Avoid me instead, what we wrote waas avoid sit up and then void loop. So there was no print if actually in case off are you know, I'm just keeping each year for illustration. So what we do here is we do something like more or something on here. What we do is something like digital light Are anything like that? No. What is the difference between these two things? First of all, remember the language is C programming itself. But the orbital folks have just converted it into intra fighting a single Wardman function . They have complex. They have just sliced that part in their compiler to be accepted. That still functions. So one will before it set up and one would be word Lou. Now again, five Atkinson, let me tell you, because before you know how people used to write down program in Embedded World was also exactly the same. So hash include anything that you need and then write down for men. And then whatever is the initialization core or what you might call it, has set up core what's supposed to be done here. And then when you want to start the men program, it has two wooden legs. So why one structure was very famously used because it's a constant search always remains true and whatever is the executable? Ford was being written at this particular point. So this is also the same format which has been followed by many microcontroller programming . Even at this point and will remain the same. But what happens is many a times beginners find it difficult. What to write down a ball over, even on voter. I don't below Valmon. What noticeable scooter months and what next to be executed infinitely, are repeatedly they did some doubt in Indy programmers head, especially the bigger ones, and that is why they are doing it split into this troop. Warren's words set up and for a loop. Apart from that, there is no difference off course in our you know, you can have hash includes if you want to add any additional every or any building, library or any custom and landed. So that's about the basic programming structure. Second thing is about the detail types if you have known about see good. If you have not known about see, just listen to this line on it will get more clear when we're doing the programming. So data David something which we use or declare while doing this, he programming in order to sell some piece of data. We also call it as a variable. Say I want to measure temperature, that I want to save the temperature into some value or some variable on that variable has to declare using some off the redefined or allowed data types. Basically, data that's does what? Let's say, if I declare cab them, then it will do what it will locate a bit off memory inside the lamb off my computer for the variable time. Now that is negative. So if you believe something as inability, then it allocates 6 10 with space for that particular variable called Led Inside My Exam. So that's the data type, and there are no more bitter. Let's and see. These are the data nights, which are provided by our dino, So the inch. It's simple cheer on computers here. In this discussion our computers are below. When you're talking about C compiler regular second Tyler, your computer is actually the pink in process. Our aim. The processing of ritual you're using, which is much faster on much bigger picture than argument are tonight small a bit controller, so the variables are according to that aid, but only some bite isn't a bitch. Cat is in a bit, and sent carries an eight bit carrots change, and center, of course, is sunset. Similarly, word are inch 16 which usually on computer programming, language, word and up to two to be twins. But here they're six in betweens. Then send Long is there, which is targeted with insane. Later. I long is there, which had signed it today, and flute is there. So these are the most popular and most commonly used data types can see as villas in our you know. But in our, you know, the definitions are a bit different by the same carrot. Same but inch on some other data types lend may be different on a zil most of intense. What we do is we either make use off cab. Our ends are long are flute. This is just to demonstrate the similarity. There is no big difference between embedded C on the regular C programming language that we use on 12 computers. The according structure is exactly like C, so there are far lobes. There is if condition there. Mister Dave's. They sit straight. Man, there is fine Luke function president known and see pointers as you use and see added structures, unions, even the librarians hashing clothes mackerels Judi, clear using has defined every single piece off the court in structure remains exactly the same. There is no change, including structure. So whatever. If you have learned about, see before good. Even if you don't have land about C better, we will be explaining anything and everything as leader. But whatever that is present in the C programming is exactly present into the RV nobles. So there is no change in the structures. The change lies there it lies in the librarians like estudio dot edge in your dotage. Not These are the standard input output libraries that return in C for CompuTrace programming, which just has an input device which does has an output device. But since we don't have display, we don't have a city, our dotage or even print If put us or put care functions, we don't have a keyboard connected world, you know, So we don't have scan ever get is or get to see each kind of functions. We have a very small aid with brain. And that's why we don't have this. He me mad. Really. It's like a studio door, Rachel, in your dotage present inside. They are, you know, But yes, we can do the bit ways I operation, like making particular bits go high and low there we can perform serial communication and we can bridge detail exactly like we print on a computer screen by sending throat even despicable to the computer. True serial communication. Then there is SP I and I two c communication. These are against some electronic serial communication for the cons will be discussing about divorce in detail. We can do an Arab traditional convention. We can convert any analog signal into digital version off it, using the bacon on the Lockridge to convert weapons off our you know. And we can also perform Peter music. Imagination means we can generate square Aviles from any penal far below to the program. But at constants like a NATO displaying keyboard, inputs are not presented. So those are the things that are absent on what are the constraints while doing the programming. The variables always stick the lance bass on the entire program that you write down. And as we have seen in love last video we uploaded onto the board. It is stored into the flash space. So because of the ramen first space constraints, the thing becomes very tricky. Semi. That is because are you No, no has got only two to give your flash and merely to keep you off them on fabled operation . Now imagine you doing programming on your computer, which has got maybe a J V six engine br maturity of ram are, you know, has to keep me off now. So that's like any variable that you declare has so justified. If your program is Lindy, if your program is a longer one, then you need to make sure you choose the variables carefully. For example, if there are religions that needs to be turned on and off and you want to send a number to them if possible. Instrument using word are inch because off camp, because it will take only a bit of space and said the memory and it can store 0 to 55 R minus 1 2128 to 1 27 numbers. So these are the constants that you need to take care off. Doing the programming in order. No, but arrest off the things almost remains the same between civil ramming and argue. Thanks for watching this video. Keep experimenting 13. Breadboard : Hello, everyone. Now that we have seen how we can perform a very simple program for our dino, let's try to understand very important tool that we're going to need. Throw the experimentation not only for the scores but for the future courses or future trainings or future projects. Whatever you do, you're going to need break boat for sure. So if you know how to use Breitbart very well, then you can definitely skip this video. But if you don't know minute boat in detail on if you have some doubts, then I would say Let's stick to this. So let's continue. Ah, bread boot is basically a small board made up off plastic and had some magic interconnections and a lot off holes. So, as you can see, this is how a Braidwood looks like whenever you bite from a stroll, or whenever you have Italy a hand so it raids. Or it majors a little bit more than a regular mobile phone or a smart phone on usually constant plastic as well as also comes in some number of different colors. If you need is, it can see the braid boot is having a number off different holes on twitch long rifles, actually, and why this holds up there. These walls are there to insert electronic components into them and perform some socket. Now the major purpose of bread board itself is to create a circuit without leaving toe. Create a PC before it, so you just instead component into it, performed the connections and a socket is room. Now let's see how the Breitbart is arranged. So for never number off holes you see in this one lens homeowner, then 12345 So all this article five holes only this five balls are shorted with each other . What I mean to say is this point is electrically connected toe the next point on next point on X Point and next, all five points are electrically internally connected to each other. But disconnection has nothing to do with the recollections off this fables, and this favorables an entire rest of the paper. It's only this. Five holes are interconnected with each other, so similarly, we have interconnection off firewalls off number off such vertical lands as against C, so let's call them columns on. The columns are vertically shorter with each other on and Let's call these rules. It's all is also having group off five balls and all of them are shorted with each other. But as you can see, there are 123456789 10. So there are a total 10 5 room or five whole groups. Inbred good. The heart is under Schardt. It's such that the first hole, it's shorted with 2nd 3rd 4th and fifth as a less the entire group. It started with the second group. It started with the Ter Group four group as well, its fifth group. So from this point onwards, upto this point here, all of the pencil shorter And then there is a brick and from this point, up to this point, all of them are shorter. So the connection has premiered considering these shorts. So all these horizontal lines are internally connected. This visit the red line shows all of them are interconnected with each other. Similarly, this is permanently interconnector the horizontal line. There is no interconnection between them. Similarly, the lions engine the bottom side of the bed. Borders are also connected. As we discuss the vertical answer also internally connected and there is a break at this point. So there is no interconnection from this point on this point. So what a great good has vertical sharps and horizontal shots on these shorts are usedto make an interconnection between some components. Now, if you just look at this diagram, you can see this register. It's collected from this point to this point and in the exact same line off this point, we have connected a wire which again goes back to this point, connects on a dentist stuff. Then this is so cancer. 10 counts and led and then led comes here. So the so could we have created is wondered this stuff then second register and then and really all of them in since. And this way you can use bread board toe create any kind of soak it that you want prepare most happen, Lee. What you do is you intra fence. The ladies are searches or registers or number of different sensors which you need to interface with our, you know, into the bread. Good on then, using the single female two main or male to female connectors, you can interconnect them with each other so I can use the ultimate connector or most popularly, used. This kind off the single stand wears those or let's in the sun cables. But now what is? Instead of single stand cable, the male to male collectors are preferred because that single stand cable tend to get cut by stalking into the soul, thereby making that whole completely useless. So not it. So this is a collection. So pin number one off the icy is connected to this point off Resistol led like this. The distance between this two notches it so that the smallest to the AP ices which are like the AP, each isis or even be a before optic appliances can be easily in certain in between them. If you have large rises off course, you can insert them. But just in somewhere, I hope it would be clear for you. How do you break boat? This is how we're going to use Breitbart with our dino by connecting each different elevates as against thing. What we have done here in this circuit, it's all of the rules are shorted with each other by giving a shark jumper over here so that the cater's off. All the ladies are shorted together and then given to ground of our You know, the animals come with the register to its Been off are you know, so that we can get corrected with the Arduino by collective all the utilities at the same time. So you have to perform this and many such experiments number onwards So just get a comfortable with our Do you know that Sarge, in this video? 14. LED Chapter 1: Hello, everyone In this video, we'll see. What are the alleged waiting? Dyer's are led IDs and how we can use them with Arduino. So let's again. You must chance in these kind off ladies on in our first session. Also, we have seen how and lady can be interface with our dino and how you can try doing a program for it. The lady is basically a small light. Imagine tired. The electrical symbol off led is like this. So it's just like a dire symbol, except that it has two additional arrows lengths. So this point off the lady is called as an hour, and this point, it's called us cantered. If you look from the top side, cross sexually or even from the bottom side across sexually, the lady will look like this. It will have a flat side on violent on. It could be circular completely. The pin, which is close to the flat, flat side, is usually cattle. On the pin towards the circular side is a notch on. If you look at the lady from the side view, then you can easily spot based rules of strict inside the led the longer lead and shortness of stretch is the owner been on at the bigger substrate, but a shorter lead is capture so usually longer. In short, inmates are the easiest majors off knowing which is a node on which is the cattle ability. Plus, if you don't know if the lancers came by some mistake, If you have connected or disconnected thing is in a stripper, then you can look inside it. The smaller substrate is under the larger when it's can't touch. Now these realities are used for the indication purpose with Are you know you can use it for a number of different operations up our own indication. Profit off indication allergies are there. Then ladies are used for indication off number of different operations going on inside the circuit. For example, you might have seen at the energy meter There are a number of the French ladies into it, which are there to indicate the presence or absence off Hull's. The usage is and applications off ladies are widespread, Ridge on as you come across a number of different projects. When you are experimenting, you'll get to know the meaning off it. This is how you can interface and led with Giardino. The cattle of the lady should go to ground. The end of the lady should not directly come to the Arduino pin. But instead, it should go to the garden, open to a suitable sister. Usually the evidence which we use with our, you know, our three mm or five mm time until a ladies and they turned on between five million peer to 50 million pairs of current led is a country current control device. So if you directly connected across the microcontrollers been and ground, then it will definitely get the five old voltage. It will tend to get large number off a large amount of current, thereby damage in itself as the less it can also damage deal reopen. So it is very important to limit the current going through. The led to a maximum of 50 million people. Even we don't Shirl allow that much of current to pass through led and usually in practice , up to 20 million people of Corinth sufficient. So whenever you're using anything with Giardino, make sure that their series resistor you use should be at least 100 homes or mood. What more? You can just experiment and decide through 30. Home gives you enough brightness or successful home gives you enough brightness. The small tree and Amari's will also work with one K home register as well. It's 4.7 game home register. Remember, the job of led here is just indication, being on or being off. So it is not there for lightning purpose. And that's why you have to use as big distress possible so that you just get in enough amount off. Indication on by connecting led in this fashion, all you have to do is make the pain go high in order to turn daily on and make the pin low in order to make their return off. That's about it. So it should be digital output starting comma High Khumalo, as we have discussed before. Old sword, you know, has ah particular led onto its been number 13 by the forage. So you don't need to connect this kindof externally to experiment with target number. There is a built in led on to the touch. Now, when it comes to using multiple, is it are you know you need to make connections like this, and if you have to turn all of them on together. Let's try to see how you will read on the program for it. So let's open their dinner app or the I D and start writing down the court. Now suppose you have a abilities interface with our you know, And if you want to make all of them go, hi are on at the same time and all of them low at the same time. The court should be like this. So inch led even is a good two legs up in number two and in the same fashion, we will write it down for all H ell idiots of 1234567 And really h here in Canada NITEL 34567 eight and nine inwards Settle. You will have to manually make all the ladies go high up on the abilities. Go out. Put soap in Mort. I live in a coma. Output. Don't be a typewriter. Be programmers. A programmable will copy paste as much as possible to save his or her time as much as possible. So that's never give similar names Relative one come output than led to come out. Put the greed and forth and 567 And it and then look in the same fashion. Digital rights led, even comma high. Now, if you want all of them high at the same time, they just go on reading the highest settlements with douchey any really? Okay, if you give dealing in between here they all will be seen terming on one off channel. So don't give a deal here. That's about it. And then delay 1000 and then simply make all of them go. Lulu at once are, you know will perform every instruction or every line very fast. The time required for execution off this particular land would be definitely in microseconds. So when you write down segments like this, this all eight segments will be executed so fast that you won't even know business Idiots are being turned on when Webvan and you will see our you will feel that all of the ladies are high are on at once and then after its second of daily, that all of them will be no at once. So that should be the program for making all the ladies go high and low in this configuration. Actually, in this circuit, so try this program and see the output. There are a number of different projects to be done with our dino. But first of all, this is your first program there. You interface with multiple religions at the same time, so thanks for watching this video. 15. LED Chapter 2: by there in order to perform the experiments that we discussed with Ellen. It's in the last session here since my finger catch. If you have the hardware off our denial entities, is this turning Red Butch there even a homage on Judy Breitbart itself? If not, you can just create a musical kitchen tinkle caps we have just discussed to be full. Also, bigger car is a software for really Modeling on the Autodesk sockets is also dictated with him when you can perform this simulations with our you know. So just go to sockets and create new circuits over here on here. What you're gonna need is within each and our Dino and the Lititz as well as latest us. So let us find our Dino. It's there. The response off The Thinker cat would be a little slower suggesting Be patient with it. Then you're gonna need to read books. This is the regular rate butch that we discussed about under this great book. You can connect any number of devices. I mean, in a pullup resistors, capacitors. So anything this is the Arduino are being no board and just village first al connection on the Hill idiots and resistance led lipstick. Lititz. So these are the delegates I want. Cater's off all each. Ellen, it's common. So I just do that. This is an Ellery. Then I'll copy each Henstridge three, then full and just have garbage and control V and visit what I want to use it so above it still should be there. So three tour I six seven, and it's now the points off. Unearths of that is still should come through their respective registers like this. I'm sure I'm not making the most beautiful of the connections, but should well shop. So yes, Where do them? Probably so that good for you also you can change the color of divide differentiated. No. Was that stone? What I want is do no board. So this is our final. And now this week, the connections. Remember what I have. My collections are still open. Number number two here. Three here. Oh, colored or something else. Thanks. Seven and there. All right. And then this ground should be connected This point Told you that's all. So the court is ready. The circuit is very Let's see how it works. So I just go into the court tab. I'll about the glass and just use text on in the text. Carbon, just type it all here on. Then let's see how it looks like. Start simulation. Let them in, On off, on off. And you see them? I'm off now. The blackness since average less because the resistance usually register is ah bun Ker. Instead, we have chosen on, but it is not facility to change the it's just instruct you kinetically jewels something like 30 home Yeah, lettuce a place to changes value before placing are just after placing it. So that's it. You can perform many such experiments with our, you know, onto this magic. But from this kind of simulation model on, then see for the projects. If you want, you can change the delay on see the output immediately. Sensor off 1000 make it 500. Remember smaller delays. Launch appears to be that quick in the simulation space. But last listen, okay to see So I had a millisecond on off there some. So before this, it's the image on sea from out Butch that's watching this video 16. LED Chapter 3: hi there. After making the connections for our eight ladies without, you know, the hardware set up should look something exactly like this. So this is my center that I had created with Giardino on all the ladies. But I have to do is I have to make all the connections exactly as shown in the previous video on right down and download that particular court. The output should be clearly visible like this. So all the intelligence being turned on and turned off at the same time? There's no daily there is no lag. Are any sort off moment or conditional change. So So you let it should be blinking. So that's that's the project that you have to do on. That's the first assignment you have to do with holidays. All the best in doing so on. And keep posting me any questions. If you face doing this experiments. Thank you. 17. LED Chapter 4: hi there. After doing the interfacing off it led. Is Victorino on just bringing them on and off. I want you to perform on the three projects. The first is John. Actually, the eternities are blinking on and off. Then what I want you do. I don't program. It's so a coach to make four ladies on on other four off and then 1st 4 off and go letter for um So this is one project. I want you to love it. It's a delegates and then I want you to create a geezer program. But Jesus program is there. A single led off his mom and all of the rest of the ladies are turned off and that is rooted e on. Then I don't program toe make the radiance of blink only 10 times after blinking 10 times. It should stop initially weapons 1st 4 on and four off. So I have a small video of it, which I want you to create social look like this. The four villages on the rescuer off on, off on off signage. So four on four off the interesting is the 2nd 1 We just say that's all which is call it's Jesus. Not Jesus is a kind of project. Will. You were just wanna ladies on every time on it is locating. So just appears to be like a geezer onto the eyes. You can also see two salaries are on every time But in fact there is only one already on on its solidity. That's the cheese, the program. You can write it down anyway you want on lastly, a watch you to create a program where the ladies are blinking precisely. Attendants, look at this with you. So 123456789 And it just stopped not to do it is what do you have to do is you have to make yourself a for loop toe, create the blinking effect, but just stop the program what we can do. It's for example, this is my blinking program. But I do. It's I will just just all of this lines on every creature a function called blink are blinking and then here and right down the court for blinking. And then what I do is in Luke or fluids for inch. Isaac will do zero eyes less than H i placeless and in the wreckage. Just don't watch. Blink blink. So either you can do this are you can just use the set up Bill o blinking on. You can just read this school in set apart because if your ingredients set up, it will exactly ribbons and the loop will be empty. If you want to write down in loop, then just write down this much of court and then your program make a program. You go into overdrive, Unlu, and stay there. The program will go in this loop and it will stay there infinitely on indefinitely. Let's say this logical so much so what I did. I thought I did waas. I just made a function out of the bank in court. Then I reported eight times and then I'm making my program who drove 500 in this violent, pretty, hottest MP European will execute as long as it's the contained. Here is non cereal in August. It's a constant so on wisdom in non seal their sub simulation here. And let's this change the core and it started solar. See it? It's on. Oh, okay. This is a nation. It's quite slow. Oh, oh, um oh, So it will execute gentleman's Precisely. And then stop. I'm gonna see you get stopped. So these other three projects I want you to perform off one day and see the output. Thank you for chambers assignments for you. 18. Buzzer Chapter 1: Hi there. Indecision will study about how it can interface a buzzer with How do you know a buzzer is a very small electronic components which works on a piece of effect. So it generates some audio because it my projects in particular sequences whenever supplies given to which it looks at smallest like this. But consider when I do have different sizes, it can be up the city mounting one like the one you see in this diagram as unless it can come with two wires. Those two wives have nothing but plus and minus supply wires, and all we have to do is give it some voltage between 3 to 30 fools, and the bazaar engendered some sounds. Whenever you are interfacing this buzzer with Arduino microcontroller board, then you don't need any kind off searching socket for it. You can directly connect the buzzer with the input output pin off our dino. So what you have to do is to connect this positive terminal. But they are, you know, spin and the negative been conduct likely Goto go. You can either make the buzzer go simply on and off are you can give it some particular frequency so that it generates some particular tunes. In our you know, you can also generate iTunes using the building tone library. So let's see how Ando, how we can use this buzzer in our project. Select Begin. That said, the buzzer can come in a variety off sizes as well as shapes. So you can see this one here looks like a piece of grounding buzzer on This one here comes in a package which has got to screw holes and two wires. The two hours are usually there and black fire, which can be connected directly to the r. Do not spin and ground while ready No program for this kind of buzzer, all you need to do it simply make that particular pin off are, you know high are blue by simply making and high and low. The buzzer will either turn on and turn off, thereby generating some sounds. Now, if it was an experiment with this iron law, if you do some experiment with the turn on time or keeping the own time something off time , something are making it switch at a very faster lit. You can gender it. Several tunes are, you know, provides us with a tone library as well. With generates our square will offer specified frequency on any Be enough our dino. That duty cycle means the on time and off time ratio. It's 50% means whatever signal vision that using the tone library, the on and on period on and off periods are all the same. The Tone library has a very simple syntax where you just have to call tone, then mentioned up in on which you want presented to turn and then mentioned the frequency which you want presented due to some technical reasons are sound are a signal less than 30 . Even hurts is not possible to be generated on our, you know, in the same function tone you can also optionally provided the duration in milliseconds for which you want the tone to be generated. If you don't specify any dawn in duration, then the tone will be generated onto the pain or the frequency will be generated onto that been infinitely, unless you give a call to a function called no Done. Whenever you're using the Stone library, the Peter Blum operation is destruct with Pin number three and element, So if you're using the number three and 11 for dawn generation. Then there will be some problem with the PW output. That's one thing you have tow, keep into mind. So let's see how we can write down a program for this tune levity. 19. Buzzer Chapter 2: Hi there. Now let's see how we can connect the buzzer to our dino and how you can. I don't program for it. So for this experimental I'm going to mean is just in our dino board on a buzzer. So this is the normal ISO bazaar that you can use. I'll correct them to get to wire off this buzzard toe the ground pin on the positive wire. I'll connect to let slip in. Number three. Jessica littering. Now listen, I don't a very simple core for this words. Sit up and then voyage loop and let's just be clear inch bazaar equal to three so it's connected to be number three. Been more three come outputs, just like analogy. Just make it on and off. That's about it. Let's start the simulation as again here. It's generating some, some now in higher. If you have a physical, a simple, bizarre Visser, which is a continuous strike one, then it will generate a continuous stone with this school. Now, this one here is just a plate which requires some frequencies to be given so that you generate some sound. So it depends which buzzer you get your hands on If this kindof simple on off is not enough for you, let's try to use that don't library. As I said, the library is very simple. All I need to do it specify the pin, specify a particular frequency. Let's have 1 50 hearts and that's it. And then I went for three seconds toe, listen to this and then and simply call no turn on the number three. So don't village and read the sound. And Norton will stop the sound coming from the number three now since we're connected. But number 22 buzzer. Actually, what is happening? It's generating, or it will be generating. Upton won 50 Hertz Square with on because of their square. Well, this buzzer will generate some different kind off, are you? Let's try to see the simulation for this. I notice it. It since visited sounds experiment. The way you want by changing the frequency is, uh, you can also come by this a number of different sound nodes so that a variety of sums can be generated. There is a sample in Tinker card. Let's try to see that sample with gender. It's a specific up tone from the buzzer, so to open that sounds the sample. Just create a new circuit and very search for the components. Just type buzzer. It will show you a readily available Soak it with hard, you know. So tone, milady. There's a socket. So that's a sample, which, which is having the tone core on really done for it and engendered some notes. So these are some notes with different preferences. So North Sea for is having to 62 hearts g Trayvon 96 so and so on. What they have done in the sample is they are providing this stone with a variety off durations. A simple court will generate some sound. Let's listen to it as against. So this is a simple melodies and vision program in our Dino. You can also open the rt no software or are you? No, I d. On. You can also try out the same court with Hard United by now relegated to the board so tired with the buzzer that you have Sometimes you might just be enough with the on off with generates a BP. Sometimes you might need to generate this kind off tones. So look out for this strong related programs how you can experiment with them and how different sounds can be generated. There is nothing much to learn about the interfacing. Just have toe Pick the buzzer, find out the appropriate and Northern can't order a positive and negative wiles and connected with hard, you know, So experiment with it on. Listen to the audience Undated. Thank you. 20. Switch Interfacing_1: Hi there. In this video, we'll see how we can accept our digital input with our denotes input output pin. Are, you know, as discussed, has 22 tip ins. Been 0 to 10. 30 in total 14 and been a zero toe. If I've total six pins, all of them can be used as either digital open up in our even as a digital improvement in the station will see how we can accept a digital input on a particular enough microcontroller. So let's begin. Additional input can come just like a switch, or it can come from a switch out of better. So many a times when we're doing or when we are creating projects with are you know, we may need to connect this kind of buttons the buttons, maybe to turn something on and off, replacing them. The buttons may be used to say the same point for depression controller. The pretence may also be used for a variety of different purposes. Now, this buttons can be intra fest easily with the microcontroller lying Guardino and began accepting imports, and I don't program for it. Let's see how this buttons are actually used. The simplest type of buttons which are available are called Let's pack Tell Switch. So this is one tactical switch. It's on monitoring that used only this which but this is the simplest one, which is available in market. And that's why let's worry about it. So although it has got four different bins, but it has only two stitches inside it, so been a get shorted with BNB venter, but expressed as a lesbian. See your shorted with Mindy so you can use any of the connection X perfectly fine. You can even use in D connection. The two prints A, N, C and B. India already shorter so you can use any off that switch one point off which will goto the microcontroller spin on the other point of this, which should goto the logic mortgage. It may be a logic high, or it may be a logical low voltage. Now let's see how to connect it so symbolically a switch will look something like this you may call it is a switch or even a but on most ideally, what we would like is we would like to correct this which in this configuration, where has been goes to rd knows, I hope in our GP I hope in and the second point of this which goes to this involvements veces Now, in this configuration, what is expected whenever President Button or whenever I pressed the switch, the microcontroller should get this easy from this switch. But whenever I released the Belgian or whenever I release this switch, the microcontroller is not getting logic zero. I repeat, whenever I pressed the button, this pain which is connected to controller will get larger. One, because it is getting connected to this is But when it really is it, it should also get logic zero, which is not getting in this position. Remember, whenever we're accepting digital imports using switch, the absence off one doesn't automatically mean the presence off zero and we have to take majors toe, make it zero. So why we have to do what we have to do in this case is we have to connect an external pull down resistor. Ah, bull down and sister is nothing but ah, high valued and sister connected from this spin which is going to microcontroller towards ground. The high value is usually something like 10 below the Hello, Susan High because we don't want any significant current to flow from it when the switch is pressed. Now see what happens here. When I pressed the switch, the pin of microcontroller will get logic one because it is rapidly getting connected between sissy. But whenever I had released this which the pin is getting logic zero potential through ground off, wrong ground through this register. Because of this resistor, the pin it's pulled down to ground and it always the same logic. Zero If the button is not placed, which is not happening in this case over here. That's why whenever you utes with just with microcontroller, they should not be used. You know, floating more like this. There should be an external pull it down. That stuff are there should be an external pull up register like this. Now, in this configuration, what happens is when does which is pressed. The pain will get logic zero from switch towards ground. But whenever the switch is released, the pill is getting logic one from this register connected toe. This is so all the bank. If this which is not breast, the Arden is rating logic high a logic one and they never This which is pressed the switch is receiving logic zero. The beauty off this pull up register configuration is that the Arduino is having internal pullup resistors inside every pin off the ice. So what it implies, basically, is that you do not need to connect the external pull up resistors. Instead, you can an ability internal pullup resistor off course. If you don't want to enable the internal pullup resistor, then you have to connect it externally like this. But if we're going to enable the internal pullup registers, then you can just use this which in this fashion But remember, we only have internal pullup resistors, so you can correct us which like this without connecting any external register and you can enable the internal pull up in the programming. But if you are using the switch in his configuration, when these which is getting connected toe TCC on the other side, then there is no provision off internal pullup resistor. And if you are using or if you have to use which like this, then it is mandatory that you connect at resistor in full on configuration like this. If you're isn't pullup fine, you can correct this which, like this, and just enable the Internet pullup register in the next video. We'll see how we can write down a program for this particular switch. Thank you for watching this video. 21. Switch Interfacing_2: hi there. Now that we have discussed about the switches and how to interface them with hard, you know, we can interface There are, you know, in any way we can defend the switch in our, you know, in any but the most preferable. And the simplest way to interface a switch is by connecting it against the ground on dabbling the into new poll of registered. If you do this, then you don't need to connect. This external will now register. So let's try to ride on a program. You like this by making the switch go input with its pull up an Abbott when an about the pull up or when you enable the intern pull up, then the Penis by the Fort High on Logic one to do this program, what will go is we will follow Pinker card there. We can simply create this program as well. Let's applaud Ege and see the output emitted. So this is just in our you know what I want. What are you doing? Tinker can Over here is a switch like this or a push button like this? That's about it now visit. Connect one pin off that switch to let sleeping number two and other pin too count. Let's just change the color of this fire. And now let's start right and not a program foot so they follow them. Footage would be worried sick and then avoid. Look, what we want to do is when the switch is pressed, the ladyship turn on. Where is the energy? Let's be fine Edge until it is going to work in that insect up being more tired in comma in putsch underscore. Pull up And then we also have to send the been ward off number. Turkey is not input. Pull up ST it is. And then been more drew coma and put under Scott. Good luck not to use it all you have to do here. It's inward. Look, if Digital Zied, then specify what you want. Religion, gender. In our case, it it's true. Our lives give it a name. It's w like that. So in NSW, is it going to? So if digital there s w is equal to equal toe loop. What it's implements is if the searches breast. So if the stitches pressed what we want to do, it's This is the right political Hi and on the contrary, you can use either else statement are much better if you particularly check If digital SW is equal to equal toe high, then what we want. We want that led to be look or turned off. Let's start this demolition and let's see the output. So you started dissimulation? No, I just have to press this switch. Can you see the lady turning on over here? That's a message is pressed. And when it released the switch diligence turn off practically. It will happen immediately to give an effect that inundates turning off slowly they have ah , fidelity Was the supplies involved here in practical? Then you're doing it with hardware will find it to be happening immediately. So that's a single switch intervention program Attardi No, Try it out and let me know how it goes. Thanks for watching this video 22. Switch Interfacing_3: Hello there. In our last video, you have seen how we can interface a single switch with tardy No, I'm inheriting a program for it was now in this every over thing to do is we're going to interface when most which toe already know spin and see for its are put. So again I connects one pin to ground and the second thing to say pin number three. Just a color by Tina Medic Keeper 123 of a number has a different color like that. Now what changes we need in our program the needs to have another switch variable. So let's call it and distribute even. Let's call it into some new, too. Similarly, we need to make the corresponding changes in declarations as the less we need to make corresponding changes into the Setubal's. Currently, we have only banality. That's the number 13 over here, ladies and profess in that reality, let's connect the cantor to ground. Let's go and register. So two up in the city Number four She's the color to something that's let's put the value of resistance to be not one K X, quite much so. It's lipstick treat people and now what I have to do is then I have to declare Number four , as are put in another reality. Let's call it into. Led to is a photo four and the Globe that been also here. So, Lord, a little it's really starting in the above line for sure you can answer it down. Led you? No. What changes would be there in the program if I want to operate the second led on second switch. No change at all. Keep it Everything as it is, he had a mechanistic move. One he'll make it is of you to and make it led to. That's about it. Are those any much interest in there? Let's see this ammunition. It's, um, issue. Okay, Dogs notes. So if I press this switch, the senate is on. If I press this switch that led is on, I am not able to press about the switch at the same time here, so I can't experimented Oregon demonstrate. But even if you press both of them together, then both off the evidence will turn on immediately and instantaneously. Now you have to perform a program in which what you do is union switch one then list both idiots sure done on and Vince. Which, too, is breast both off the evidence. Sure done. Oh, that's one dusk you have to do. The second task you have to do with this program is Vince. Which one? It's pressed all elite. It's let's see onto. Relatives will blink five times it 500 millisecond off dealer and Vince, which, too, is pressed. All two ladies will blink 10 times ripped. When second off dealing, you have to make himself farm. No branch of this two programs. So go this program and say how the switch interfacing What's for you? Thank you for much of this. 23. Switch Interfacing_4: I have. Even in the last session, we have seen how to connect a switch to hurt, you know, on We have also seen how tour I don't program for it so as well in a part of Sitges as you want, you can interface with the program that was given to you are extending by the program. Now that's pretty much okay when it comes true, connecting actually a switch. But then you have a sensor which gives your digital output something like this. It's a proximity sensor. So whenever you keep your hands or whenever you put your hands close, storage on a white surface is there due to the reflection it transmits allege from one in under. Since the late at the at the really due to the reflection from a flat surface or usher reflecting surface. The light infrared light reflects back and is reserved. Batted for today are and it's conditioned by this electron ICS and a logical and and zero isn't later indistinct. Similarly, this is a fire sensor circuit. This is a microphone. No sound did it to circuit. I only know what did circuits do is they create a logic output off whatever that their senses. So proximity sensor effected senses a reflection or object in front. Off it it will you bless my work at Pixar. Similarly, the fire sensor will go if I were credits are are still over at it. So put and the microphone or the some sensible according Lego Five World Arciero world at its Now we have to remember wanting when we're interfacing this kind of sensors with our dino Then we don't need to either. Anabel, the internal pull up our connect anything externally to depend. All right, look at the switch interfaces. So if you have a switch like this, which we have using, then menace which is not addressed, the Penis actually floating. And that is why we need and that an external or internal pullup resistor in case off did sensors. There is a signal conditioner, usually operation amplifier or comparative circuit. Who takes care off providing zero R one. So the sensor tech scare off connecting with zero our logic zero logic fun. And hence, whenever you're using this kind of sensors, you need to use the same kind of program that we did in the last program here. But this input. Pullup is not meter, so instead of that, you can just write down PIN board is w comma input and that it's sufficient. This kind off sensor models are not present here in to Tinker care. Otherwise, I would have been able to show, but that's fine. I hope you got my point. There are a number of different sets senses available in market, which are used for approximately addiction, temperature reduction and Lockport things. Number of different number of different types of sensors are available intact, so I hope you'll find it easier if you have this kind of sensors to use. Just go on radically adding the sensor and writing down a particular program. Forage. A few more tasks are there here for your thinking. Whenever you get more time, whenever you have kept pretty much good chance on the are, you know and all the switches later things, then you can interface, or you can try out this dusts. Thanks for watching. I hope that digitally or gets completely clear with your people. Thank you 24. Serial Chapter 1: Hi. Everyone in this video will study about the serial boat off, aren't you know? Now, as you know, that a computer system is having the monitor for the immediate opera device or for printing something that is needed to be printed by programming. But the gates off are, you know, which is just a microcontroller board. We don't have any such sophisticated output device like display. So the U. S B cable with which we connect beard, you know, to the computer, we can use the same cable for communicating with BC. When the PC in time can act as a operative, it's for us. Let's see how it isn't on. This also explains how the program is downloaded. Want to do are, you know, make them so let's begin now if you have your RD No, you know, in your hand right now, I would like you to take a close look to it at those two pins. Reach up. Limit here. Seven number zero. Along with being a digital input output zero. It is also a pin called Rx, and the number one is a been called TX. Alex is used to receive data into the microcontroller coming from PC or from any other divest connected here, and the X can be used to transmit data out of microcontroller toe. Means be are to any other device. So been zero is used for deception and when it's used for transmission. This is a serial are synchronous communication happening onto this microcontroller, and that is what we exactly use toe. Bring data onto computer as well as to receive data from computer. So we're going so we will use the same USB connection that we have. But the two pins this true prints will be used to win every Orioles in serial communication Best project. So it is advised that you do not connect any hardware's toe this treatments, especially when you are going to use the serial port. Let's see how the serial Port City List, as we have seen, and we have checked it before. Also, the Arduino appears at some kind off comport in your device manager. So if you check it in your windows US manager, it appears on it appears with her port number. He has the same port number to download the program into the garden aboard from PC, and there's no we perform our This is how we do the connection from PC to party. Now, along with program downloading, we can use this PC hands off device for our you know, either you can use our tournament. All software like this, which is very popular terminal by brain on our dino, has a building terminal window. There. You can see the detail received from the rt. No are you can also type data which needs So we transmitted to the argue. So we'll see this when we perform the back to cool off it. Now, how do we use this library? Or how do we use the serial port to your serial port in order? No, we have a library called cereal and cereal has got a number of different functions which can be used to either write data onto the computer or three deter from computer or any other serial device. So let's see how you can do this communication through the serial boat of arguing now, As I told you, this is data transmission happening seeing crone us synchronously serially on deck aside, we need to fix on the speed of later transmission, which also called us bits per second are the unities bits per second or about Ridge. There are some supported booklets and while doing this communication, we need to make sure that are, you know, uses the same boat. It as well as the PC also uses the same one. So, for example, if I'm sending data from ordeal Oh, with arbitrage off 9600 bits per second and if you receive it with for it 00 bits per second there it might create confusion. So on the PC side, also, it should be 19 serious zero if you're using 9600 nada transmitting said R and B, are, you know, side No, no, look at the library off cereal. So this is the serial library on these are all the available functions in Syria left. So those are all the member functions off the serial library that we're going to use out of which the most important one that will be using in the very beginning. It's called that serial begin. Then we will use serial dot print Grinch, Ellen, then billiards. If serial dot available and then we'll lose single, not reach. The other functions are also used It's not the case that they are not used, but most popularly, we will be needing deeds specified cereal functions, and we'll see them when Diemen how to write down the program for it as well. Let's how executed on to the Arduino board. So let's think it. If you want to write down a program onto the order you know to send some hello world or some sample next to the computer, then the program. There'd still be at simple Estes, so let's just see instead of doing it here, just do it in our dinner. So whenever you want to initialize the serial communication, the very first thing you should do in your set up its serial dodge begin and you should specify a about lit inside it. This initial lasers and turns on the serial port with specified about it. And then you are free to run any kind off program with cereal bowl, so tingles. Serial dot begin 96 Then I'll live on serial dot print and no lunch and then in loop. What I do is just do serial dot print best and will be 4 to 6. After uploading this program, the are you know, been sent high level two PC. And then after every two seconds, it will send next test to the base another standard, and see for yourself, which? 25. Serial Chapter 2: Now it's enough doing this over here looks directly do this program off a serial communication onto the are, you know, Heidi. So I just opened the rdn a softer over here and will type the small hello World test in court on the same program. Or the same testing code will be then downloaded to the Arduino board and will see the output of the same. So let's see, whenever you open the are, you know, just goto file on click on a new file so that it will create a new sketch the very first line, and set up. We need to write down its serial torch. Begin, Let's say about it off. 96 Syriza is chosen 9600 is of one of the standard bo tricks used in the industry. So many benefits uses 9600 That's when you use it and then we'll do Serial Grinch. Ellen. Hello, what? And then here in Luke, what will do its serial dot French Ellen The beat and we'll give a D lay off 2000 milliseconds. Minstrel secrets. Not that it saved this score some there. Let's call it cereal best and let's download this into the board now. So what are the tools? Search for or selected board are you know, you know. Then look for the port number. You will find it over here and then simply Condi up. Notable. Now, once you upload the score, the only function were using out of it. It's print Ellen or print on new line. So there are a number of different functions. But for the sake of this court, we have used only print Ellen, apart from serial begin. No, the court is being uploaded and uploading. It's done, as you can see here. No, I can directly go on to this button over here, which is cereal monitor. I can go from tools and then cereal monitors. As soon as I opened the serial monitor, it opens with a particular set. Baldridge, you can see it over here. However, we have chosen 9600 as our motor it, and that's why we should choose it to be 96 serious. So whenever you changed about it, the Arduino is reset, and every time it starts executing from the first line. So even if I close this window in the early if I click the serial monitor Ari six signal, it's centered, you know, so that it starts from the beginning, and that's where we can see the program starts from Hello and then the repeat. Repeat, repeat, repeat sequences being repeated. So that's the simplest test. Print Ellen Strands for printing onto a new line. If you don't appear in the print Ln and if you just happen, print there. Also, it's fine. But then it will not give a new line after every print statement so that rip it will come one after another. Unlike hello World, there is a new line, but in refuge there won't be new land coming. So let's see. So hello world. You see there is a new land after hello world, but after repeat, there is no new land, so print Ln eight sprint with the new land. So the data sprinter and then a new Linus printer that sprint Helen. So do this testing program, and we'll see how we can receive the program or received the detail from PC into our next will you. That's what you this video 26. Serial Chapter 3: Hi there. In our last session, we have seen how we can prince treetop from our, you know, to computer. So the serial dot begin begins or initialize. Is the serial poach off? Are you? No, no, no board serial, not French Ellen. It's printing the line. Hello, Valls Our leverage from our you know, to PC. So we have seen by clicking onto the serial port or serial monitor how the details receives on the computer. Now what I want to do is I want to type something over here, makes a key, and I will send it. And then I want to see if our dinner is receiving that letter or much. So let's begin with this program. Now I will save this program with some different name for the Sikh. No, because I didn't watch. I want copies of every program. I just save it with some differently. Now this irregular begin dream business in Syria. Leopard. Linderman's the same here in sort of just doing some similar parent slippage, what will do its will, which, if serial dots of the label is greater than zero then I don't something will you, but basically the purpose off this line means if the cereal of a label function returns one something greater than 0123 something, it simply means that some detail has been received in the serial buffer off argument, even if a single character is received, the serial not available Billiard one. So it's basically evidence in the full of characters that are the seven Judy cereal Butch. That was the details received. How you can accept it. Let's they can treasure variable interest rate is equal to serial dot reach. No, we know that something has been received and something has been butch and products to. Now, if I have to send this added Street back to cereal put, it means if I press cape, then are the notion was for with a key 45 place and then are you sure this form with him? Then what's your name? So first of all, let's wait for some time so that will get an understanding. And then cereal watch. Lynch, you have list and then I don't serial. Not right now. I'm not using the brain function here, but I mean, is it right? There are two new functions in this program. Surrendered available Cirillo Tree and see the stretch. Three new functions of I'll ask you why I used right legend. But first just out this trigger so uploaded This score I was uploading is done. What we have to do is we have to open the comport Sam piling now compiling its standard self loading loading instant. Open this airport over here and see you get high leverage. No, I just breast deputy and big sent you breast he But it appeared multiple times it actually appear number of times. So while sending data we're sending like that over here less this new line I don't want it , so just click it, No landing and let's put something else be you best be nothing is then see Eucharist See, there was a new line That's why a new land appear because surrendered available returned with two Which is first character words about the character that cinch the second character was doing so. If I pick the new line to be no or no lending, then that if you let that its transmitter and we see the response now I have used surrendered right over here because whatever it's coming from the computer. It's already into the asking for Midge. If I drew serial dot french, then that's what it will do. Its it will convert the research number into US Key and then print put onto the computer. So what difference does it makes? Let's see a ski chart on Google. So if you are aware of the ask a jar If you have seen the escape charge before, you can easily know that our ski cord off E, for example, we'll just see 11 Such your example. So the asking called off its 65 when I transfer Vanek, click off Press A onto the Syrian port are onto this terminal over here Capital E. Then what it saves is basically 65. Okay, that's expected. Saved a lot. It's a variable when you don't surrender. Right Then that 65 is as it'd cinch to the serial port. And so the serial port interprets it as letter A to D printer on there so we can see even in terrible here. So instead off, I don't see here. Even if you type 66 decimal number, then cereal, not right function will send 66 onto the serial port without doing any conversion. Very clearly. 7626 will be sent. And whenever you press anything over here, you will see. So I'm saying I sent me. Now this would be one. Do I'm looking at me because when 66 it singe with real, not like function. Then it appears as we and if I click on or if I use cereal, not Prince here. And then I did you a 60. Then what will happen? It will bridge the asking core off the ledger. That and sending from the cereal. Butch. So you have to make sure I only have to see if your reignites already interesting. For much or not Next, see open the terminal now if I send everybody injured and Mrs different because similar print is doing what surrender bridge is manually converting what they've other. You passed sewage into the equivalent us keep printable characters so artistic contents ate a means The number 65 similar print is then converting six Intersolv ski fireman Berezovsky and then renting on your computer Do some experiments with surrender presidency in our village and we get the idea. So that's watching this video. Do these experiments and see for how it works for you. Thank you 27. Serial Chapter 4: hi there. Now that you have seen how we can use the serial port here in this fashion, what I have to do now is I have to try something different and that something different is actually I want to control a device using the serial port. See, whatever you send on the serial port, I need to control a device or for that sake example consider I want to control in Eladio off it. So let's begin with this video and see how you can control and led with serial port. No, definitely. If we want an entity to be controlled, then I need to set it up over here. So just right down inch led is a call to tartan because we have a little connected to bin tartan on every Ordina board, then in more tart in coma output and then digital right, starting from a blue so that initially the rudiments off our illegitimate it's shut. Now, instead of doing this equal program, you have presidents and you happen Is that now what I do is I have to check for the objectivity of him. What is it assumed in the United States? So I have two options. Either I can do if Adex tree is equal to equal toe 65 like this. If I know the asking core for the letters with which I need to control the Hillary Now, for the sake of this example Lexie Capital a should done on the lady on Capitol Be shoot. Turn off the led. So either you can have the ass kickers off and be to compare are directing simpler. You can simply just check for in if I didn't see is equal to equal toe a, then write down a loop very well down. Did you tell? Right? Political my high. So this look will make the lady go higher. And similarly, there will be another a flu if our instance equal to equal to be then digital rights. A little coma? No, that symbol is not now. I will be downloading that into this board on. We'll see for the output now. So, Leslie Condit, download button, Let him download the program and then we'll see the output onto it. I hope they already know nobody is visible to you. Yeah, the downloading procedure is done. No uploading. It's done. Okay. And now just open the serial terminal. The terminal is opened. Hello. Well, it's now give capital you were here and then simply gone. Sent. Can you see the lady turned on here at this point? No. I'll give Capital be over here and daily should done off. And it's that's must as it's gonna be. There are no d leads there. Relax. Now remember also wanting If I give small B wonder anything, it has to be Capital B. Every letter has its own unique asking character, and while comparing, we have compared of it Capital N Capital B. If you wanted to be with small A and small be as well, then simply do what's put em percent and percent our instead of infesting. Just put our I'd extend equal to equal so small it miss even if I don't raise capital. There are others physical too small here, even if they are registries political capital B Even if they are X rays equal to equal to small, then that inspector actions will be taken. Now we're compiling this program, uploading it onto the board. Once the uploading is John will again open the serial port and see for the output now I opened the serial Porcello world is there I'll bet Small, you know, turned on duality. Capital B turned off the led capital eight and on day already small B turned off daily. So that's about it all you have to do now it's trying an experiment with h different led. It's your sequence off it. Illiterates should be like this. So capital A we see the e f g a b c d e f g h So many of you capital letters, then h different delegates are to be controlled individually. So let's say, Lady, it's connected to open number two, then three, then four and so on on. What you need to do is unit toe individually control each led with Serial Commons. I won't give a solution Toe this and you have to do this completely on your own If you have the Arduino hardware villain goods. Otherwise you can also routine tinker catch So the capital letters should turn on the allergy. The small letters should turn off the led and then Capital X should done all on and small X should done that should make oh off. So can you do this? What you will have to go toe achieve this programmer To complete this program is will have to write down individual led declarations. You have to make every single entity workouts or paternity and then in every a flub like this, you have to write down individual statement. So A and B is John here. So it's for on and then small is for off Similarly yielded, right? Don't it are 16 social apps to control and unusual led. And lastly you will have two more Lopes if a mixed race called two X capital of small on NH No people. I don't eat certain once at the same time. So digital right led even higher Distant right led to higher digital led military high and so on for all intelligence I have been able to perform this experiment Trees Really? I don't think so. It would be that difficult for you. Just give experimenter and let me know if you face any problems. Thanks for watching this video 28. Serial Chapter 5: Hi, everyone. We have seen on experiments that we performed with serial port in Giardino. In case if you don't have the Aryan aboard with you in your hands or right now in your position, then this is the tinker catch that I have shown you previously loving to tinker care start a new So kids go to the soldiers and then start a new circuit and just take and are you know, you know I have just exactly the same thing. But for the sake of understanding, I will repeat everything. So this is the thinker can log in Monza, Logan, when you go to the soccer to come here all hours of conception. So create new sockets, Nigel. Here you'll get a blank slipped or open work space where you can create new sockets and then search for are you and then just take on this honored, You know, you get in already know border like you, Then go to the score section and instead of blocks. If you want, you can also use this blocks. But this is an advanced already know court. And that's why I'm not teaching with the blocks I have created another complete score. So here you can do this. Globe. Esther. According now, we want you to do any extra work. Just stick next one and whatever program it's coming out there. The living program, Delete touch and best our program here. So that's exactly what we headed in toe control. The led on and off its capital A and Capital B and so on. So just I don't this program and start this evolution was to start this evolution. You will see the cardinal. It's shown like character over here. And then you can use this serial monitor to see the teacher coming in goods. Hello, Where it is already there. I will zoom in there. Are you know, board This is the lady number 13 and now you small here, the ladies on small B and it is off capitally. It'll be off course there would with some lag in the response, because it's a simulation more. But you can definitely perform all the cereal related experiments in this fashion also. So I'm going to show you how to create an up down comfortable using the same finger Karen moment in the next video, we'll see how we can create an up down counter reason Serial Port M two switches that's watching this video 29. Serial Chapter 6: Hello, everyone. Let's continue with the recession on cereal. Butch on, Uh, for this video, let's create a task so you can also know this agility task would incur get here. But now my house is different. So there needs to be true switches in professed word you know, on. Then I just need to do what I need to create in upcountry, so that if switch one, it's breast. The count should in agreement from zero and up and rent on terminal. And if you switch to its breast, the count should be agreements. And bring John Tamminen. Remember, the count should not go lessons, you know, and it should not go greater than 100. So it should be only between zero blinding after identity General, back to zero. Now let's see how they can do this. Hugh. What I do know is I've been stopped this evolution, and then I will search for the hardware components that I want. So what I want here? It's a switch. Oregon also searches good a button. So push button is what they need. One end of the push button. I really connect to be number two, and I would like another switch war or another search the other end off this rich every kind of to three. And I will take this. I was shorted with this just second quench and then every connected to grant so directly the usages are connected to the branch. There's the meaning or fridge. Okay, So when this which is pressed, what should happen with messages press it should get zero. And when they leave it, it shouldn't get anything. So when it doesn't get anything really pullup register or really never pull a business to you. So what I'll do is inch is the big one is going to do inch as, um u two is equal to three cylinder begin is OK then. Hello is okay then been more would have wants Now it is a view coma inputs underscore. Pull up similarly copy paste This life sw one is of your to in the loop. I will remove all that is return over here and I will see you focus on counter variable. I'll just take a counter variable over here in county school to zero and then I'll do here . Watch if digital the leader as of your one is equal to equal to look because of this, which is pressed, it will give us low. And when the switch is released because of the internal pull up, it will be nets high. So digital release which one is low, then called restless and a semicolon. And then serial dot reps Allen goes, Let us just write down this much of the court and try job. So we're attending court on You can just simply start simulation or here. Okay, so this which is already pressed just village. That's some pretty appealing to video. Remove the score. Okay. It has to be this switch. Just let's leverage quickly. So no distractions. German in one day to be toe. I'm just gonna just one toe ground village. That's correct. Uh, to see the lead is coming faster. This which appears to repressed. You know, it shouldn't be because we have created internal pull ups. The connection with switch. It's somewhat mistaken. Let us rewire this nine. So far, this virtual just completely different. So it's your budget, Nurse trickle slaves which Mr Physical Simplicity over here. So do you connect here and one and connected crunch. And then I've been start the simulation. Keep this. Which in this position Stop this demolition. The such position. This? No, you get it. The council agreement slowly, but it appears to be incriminating very fast. I'm not able to use the switch here, so And stop this evolution and stop the court. Ridiculous which to some place like this and then struck solution, then Citicorp. If it big this wish to disappoint, the gun stops. But when I do this, the council only increment once believing it is incriminating my different times. Why? Because whenever you present switch and you release that particular switch, what will happen in your program would execute for that much amount of time for which incorporates this which lex? I pressed the switch. 400 minutes occurs only, and they left it. But even in those hundreds acres, this loop will execute number off times. And because off that what will happen it's the counting glimmers. Multiple times. So what you need to do, It's once you go. All the processing, depending upon just went off. How much time you will live to leave the button broker dealer. So let's say after executing implementing the count said, hey, get onto the serial port. What we do is people to delay off 500 milliseconds. So what happens is because of this 500 milliseconds program. There's nothing on. There isn't enough time for the user toe. Leave the button. Now let's start the simulation once again and see how it woods. Now this which is in the opposite direction. Nothing is happening now. I recipe and and visit back here. The final became on ballistics again. It was backed seven, eight and night. So similarly, the program will be modified for the seconds which they're the only difference. It's count minus minus. Now die on this. You have to also change this. Which one does which to and see for the foot for yourself that's watching this video. 30. LCD Chapter 1: have you Even in this video, we'll see about the liquid crystal display. Are LCD on how we can interface them with you? But you know, board. So let's begin, Elsa reads, are basically the liquid crystal displays of comes in variety off different types, primarily the most popular one, which is used in embedded systems and with micro controllers and the one which we're also going to use right down. It's a textile city, so a Texel city it's capable off displaying text characters. Everything that can be printed using our ski characters weaken views the textile city for it. Secondly, there is a graphic cell silly, which has the dimension in the form off fixes. So 1 28 by 64 or 2 56 by 1 28 That's kind off. Pixel based displays are graphic displays where you can individually lit each and every pixel and farm either. Next, not even big chips extending the graphic Cell city toe a bit color side. We have TF deals as the less toilet. It's well, it is. Our colored as a less black are not black, basically but monochrome, which can dispel given color to Colorado. Meticulous on. We have the FT's, which can display a number of different colors, usually the ones which are used in mobile phones. The DFB's. Now let's discuss about the textile cities, particularly that sense. It is come in variety of different sizes, so these are only four options. 16 by 1 16 by to 20 by two and 40 bite. What it means is, basically, you can print 16 characters in one dro and such there is only ventral. Where is your 16 characters can be printed in a row and says there are tools. We also had a bite to it by four kindof displays. Also, we have 20 my tools 40 my toe. As Ellis, 44 displays are also available, the most popular one, which is used with our Dino. It's us extend by two l City, which we're going to use similarly deserve types of graphic display, sort of which want to retire by 64 graphics displays most popularly available and being used. Now let's see how we can use this esteemed by to display with our deal. So succeed my Tooele City vibe. Use it because it is very popular across the world, almost everywhere. There's Extreme by Tooele City will be available. It can displace extreme characters per line and such. There are two lines in this display. Each character is made up offer pixel matrix, and that is a five by seven pixel matters. You'll get to know that when you're actually using it. So every dot is made up off fire columns and seven roads. This part off L City. It's very easy to be in professed with microcontroller because it has an on chip L City comptroller. So you're not actually interfacing with the screen. But you're interfacing with the on ship L City comptroller, and whatever they tell you passed to that controller is then passed on to the LCD screen by the controller present on Dale City, usually edge datable 470 Touchy control it is. There are a similar one made by Samsung. It's present on to the city, so this controller has a commander, sister and data resistor, to which we have to send the printable data or the executable com arms commands like printing on first line printing on second line reading on first line. Fifth column branding on second and seventh column and so on. And the data is any asking later that needs to be printed. If you look at the city without, it looks exactly like this. So it's a 16 by 12 city on It has got a total off. 123456789 10 11 12 13 14 for six. Exactly. Substance after that's extensions each are do talents, and out of the remaining eight pins, three are control signals, which are artists are the blue enable and the remaining pins The remaining five. Our power signals ground visiting he our power signals for a city forced minutes to the grounder. Second brain needs to be connected to the 65 village. Third, we ve is a contrast control. So what? You have to do its connect apart between ground and the sissy and give the valuable points to contrast Control pin. If you move the part towards ground, the contrast will increase If you move, depart towards with sissy the contest with secrets you have to set it based upon your best based upon your choice, which it so table to you on this last two prints are completely optional, but good. If you use them. They're used for the backlighting. A leading. So this one are the else area that will look like This is a having green backlight Hillary . There are some blue backlight L'Oreal cities has ratified back little cities available. This one has a green yellow type of back licked by correcting a little place and led minus two fire world and ground with suitable distance. You can turn this back light on. Let's see how, exactly we interface it with any microcontroller. So this is how we just discussed post minus Graham. Second has been sissy targets. Contrast adjustment, then address or register Select. It's a selecting commander, sister. Then to spin it slow selects the that is still under spin is high. Relight signal is a real slash, right. We usually keep it low to write to the register. We usually don't read it and then different thing with our you know you need to make this been blue. Always level is up in which reads everything that is put onto the detailing and the register select and the other slain. Then a pulse is given to it so high to know pulses to be given to enable every time you need to send any character. Well, city, the 02 db seven of the H D talents through which you can send the Commanche or printable deter to it. And as discussed, sleepless and led miners. Are they back late? A little lines. The advantage with us is you do not need to use all each day talents and you can choose to use either All eight of them are just afford off them. That is deep before maybe five, maybe six and seven. Then you use four of them. Only the data it sent to the L City in nibbles means forbid First forbid later. And it gives us a big flexibility because interfacing lens are drastically reduced. This is how you and profess and L City with hard, you know. So this is how the point it's connected to the sissy and ground The variable goes to be even first win goes to ground. Second goes to the city. Artists should be connected to already know r w grounded enable connected toward, you know, and we directly use forbid interfacing more severely used before defiantly 67 pins connected toward you know thereby. We only need to spare. Six Ardan opens to interface with Hell City. Lastly, for the back liability connected with sissy and ground with a suitable small fella register like 39 0 home or 50 or home on 100 home is also okay. And then after you make this kind of connections awful silly, either on bread boards are on any PCB or even on the Pinker girl. Then it profess artists and Alberti, 44 to 67 toe. Any off depends off the Arduino microcontroller. It doesn't matter where you do it. Anything will do now, once the connection certain we need to see if there is any library present or not. And, of course, our little heads a Briton liquor can still library. If you're using this library, you do not need to care about giving proper signals to Artis Annable as well. It's all that before differently. 67 pence Ali Tudo it's unit took include the liquid will still library into a project with this line. Then you have to initialize an instance off like orchestra libraries like this liquid Crystal l City, and then specify the bills where you connect artists in Apple before B five, B six and B seven. There are some very common functions which meals for L City. First of all, insect up unit two years L City not begin on here. You specify what type of city you have, so we have 16 by 12 students to just instant tomato. You can use El Sereno print to print either direct text strings like this, or even you can print variables with L surgeon or directly. So if I have a variable A, which contends some letter, then it can be printed directly. But also do not print, then answer. You're not set cursor is a function which we will be using multiple times. It basically says the cursor to bring after a particular location, and it is usually structured as column room that their arguments to pass our column. Andrew Here the columns are zero carbon, and the rule can be zero to 57. The Collins can be 0 to 15 and the row can be zero or one. So wherever you want to print accordingly, unit to set the column between 0 to 15 and row between 0 to 1, and then you can use also your brain function to print onto it. Then we have incident or clear, which clears all the L cities, whatever it's printed on to the city. And we're not home, which takes the concert to the positions, you know, common 00 Solomon Now using all these are functions. We will now create a demo program or a test program for Ill City and see how it works. For now. I will create it in Tinker care as Villazon to the hardware, and we can see for how it works. So let's begin with the experimentation. Thanks for watching this video. 31. LCD Chapter 2: Hello, everyone. Now that we have seen the theory about L City, let's try to do the tactical around it. So apart from this most commonly used functions, there are, ah, number of different functions like this, where you can try out with concert linking no cancer, no blinking, displayed nor display, scrolling to left. School it to right or just roll. Number of different functions are there for experimentation, but for now we will create the small, simple program. Now I have created a schematic, their addresses connected to open to enable it's connected to win three. Then the four is connected to four defi. It's connected. Been five off already know being six to the six of our you know and the seven to the been seven of party. So once you have done this, all you have to do is you have to include the critical still notation your program, Then give the constants very connect artists and every 40 30 67. Then create an instance off like orchestra library like this. So liquid crystal el Sirri and here into bracket, you write down rs an apple before the 1st 67 their inward set up What we do is we simply do Elsa date or begin 16 comma to That tells the compiler that we're using a 16 by Twin City around to the next line. We French el Sereno Grinch with robotics, for example. So there's just an arbitrary text in sort of this. You can drink anything. Remember by default when you dual Sirat begin. You don't need to specify cursor position because it is by the fort present at the zero comma zero position. But still, for the sake off understanding, I'll mention it. So you said the cursor position. So first foreign first column or zero trends he not column and bring something over here and then would look what we're doing is we're setting the cancer to the zero column off forced minutes for us, the second Rafael City and what we do is considered not French Millis. Comma 1000 millions is basically a function in our dino, which returns the number off milliseconds since they are, you know, hats turned on. So whenever you create this kind of program onto the already know I d, what it will do is it will print with the robotics in the first line. And on the second line it will pray the number off seconds that are passed from the beginning off the court. No, I have. Ah then boat off them. I have created this program. So let's have it and lips put it here into the garden on board. All you need to do is then connect. You already know to the computer I have not connected idiots. I just can't get it and then download this score onto their snowboard. If there are no others, then you cord is downloaded onto the garden aboard. And then if the connections are right, then you can see the rt nos el Sirri or else be connected to our you know, well, create this kind off printing. So they're putting started it that's here in the first line. Now the second lead it will print didn't but off seconds. I have ah, really created one such video. So let's just have a look over it. So that's how it looks when you do it. So this is three connections that I have created on bread board, the parties there, all the connections all 40 40 40 67. The backlight led everything is performed, and this is they are you know, that we have connected. So what it prints is with their bodies and on the second line, as you can see, the total number of seconds that are passing by printed. So 123 and it just goes on and on. As long as you keep it on, the total number of elapsed seconds will be printed Over here. The harder connections are intimate, simple. But you have to do it carefully because if you have no experience before that, it might get a bit messy for you doing all these things on a bread. And for the sake of comedians, I have also created it here into the simulation on Tinker Care. They're all the connections are made, the registers connector we have also we have not given apart here. Instead, I have been contrast with the ground so that it gives full contest. But the programming with already know wanting her card is quite slow. As you can see, if I start simulation, the simulation time is here. So a terrible Texas printed a series sprinter, but it is not becoming one because assimilation is running quite slow So when it becomes 18 minutes one second has been passed, Then this zero will become one. Thanks. So on have used the same court over here. No changes at all. Everything that shone under particular scream. So try it out with your set up with your connections that you have created on your Arduino , either on our dino or under simulation platform and see for the result, you need to be experimenting with the incident or print command as wrestles with don't circumvent. And so after you do with this particular thing, deserve the tasks that you have to do within city. So the 1st 1 is I have given you some protest off Millis function. Secondly, hard to create an up counter using el Sirri. So enough counter using L City what you need to do its unit to simply use a single sitch. And whenever that switch it's pressed, account is implemented and Fender Khan is implemented, and in a similar fashion you have to do it for two searches, which would be up Duncan. So here there is only a single switch after missing, which the count increments on. In the second assignment, you have to have usages. So many press one switch the count increments, and when you press the other, switch the count disagreements and the same is for introductory l City. It would be but took it for you to experiment with Ansari, especially if you have no hardware experience at all. But just make sure you do the connections properly. If all the connections are right, then there is no issue. And if you find it difficult, much difficult for using LCD on bread board, then you can also use the L City shade that comes up our deep from the robotics almost everywhere it is available, if you look it on Amazon or any other leading e commerce in your country, are denial. Cities shelled are available everywhere. The artists enable Connections are different for the show, but I would suggest that even if you are a beginner, go for doing the bread for connections late. I'm like I'm showing on the video because it will clear a lot off concepts for you people. So I hope the session would be enjoyable for you when you do it on the hardware. Thanks for watching this video and keep experimenting 32. Concepts around keypad: Hello, everyone In this video, we'll see how we can interface a key pair to earn, You know, Now we have seen that how we can interface a single switch toward you know, Then what is the need off a particular device? Something like this called Keep it. Now it is quite clear than when you want to interface a button or whenever you want to interface any switch to our dino. It takes one particular pin off the argument so one button is required for a particular cinch. So consider know if I have to implement a keypad where I can access nine different numbers or 16 different numbers, then I would require 16 different spins off are, you know, to be connected to 16 cinches Now you finally 16 in person. Definitely. I have to have substance switches, but spending are utilizing 16 pence off are you know, for a particular keeper is not that suitable. And that is like something like this. Arrangement off kids issued a list. This is called Little Keeper, and this in particular here, which we're seeing is a four by four. Keep it. It means there are four stitches in a column and such. There are four columns four suggests in a room you can see and says there are four hoods, so it has about a total of four by 4 16 switches. But the arrangement is made such that wherever this which is pressed, let's say if this is a B, C D and this is 1234 So if I press this switch, this particular switch, then this a gets collected with one and nothing else. So this a gets connected here, but at the same time it gets connected to all other switches off. So you need to understand that whenever something is done or whenever switches breast, and what happens is you need to be scaring on the lines at the same time to understand their particular keep rates or switch place has been detected because this been will become high, then this which is pressed, Are this expressed? Are this expressed? Are this suspicious? After missing any of the switches, this particular point is going to become logic hype, for example, so it lives a bit smart algorithm toe check. So if particularly this pain has got high, then immediately the controller needs to check this bills also on. Then it gets to know which, which has impressed usually this kind of keypads are used when you want to. Except the numbers from 123456789 star zero hash and then ABC the execution six us Exim Virgin for my four key bent No talking about using my really And how do you deal s this kind of people are going to use this kind of keeper with our You know, Let's see, the connections are very simple if you want to use this hand off keeper with audio connection separatism. So this is one of the most popular member and keep air, which is available in markets. I am also using the same kind of keeper. Just have this keeper. It has only each lens off interfacing, so it rules and each columns make sure you connect on the rules and Collins directly to our you know, pins. And then you can adequate started, you know, program for tips for I don't know the program for Keeper. Unlike liquid construed display or else silly are, you know, doesn't have a building library for keep it on you need to download and install that library from the liability manager. If you have done this before, very good. If you have not done this before, just look at what I'm doing. And you have to follow the same procedure. Some water pools, many over here. So sketch many over here and then going to include level and then pick on manage levels. One simply can't manage. Libraries the library manager would know will open on here. You have to search for keeping just so smoky. Better on it would provide of it a lot of different life. It is and up that can be used to interface Keeper. What we use is this particular library the people had by month Stanley and Alexander believing this to people are the official library developer for wiring boards and the keeper elaborate. Created by them is the one which we're using, which is, Ah, quite robust and good, Stephen. So just selling the version and you can install button and then that particular library will be installed in your computer was the keeper libraries. And still I'm again showing you this one. My Mark, Sandy and Alexander Blue you once the keeper library is installed completely. Now you can use this program or this part of your core. So what we do in the score, it's we included the keeper not insured. If I then we specify how what type of keeper and I have. So if you have a full by full keeper and then make sure that that's four full fell for my three keeper than measured is 40. And then what are the keys that expected to keep illiterate? So 123456789 stars Little hash on This is the fourth call. So sometimes you might need a BCG for them or bless minus the very going for them. The difference you can choose did symbols according to your agreement. So specify what kind of cheese you want in your program over here, and then specify where you have connected the roads to your garden aboard and very collected columns to argue. So what's wrong with unspecified number of rows? Number of columns, then exactly. It's the intro bins and then column. It's We have mentioned all of these things. Finally, we create an instance off the Keeper library. They're safe. So let's go some keeper, and what we allow over the scent to it is make a map according to watch are exactly It's then the passage on the Rubens, then pass it on to Colombians. Then we pass it on to harmony, rose a chance and then pass it on to how many columns this particular keeper hats. So they have arguments all at once are to be given by creating an instance off this keeper leveling. That's just in Cuba. Now that much is the initialization that you need to do. Once the program starts in to set up, it will execute this line toe, begin the serial port and get out. And this thing is very simple. Just stick a character valuable you can take. Invariable also doesn't matter, since we have no, we know that there has to be a single character that is going to come. So we have just charity, So a carcass donkey is a gradual custom keeper them up. This instance. Dutch Gaedcke is the function. If whatever the custom keep at it, returns is a valid value or non zero value, then that's people in Toronto, the serial port. So if the keypad doesn't return in hell in value, then this one should be your dollars. Zero very rarely does a value value on some expected value. Then it does. Or then that particular function there does that exactly, which is between the Red Sea. So if custom key writing, this is equal to reading. If the Stuckey is not equal to zero, basically, I think this single variable in if movements, if that variable is a non zero, well, then Brooklyn Bridge onto the serial bush. But it what you need to do next in Just upload this program and see for your coach on the serial Butch, so I have not going to be bore. Outside core was not loaded. So and that bridge, the problem is applauding. You are free to extreme intuited by opening your terminal, and we'll also see the interfacing and output of this still there. Sit down. Voting is done next. As like before, I have an extreme interviewed you over here. So I have the same kind of key pair here, which has a busy printing on the fourth column, to which we have mapped that's plus minus divide an equal to symbols so and just play this video at best one here. Agents went on to determine. Listen, do the industrial under terminal. If you can't see, the connections are pretty simple. Answer forward all you have to do its direct. All eight lands off the keeper to our you know, and you can get the kids as up here. We have printed skis going two serial ports. You can also bring them on L City if you want to, and you can go anything on any kindof receptive keeper. The approach. It's simple and there. So I have a bridge shock if you don't want to use celebrity, and if you want to create your own logic off keeper, then l provided you with links to read it, eerie about it. But for most of the people accessing the keypad, news and library is the most of develop shin. So do your experiments and let me know if it weren't successful. If you don't have this kind of keeper arrangement, then you can do this in Trinkl can. But I have had very hard with Duke again today, so it's not bringing anything into it, So I tried and I did almost everything that I can, but, uh, the simulation is very strong here on their side. Start working for me. So try. Don't on your hardware and do the experiment that's watching this video. 33. Analog To Digital Converter Chapter 1: Hello, everyone. In this video, we'll see how we can accept on an alert signal onto in order no pin on, then converted into a suspect. You did. You have. So I know we need to do this kind of thing. What is basically an alert signal? Whether we say an alert signal most off under, not what happens is the signal like this. A Sinus I didn't being comes in or much an analog signal. Although assignment is an animal of signal. But normally an analyst signal does not have to be Silas Idol. Only it can't go any kind of leads. The job off currency is to convert this and no signal into a digital signal looking like this? No, absolutely not. The jump off any see? It's to take up article a sample off this analog signal. Let's at this point film and then converted inverse digital representation off. How much is the voltage off? That particular point? I will a bit that jump off UTC on my chin. Julia are anywhere is to take a sample off the input signal and find out its voltage. It generates our creates a number a digital signal. Our digital number which corresponds, or which can correspond to the four days of that particular point. So whenever you want to regional warded off a signal, it even doesn't match physically. Listen alone are not even if you have a plane, busy signal coming out of battery. But if you want to know the validation off their signal, then you have to take years off it easy. Why? Because otherwise, if you never give it to a logically off microcontroller, it will either say it could see love on less safe. It is less than three wood. It will Cecile. If it is greater than three words, it will save on like that. We've been here about the logic levels of control. I don't want that. What I want to do is I want to know the four additional decisions. And whenever the signal for dish is unknown and it's to recap religion, then we need to make use off. It is so let's see how we can do this. The concepts off heresy are very important, and if you understand them villain better then there would be no stopping off you. You will understand every single thing, every single microcontrollers receive such everything. So just paid some careful attention to the eighties. Hasn't, will you? The job off jealousy is to convert an input. In that respect, you are put signal. Are good number conventionally there? This is where, like this only their input, what's collected in one age. And it used to gender some or precedents like this, which can be rare as an aid. Which or a digit number So the ABC is on toe have some upward resolution on how Maney number off output digital Biggs it produces. That gives us the first Contrave or first Adam a terrible DGC, which is called US Resolution authorities. So this is the resolution, if original, excellent. But our pretend that Resolution Off Indices image so generally a bridge are 10 witnesses available If there is an enema. Tennessee, where it simply means is there are 10 upper bits that conditioned Richard in election. If I open A nor pair in a pretty can generate an output as minimum is this. And as maximum best is if you look it into the decimal format, it is zero and it is 55 whereas a temp agency can gender this minimum signal and this maximum signal. So this is in decimal zero that piss in decimal. It's 10 to 3, almost five times more than 2 50 thing very to mortgages. So attended Tennessee off course will give more nimble officers. But one of those desserts, actually, let's see this light, and then we will go back to the initial decisions. What it is he basically does is illicit converts. The entire range off prodigious from 0 to 5 vote into equal number off steps. I'm financing fiber is because we're discussing about argue. If there is a different agency on a different kind of microcontroller, it may be hiding. Five words are 3.3 words, not more than that. Now this. Consider this side as an example, off having up tributaries attribute heresy and produce as minimum as 000 and at maximum as one gunman as the digital open. Now what this tributaries will do AIDS because off it is in primitive See the resolution, it said to me, each with the maximum number of our person on it. So what it does is it converts the entire range off the revival in tow, age equal steps. Every step is given with the number. So if this is the lies between zero to this particular range, then the number given to it gives you then if it is between the first and second stage number, given this one second, enter the number given to is is and this and this and this and this. So basically what it is it does is it gives the signal a number depending upon which place it is in the table of the strips. Now premature dizzy is impractical, impossible to create because they reveal off no use. But what if we have an end? But it is The 0 to 5 alert level will be divided into 2 56 equal number off strips and every step will have a number from zero do go 55. Similarly, candidacy will have 10 off proof or equal number of steps with numbers are with lines are with names as 01 to 0. So I directly there has to be something called S a Step sites or some steps sense formula has to be off course. It's quite evident that the steps says we're equal to the difference Vintage that is the maximum dish be winning by resolution, so this four hole is very important. Step sites. Is it going to mean, if demanded back the resolution in case off our five, which are a pretty busy sorry. The Steps sites is five, divided by 2 56 total number. Visitors on it is equal violently equal to train. Jimmy, Liipfert. What it means is when the impersonal is between 0 20 million fold, the number attached or open attached to that signal it. Zero. If the signal is between trained you to 40 million. Worse, the number attached to it is well and so on. If you don't about a 10 minute busy, then the steps sides off. And with ABC, it's five divided by 10 to 4, which is equivalently Quito by millet, built precisely, its four point each, each malevolent. We can do it in Cape later. It's a present for her that it is what went it? Didn't believers 0.40 forage walls? When did men 1000 gives me cleavers so that does the concept off strip says whenever the signal changes that strips away whenever the signal is between two steps against even we talk number in the next video. Vincey Elodie. Further concepts off how we can compute the digital helps and a look in. Thank you for watching this video on. I would say Watch it one more time if you don't understand the concept with think. 34. Analog To Digital Converter Chapter 2: Hi there. In the last video we have seen What is this step sites. So state size is the amount off? One particular says of value. Are the Brits off one particular sites? Which is you, Julian Liver. So four point each. Each medieval Is this step? Science, when you're using, attended a reason with Are you now based upon this trip since, for example, Lucy, for what you did really well, use my strips it. So my first trip, it's this, you know, do for one day Get delivered is going, lets you then for one dated when the bread bedroom looks, let's put it in excess ships to get a better understanding because I would be able to do the calculations much faster. - Well , 0.8, it went to black. The next slit hope trade. Tolo. Okay, lets them never got an idea. Okay, Now, whenever the signal is between 0 to 4.8 million folds, the number given to it as digital value it zeal when the signal is between 19.5 million won , 24.4 million is the number given to it would be this and so on. So the equal number of steps is a very critical concept to understand how we can convert input Signal Intelligence division. So digital output with respect to agency is on a log in whatever resupply, divided by step sets and ultimately the analog in which waas. If we need to calculate, then it means digital out multiplied, Wester says. And get some are you know you will get the digital out from the BBC and by multiplying it with step sites, you can decide what was the exact value or what was the example. Stage applied in mid levels on the panel opens off. Are you so this have the agency concepts on are very, very important. So the ABC can be used with hard, you know, on all the input pins off an arsenal, as you can see, is zero even into entry for effect. We have six analog signals and we will be performing different projects with this analog input from the nets with you. So thank you for watching this video and let's see a digital world mental project in the next with you 35. Analog To Digital Converter Chapter 3: I knew in the last video we have seen the concepts off jealousy. And if they're hard to destroy unity out offer, just agree with me will explain it with on assignments are passed now so that it created completely here with you. I went to go hear It's I'm going to create a digital world winter using ah, simple potential with, um and I already know. So just use a potential media collect one point off, watch two fibers, the last points to go out. And this is the very big point. So as a potential leader, the word is at this point we move from 0 to 5, graduate in some steps. So what? They were a point you are. If you're unsure, What we need to do is we need to find your duffel digital that particular point. So just use this kind off part connected. 1.2 is easy. Last points to ground and the middle points to the rd nose and love input pin. You can use any analog and probably not off zero toe. If I'm over here on, I'm going to do this, program it speaker again and we'll see the Open on the Syrian. Um, you got off course through this with you on a particular hardware. If you have right now in your hand, just go on with the are you? No, no, no. England. Catch. So if taken out, you know? No, All I want is just a bunch. Traditional media, I hope because But what must happen? Yes, that is being sure we don't. So these are the Georgians. And you, So I want this will help in to be connected. Who are, you know, any off the pin of the true connected to? I don't And then they're using the numbers to change the grade of the mind. This is that's the motive. Now open the floor window and lives right down. A very simple poor for this. So in symptom, there will be only cereal watch begin 9600 And it's blue that it may be Mexican. Inch in, uh, voltage is going toe on a look. Really. And let's spooks in number is evil. And then cereal north, please. I would. And then let's take a video once. I hope the simulation runs in a fast so that this one's gonna be like and be upset. That's 100 in the program. Let's start dissimulation. I'm not doing any conversions over here from the ABC on a lot greater function. I'm gonna clip ending it onto the serial port, which will result in a number between 0 to 10 to three based upon their the part position gets so have opened the city interpreted and what I'm getting it. Zero. Let's stop the simulation and listen, Ellen, so that we get it on a new line. Soviet getting Siegel. Now I try to move this porch. And as I move the boat, the value coming out off the ABC is definitely changing. So I moved apart from zero. I'll take it to the middle point with a problem. Did say 2.5 volts around should give me 511 or 512 years. If I'm moving further today, you're gonna see the digital. Our port is increasing and it is going as fast and clearly up to 10 dude so that I tend most side. I'm getting 10 to 3 because the cultish coming here tonight. Now it's five word, and here I'm getting zero because the world ages zero at this particular point. So that is the simplest example off how you can interface this particular think this particular part and CDO put in digital form it for the sake of understanding. What I'm doing now is I'm also using word meter so that we can see the world age over here . Actually, So this is the ground signal on this Is the signal coming or going to the art? So let that's interface the same signal with the seem in, which is going to argue. And it is again during the civil ish so that we can also see the full. Did she can you so, uh, opened the corner window. Now the world motor is gone. Let's stop the simulation and let's take this world winter something you It would be good. So start the demolition. No, uh, let's look at the court and open. So but it's coming. Now. I increase the voltage to 300 million lunch now contaminated 16 IAC reasonable did somewhat more or less a 2.5 words that put its 511. So what I've done is I've just connected a hold with them so that you get an idea of what is the Ford isn't going to now what? We're there. We just saw the digital out off a 10 minute jealousy off Rto, which is between 0 to 10 to three. Now I want to convert this are put into the lock in because I want to know what is the voltage applied to it. So what I need to do is multiply the digital output by step sets. What is the strip sites? Precise ladies. 4.88 million for So let us sprint. What is it going toe port multiplied by four. Point it cynical and simply start simulation. Once you understand about the agency, things are pretty much simple. Now you can see what we come here is. It's rough printing it like this. I'll print it. No, Cyril Lord, Branch world. And on to the next line, I'll give many for symbol. And now let's start the simulation. You'll get a clear idea off. What is the world s four point favors? What we're getting for for a 10 million fold is ended up the Saints 3.9. Want what? We're getting its 3894 million foliage. Similarly changing toe any place and look at your 202 100 197. All the results are close. 1.2 words, 11.11 9 million words. I hope you have got the concept off really sick doing these experiments, if you don't know, hesitate to drop a question, but make sure that you given ample time to understanding the agency's so that's watching this video and keep experimenting with it. 36. Analog To Digital Converter Chapter 4: Hi there. In this video, we'll see how we can use the ABC of our dino. Locate another pressure that is original thermometer. And in order to do this project, you're going to indeed our temperature sensor called 11 35. So let's begin with the video. This is a small and a very tiny usable temperature sensor, which is factory calibrated. Toby replaced sides the very first feel when you hold it like this when you can really the name on the left side, opinions with sissy on the right. No saves the opinions ground on the middle. Been is a lock up, but violent, aggressive. But I do know all you have to do is connect. First went to five word last went to ground and there are four pinto any analog input in off our deal the temperature sensor, its factory calibrated to give an output off 10 millisievert per degree Celsius. So if I'm sitting in this room and if right now the room temperature is 25 million votes, for example, let's take a look better for this as we're using multiple times. So if right now the temperature of the room a stranger two degree Celsius, then out Butch off a limb. 35. It's 2 50 really foot and it is linear. So if the room temperature boards toe forgetting the census, which happens sometimes here in India, then our butch is 400 million foot and saw that is the Olympic defend them brittle sensor. The sensing range. It's from zero tingly sense. Yes, toe, providing a census based upon the deep rush it, which you are refering toe. We also have 0 to 1 50 degree Celsius sensing sensors, but usually we can. We have done the tests of time critical senses, and they're fine. You can use an attempt to define and see how far you can go with it. The working whole days is anything between 3 to 20 fold. Actually, I have mentioned for to 20 minutes three qualities also fine what we're going to do on the Mississippi in its five World, which is perfectly fine and okay, the interfacing is very simple. Connect the 1st 1 to 5 World Middle been to an organ put pen on the last one to ground and then, based upon this calculations, tried to write down program for 11 35 on, find out it's temperature. Then in the next video, we'll see the program. Thank you for watching this video. 37. Analog To Digital Converter Chapter 5: Hello, everyone. Now, if you have interface the 11 35 like this and now that you know that it gives 10 million for a particular Celsius output, let's see how the core for 11 35 will be. So you think they already know Heidi. Let's just to avoid set up inward several doings serial dot begin and and since 00 here, then that's about it. Will just go serial dot french Ellen more and then stick into jump is a call to and a look relieved is, you know, first of all, do watch convert this value off digital into the medieval form. So then physical room Tim Multiplayer before Quentin. So at this point, what you get is the applied import wordage in mid levels. I wasn't there. Plan input, validation levels. You know that input? It's 10 bolivars. Sporting results is actually attempt. It's simply very by Chen off this one, because if the current to room temperature is started in the sense, yes, the medieval value would be 300. So when you sense it when you read it and minimal played by 4.8 it what you will get its 300 by dividing it by 10 you get the temperature value, then simply drink it onto the serial cooks so that simple as that indicate really off. Two seconds. No, Carrington are gonna bore Correct a sensor, a letter difference. Answer to which and down Or this program on twitch and tell me, of course, saved somewhere first and then uploaded. But supporters applauded. You can see the output whether it gives the correct impression. Values are not. The program is uploaded. Now you can see the output helping the terminal. I don't have the resistance of connected right now, which I have connected a shot. Just a minute. Hi there. Now I have connected at the temperature sensor toe my guardian aboard, and you can see the voltage panel of the temperature Vandals coming up. So the room temperature right nights 28 29 degrees Celsius. Something, if you want, you can try increasing the temperature where they lose and drop the sensor on my table a bit and you can see the temperatures rising 30 32 Oh, such values if you have. If you keep it in front of the exhaust off your laptop, then also you can see the rise in temperature are just hold it in your hand. Very blessed, very tight. They do. No single is that English. But if I keep it as it, it's then after some time the temperature will again come back down to the normal temperature or the room. The president so that you two became the divan and 30 and slowly it will come down to the current room temperature, which is somewhat around 27 degrees. Senses will take some time, so go on with this. Experimentation with talented defying. The corrections are simple. The program. It's very simple. Tell me how it goes for you and how it worked or not. Thank you. 38. LDR Chapter 1: Hello, Demon. In this video, we'll see how began interface like Dependent Resistor or some also call it'sa for parrot sister. With are you know, now that we have seen how we can interface an analog device with our you know, it shouldn't be difficult for us toe interface any off such sensors, which provide as we talk, change in the distance. So Elia are for the register off us. Changes in the distance, based off under following later into it and therefore directly using this idea with any circuit are within the microcontroller. Been circuit also is not possible. We need to create a small circuit off this photo register which can convert. This changes in light into the changes in voltage. And those changes in voltage can then defect to the Cardinals agency. We can easily converted into the voltage value on, then getting proper estimation whether the fallen light it's too high, too low or video if you want. You can also control devices out of this earlier, so let's see how we can perform this experiment. In order to perform this experiment, you will require this idea and unknown resistor like 4.7 key are 10-K In my experiment, I'm using 10 kilo registers. So what you need to do is unit to create a bias in circuit off India with a known value register like this, where one point off idea was to BCC at the point of India comes to the point off register and the second point of vegetables to ground the middle point just connects to the are, you know, being so. Whatever changes in Fort age aren't to be absurd will be observed at this particular point . So when there is complete darkness on the atmosphere, the resistance offered by this idea would be very high. And because of that very high resistance off very low amount of current bill pastorate, thereby disposition divided circuit where he was no open village and then it is a high wordage falling onto the Algeria, Then the resistance off the idea of that instance offered by Delia for blue there by a big amount of current or a large amount of current will flow through the idea and heads the world resident appears at this point, would be higher, are much higher than before. Practically it will sing between 0 to 5 world. It will never approach zero as a less. It will never approach five foot. So that's the very simple circuit on, therefore during the program, for it should also be winsome. Let's see how we can perform a program. Auto Finch in Tinker. Can I have created an exactly similar circuit where I have taken a photo in Sister? If you search for for the latest early will, get it and then I have, ah, engage in system one wonder for the rest. Trebles to SNC 2nd 1 goes to it and can register the second being often courageous trebles to ground. I want so connecting our world meter here for the sake of understanding and simplification . So let's that I don't program for this. So this is the problem, Forage. Let's review the Wantage converted into the mill evils and then simply display age onto the terminal. We don't want toe display Millie Volt or something like that. So let's to start the simulation and lets it go. Now what we see here, okay. And start off print. It should be bridge. Ellen, what we see here in the digital value, the military value and if you click daily. Here, you can change the amount off light falling onto it. As you see if you change that wonderful light falling onto the Lear, the value is increasing in this now it is drastically changing from some small value through something about 4000. That is because the India value here or the registrant Hello here it's 10-K If, in the simulation you make it one came, then we can see the difference. So it is 29 right now. Click. They'll dear. We can just change the simulator for the sensitivity or the amount of light falling onto it . Then again, see the change in opal. So even if you do it practically, you can observe this by giving the light from a flashlight or dodge late that's watching this video. 39. LDR Chapter 2: Hi there. This is a test set up that I have creator of Italia. So as you can see, one point of the earlier is going toe the decency second point of wearables to register the point when your point is taken from the register Naylor combination going to the analog input pin and the second point of resistor is here going down into the glamping. By changing the value of the resistor, you can see a number off variation or of our idea off variations off British values that appear on to the terminal. Nothing. It's a normal lightning. If just press a button on to it, the voltage is quite low. And that's why the digital hello that is coming here. It's quite law. If we removed him finger from the censor, the value should increase No, with a flashlight, it should be. Furthermore, so five steps to certify 73 was the value. It flesh ledge is a concern now, says the camera and flashlight out off the same a same place. That's where the changes have not that clearly seen. I hope you go debut. So that's how you have to perform the experimental with India And are, you know, is the phone this experiment and see how it works for you. Thank you 40. Ultrasonic Chapter 1: and everyone in this video, we'll see one very interesting sensor, and it's interfacing with our, you know well. First, try to understand the walking off the sensor, which is an ultrasonic distance sensor. A resident distance sensor can precisely give us at the amount off distance at which an obstacle it's placed in front off it, and that's why it is useful in a number of different brush tips. So let's begin with this study related to ultrasonic sensor, and then we'll see how we can profess it without, you know and how to write down a program for it. So let's begin. So at said, ultrasonic sensor can give us the value or the amount in centimeters. Precisely off a distance are the distance between censoring up second, and that is why it is useful in distance measurement. It is used in water level indicator. It is also used. Ads are there. It can also be used in a second, avoiding rewards guard marking measuring dimensions, off object and number of such applications. There you can do a lot of things if you know the particular accurate distance between two different objects. One of the objects are the center, of course, and the second object would be something that the sense it is facing, so the applications are quite few. Andi. That's why it's very interesting to study about this sensor Anderson in Distances Siyassah zero for which is available. And so we'll use the same sense of for our experimental ALS. It's a simple for been device, and the operating hold is off. The sensor is plus five won't. The maximum current consumed by the sensor is 15 million people. The majoring angle. It's 15 degrees and the range distance is between two centimeters to form ITR, so listen to sentimental it. Want sense properly? Practically. We should use it between four sentiment or a hand do windows that gives very accurate users . So let's see how we can use it now as you can see the pin out, it has got four pins, Mrs Ing trigger echo and ground. This is it goes to five volt ground was toe, ground village Trigger and Nico are to be connected. Toe already know pins trigger. It's in Butch to censor. Men's are put from our dino and decoys. Output from sensor means in Pretoria. What we need to do if we need to give a 10 microseconds pulse to the trigger signal in my gut second high, and then we'll signal 100 up as soon as we do this. What happens is it emits, or it transmits a very sharp and very small ultrasound frequency, or you bust through the transmitter. So once you get 10 microseconds faster, take up in the ultrasound sound is emitted and the ICO pin immediately becomes high. The ICO pin becomes slow, then the transfer to transfer to the audio. It reflects that from a surface and when the second transducer receives it. When the reflective Sunday is received by the upcoming receiver, the ICO pin becomes blue. So the EQ open remains high as long as the travel off ultrasound. It's from the sensor to off cycle and from of second to censor back. So the earphone looks exactly like this when you you 10 microsecond trigger parts or when you go 10 microsecond pulse to the sensor, it seems, and Andhra Sandwich Or do you? I know to the audio comes back. The ego demands high as soon as they could become slow. It means the audio has returned. Now depending upon this. What we have to do is we have to find out the distance. So let's see how you can do it with a function compels in in our you know, we can easily get the duration off spells in microseconds. So for example, we got liberation off this total bubbles in Michael stickers. Now, how to calculate distance from it? We know the very simplest formula that it's ah spirits Gualdo distance upon time. So distance should be easily speech multiplayer by Thank you, but this won't hold through here because the time we get isn't microseconds on. That's why they are, you know, is not capable to do that long calculations in microseconds, value or magazine Candelo converted into seconds against spirit. So what we do is we do the calculation in a positive way. What we do is we find out the time now we know the spirit of some that is 3 44 meters per second, which is also made back 34 different syriza recent images specifically So if audio needs 3 44 00 or Travel Street 44 00 centimeters in one second, how much time is needed to travel once intimate, I repeat, if 34400 centimeters traveled in one second, I need to know how much time is required to travel. Once intimate, of course, that I am required to travel once in Demeter would be one doing in bad 34400 which comes out to be 29. Micro sick. So now we know that the time required for once intimate er, it's 29 microsecond and we have total time in Michael sickens. So the distance it's simply total duration be very where 29. But there is a catch into it. We are not doing the calculation here. We're doing the calculation here itself, so the distance travelled. It's double, and that's why what we need to know is distances. Goingto duration divided about 29 the whole constitutive better by two physical distances. Accardo duration divided back for big H, so this duration and microseconds divided by 58 gives the distance in exact sentimental value. I hope you about the theory behind the ultrasonic sensor. If you don't understand, relate once more, listen to it once more, and even if you don't understand them, asked me a question, but better if you definitely go on writing a program for it, it would become much easier for you to understand. And that's where you will see a program for the same. So let's end this video here and let's come back to the programming off. Doesn't make sense. Thank you. 41. Ultrasonic Chapter 2: Hello there. Let's say the ultrasonic distance and serves calculation and write down the program for it . So what we have done here is a very simple. We have found out the time required for traveling the audio over one centimeter and based upon that, we can collected or we come to this particular formula. Now interfacing is very simple that are you know that this is in its to go to five triggered news to go to ground. And Sir, ground been needs to go to ground and trigger any Coke and be connected to any Toobin's off . Are you? So what should be the algorithm or what should be the they do write down the program for it . First of all, initial is the serial port with 9600 which spends second or whatever about drink that you're following. They admitted to dumping go or act as output, make the ICO pin work as input then in center. This is fined up to set up up to this. No further part should be in Luke. What should be there in look metaphysical been zero, then make it high. After making it hybrid for 10 microseconds and after waiting for 10 microseconds. Make that in blue so that the 10 microsecond pulse will go and it will limit the order. You no monitor the pulse, lint off, cope in for the hydration and calculate the distance after monitoring the pencil in toffee coffee and after calculating the sisters, print it onto the serial port. Now what I do is I will try to write down the entire program from scratch. This video might become a little bit bigger, but just be with me. I don't think so. It would take that much time, so I just go to the Tinker cad and I'll create a new circuit for this particular. It's the science that we're going to do. So what we're going to need is, you know, artery. And then we're going to need a specific distance since, okay, I don't And something sensible Drew, because it only has got signalling. It has not got the to get an equal signal. Okay, this one has got it. It seems, you know, fight. It's Is it awful? No, no, it's just de electricity. And you skip this one here. So let's do the inter fencing. First off on five lunch and make it red to the city black. Been going to grounds? Then let's take a zero for trigger an ICO. It doesn't matter if you take this Angela pins. So is zero adds trigger. And even as but there have been some choose here you just need to accordingly. I don't a poor for it. So let's take the next best scoring that we're following. And here, let's declare them so in. Strict is able to is, you know, inch quizzical toe even been more streak come output and being more it go go on. Input equals input and trinkets open. Now let's try to write down a program for this. Okay, So what we should know first is I do stop. Bless the signal first that trigger signals over there. Who is digital, right? Trincomalee. And then I'll wait for a big time here. Listen, let's write for 10 milliseconds, then digital right treat comma high. It will give the trigger signal or trigger pulse to the bin and then delay my co stickers and and then digital rate strip common Lo. So this is high. Then 10 microseconds off delays given with this function that is dilemma, Chris sickens and then digital red treat. You will make that bingo. Now what we have to do is let's take a variable a long variable. This strange because the value could be big government. So duration is according to but in equal come on high. So Belson is the function using our you know, which will give us the belts in duration off this disappeared signal for this particular street. So if you want to major depends right off a low signal, then you can specify it here. The high signal for maturing depends right off my signal. You should make it high addresses. Just make a clue. Neither duration video. We have got what we needed. So let's take another variable distance. And now let's scalpel it. Distance is equal to do addition, debate about 50 it and then simply parentage onto the cereal. You can also do a bitch more fashion. So in string distance, it's I'm then surrendered Ellen Distance, and we have for much completely toe initial is the serial port here. So Syrian George 1,000,000,000 9 Since heroes next about huge, everything looks to be good. So let's stretch it on this program. Yeah, just do one more thing after the entire operation. One cycle is don't give a big dealing something like a second. Now let's see if it works in the simulation properly or not. Now it's It had started walking, actually. And to change the distance. Okay, there is a facility. Yes, of course. Oh, it's nice. So the distance here, I'll just to do one thing. Make it shift over here. Stop this evolution open court window and start the demolition now. So distance coming is one month three. And stop the simulation again. On distance is an 81 space after Ridge. Let's take a beauty off two signatures. Now let's click it now See in The simulation also is giving 113.4 centimeters. If I move the object a bit longer or a big rider a bit far away from the sensor, it's 24 departments interpreter and what we're getting its to forgiven. If I had, McDuck should come closer. It's 41 centimeter for the closer like six centimeter. It's less than two centimeters, so they're sort of lower. So after those intimidators, if the object is anywhere in this radiation window. It had sensed the distance it sends properly and upward. It's in onto the terminal, so that's the program for it. That's how you have direct down the court for Dawson Distance Sensor I have, which would have be very easy for you to extreme inch bought in the ticker care as the less when you do it in your particular hi there. So this experiment with this sensor and see for the output and next video, we'll see the output off our own address on the card that set up, and then we proceed further. That's watching this video. 42. DHDT Chapter 1: Hello, everyone. In this video, we're going to study about Ah, very interesting temperature sensor with our, you know, the name of the sensitives. DHT to the same sensor consider to write is actually there is D H two gunman as villas GST , Tuto that been out off. But the senses is exactly same. Just DHT to two is a bit more stable and that's why I prefer the institute. But the same understanding on the same courting may be applicable to the aged, even one as well. So let's begin. So this is how our DST to censor will look like so. Generally it comes in a might case with four lives. Out of those four lives with number three is NC are not connected. It has no youth. The number of honesty decency do is greater trees NC and for its ground. Now this is unlike 11 35 a temperature sensor, but not only divisions answer but also temperature plus humidity sensor, so it gives us temperature as the less humidity values on. Unlike the 11 35 the output off for the issue to do is digital, so everything can be received or can be read from the detailing off the sensor. So let's see how we can interface it with our dino and how we can. I don't the program for it. So basically, it's so simple. One mile digital temperature sensor it requires library installation with her, you know, provides both temperature and humidity. As we discussed, only one pillow for Dino is needed, and the working voltage is 3.3 to 6 fours on the sensing, temperature is minus 40 to 80. Degree senses practical be hammered. Get tested it below zero degrees, but it works very well and precise in the room tip. Bridgers. So let's see how we can use this sensor and how we can profess it with her, you know, and how we can write the problem. Forage. So the library for the H Street There are a number of different libraries available on most of them do work very well. What I'm going to show is those libraries which work flawlessly, which doesn't require any additional dependencies and directly, can be used with this dish to censor. So, just like we had used a library before, in this case will be installing but no library name of this library. It's simple D h street by Vinland at shown here, so it appears in there. Do you know a set up or are dinner installation? As you can see this, lets see who disclosed the windows and, uh, go to sketch in your library. Manage level it is, and into the manage libraries. Just type in the search box as a D. H. D. You don't need to type anything else. Bhd. It's sufficient, so there isn't a different library. Lots of libraries are there. Most of them work properly, but they need some external dependency or some more libraries to be installed. I prefer things keeping simple. So the simple DHT by Vineland This is the best library that I have found so far, so just select a version. Right now, it's all today in store. That's why, and install button like this is not appearing on your computer and install, but only appear at this point and you would be able to install. So right now, simple. The industry is installed in my machine. So that's it. The interfacing is very simple. What you need to do is in it to give it is easy toe five old ground to ground pin and Data Pinto are, you know, But the only thing or the only catch is this retyping needs to be pulled up to a sissy. Let's see what I mean to say by this. So this is how the DHD sensor is considered to be are supposed to be interface to its microcontroller. So the connections are busy signals to a sissy that day, tapping its pulled high with a suitable pullup resistor like 4.7 and connected to sissy. And then the same detail in connection should go to the microcontroller pin. And lastly, the fourth pain that his ground been should get gonna get to ground as it it's now. If you have r GHT to to censor, then you have to make this kind of connections like this on a brain board using pullup register on unlike just like me. If you're using a D H D sensor model, then you can carefully observe the model and you will find that there is a resistor present onto it. So now let's see how to write down a program for it and let's see the output for it now that you have installed is like, Really, that is the simple DHT by Vineland just opened the already know Go to the file menu and just look for the examples in the example sexually will find this library here simple DHT, from which we just have want the basic the estate to default cold. Nothing fancy, nothing different. So we sissy to sissy ground to ground and data. According to this program, it's connected to pin number two. I have also made the connections toe connect the detail line. To be number two. This is the model I'm using. Hello there. So this is the model amusing on it has got the pullup resistor onto the sensor itself. It's SMD. I don't think so. It will be visible for you so and I have connected the detailing to be number two. Now let's look at the core carefully, so surrender begin when 15 to 00 Let's change it to our so table needs. That is 96 double zero. Then that program is decently simple, so surrender parental in something like plain lines. Sample the issue to talk, or then we have taken to variables float, temperature, float community. Both of them are initial s as zero. Then what we do is we have also big gun variable that is error, which is called a simple DHT. Enter success. According to the library, this simple DS general successes The assignment done for this variable. Now, if l A. Is equal to the issue to do not read too, and temperature and humidity commander is not equal to simple the instigator success. Basically, it simply means watch this developments. If the the issue to not read to function returns, the false values are wrong values. Then it will print onto the serial port radiates to fill, and error is equal to Cirillo Crandall. And so whatever revenue generated by the library will be printed with this. The flu, if they read, is not successful. If they made it successful, then you simply French those values off temperature and humidity onto the Syrian port using this tool, it's so that's about it. That simple is that we have already taken them as floor, so this is not compulsory to take custard again. So let's just keep it as it is. And that's the boat. So look, sir, download this program onto the controller. I have made the connections. I'll okay, I don't have the are, you know, connector. We connect. The Arduino are disconnected. No, no, let's see. So what's the program is downloader. What you should get is he should get the serial. You should get the valleys of temperature and humidity rented onto the serial port so that flooding is and let's open the civil monitor. Exigency temperature is 27.20 Anyone. It is 90.20% in our righteous. If you want, I can just do a demonstration for this. So this is a sense of what I'll do is I'll just try to increase the humidity a little bit so that you can observe the change. Can you observe on the screen? The community has rising up to 99%. I manually gave a very big piece of your body to do it on. The weather is also quite humid right now. So it is 99.90 If I just blow through it, it will hear some bit of humidity. We'll get some time and a human developers will now start dropping. The present value seems to be pretty accurate. 28.40 28.2 Intelligence senses, which is the current room temperature. So that's pretty accurate. If you use the S Steven van instead of the photo, that is also fine. All changes are. All you need to do is make changes here in sort of total. Just write down one, and that's about it. Here also simple. The issue to the answer of total uses have. Don't be Steven wherever there is the institute. But believe me, we have used your Steven one number of times and it is quite headedness. So it's always better to use theistic toe instead of the government. So I hope this experimental would be simple enough for you to follow. You have to download this library and then performed this experiment once they have done with this. Next, What you have to do is a temperature controller with support each two cents. So that's about it. Keep experimenting and see the outputs. Thank you 43. Relay Interfacing Chapter 1: Hello, everyone. Now is this thing about the immediate assistance development? With the Arduino microcontroller, we can see number of different sensors and number of different devices. But at the same time, we also need to understand what to do with all the sensor pallets. Eventually, we all want what we all want to control the actual physical devices with the microcontroller. The basic job off microcontroller based on various extreme, is that you are going to need to use it to control some actual devices. Let's say, for example, fan belt or guinea appliance that might be present in your home. But so far you might have understood wanting that all an Arduino microcontroller engine rate. It's five foot or zero hole signal onto its I open as now. So either it considered last I worked on it engineer zero now which less? Five and zero village, all we can controlled or all we can switch on or off switch off are nothing birch, simple religions and a buzzer juicy. Now if I have to turn on or don't off, let's see a job late or fan in my room, then tortured, and how can I do it? Whether I can do it with our dinner or not. That's the frustration. And if yes, then how we're going to address all these things into decisions now so that you will be able to understand how you can switch on and switch off the A C as well. STC devices using microcontroller like rd. So let's begin. First of all, there's this cares about how again and horror began. Switch the PC devices or easier glances, so let's stop to control a C. Devices are any kind of easy lower through a small hole stage like the microcontrollers outward gardens output that it stifled. What do you need? It's something called lesser really. Now, if you have hard about you, lend goods. If you have not known about really basically, it really is an electromechanical switch which can turn on and John off with a small D C voltage. What did consist off basically, is a coil which can be magnetized with external voltage on because off the magnetism of switching operation or a surgeon, action is happening inside. Really, relays are used verities necessary to control a socket by a low power signals with complete electrical isolation between control and control circuits are for several circuits must be controlled by one signal in any such case relates to be used. How really looks like there are a number of different forms off. The most common on using hobby projects are simple projects. It's something looking like this. Call this a sugar cube. There's a bottom few off the Sugar Cube. Brilliant on. This is a bigger type of really, which is used in industries as that some tense in the refrigerator or appliances. But mind well that there are a number of different, like there are more than 50 different types of really that you will find what we're going to discuss. Here is the concept, and we do an experiment with sugar. The same knowledge, then further, can be extended for any type of related you might want to use are really let's talk about sure capitulating, difficult in construction. It looks like this, as we have seen. It is good. Toobin's all that's oil points. I call them Let's Elvin and ultra this tokens. So these are the elven, any weapons. Then there is a point, which is called That's Common Porch. And then there is an NC and you know the construction off the really or are the in Ouch! Off really is like this. Now when we apply or when we give in again off oil voltage, then some searching action is happening inside the really. Now let's see how that exactly happens. So this is how I really looks like construction early, then ever, really is like a rest position. Loretta Stance three position. This common point is the district tension by the forge connected to the spin gold. And so there is always a connection between the movable common point and in C porch. It is all that's going, even if there really is not powered on. It is if we escaped on people, the common and NC are connected. So if you look in the circuit's venue in urges, the quiet of really what happens is there is a magnetism produced by the oil. Because of this nihilism, this common terminal, which is reciting on NC, switches off the tracks towards the magnets, and it's gonna get him. So as long as the oil off really is energized, it means it is magnetized. The common will streak adequate and thereby giving us a sitting action. If you're John off the really by removing this supply from the coil, what will happen? The common will go back again to NC, thereby breaking the contact between common. And the terminal is you know, it's called, as you know, because it is normally open and it is called as NC because it is normally closed, both with respect common, I hope you're getting an idea. So what do you need to do is you need to provide the really with the appropriate quiet village. Usually the call voltages are five holds or nine holds 12 words or 20 forward. Most popularly, the voltages are the real level digits on 24 hold on, and even if it is five old, the current required to magnetize The koi is about 40 to 80 million years on an hour. Reopen cannot give that much off marriage. So you cannot done under really to turn on an easy appliance like this using our walls. So what? We need, what we need to do. In that case, we literally something in between the our dino and really so that really can be switched on . Let's say that in the next. Thank you for watching this video 44. Relay Interfacing Chapter 2: Hello there. In the last video, we have seen on some basics about how they really actually works. So this is this simulation, that creature, to understand it better. So this is the common terminal off. This is the N C terminal and this is the end of German. So let's just college come. This is an since I started, this is and see It should be here on this one, which is by default connector. It's it's that is normally closed. This is normally open and this one is called and then you apply a proper voltage. There is oil bullets next literal voyage through the really oil in any reduction it doesn't matter. It's just a then the religions on exactly like this. So there is a movable part inside really, which is moving from NC two and and it also creates a ticking sound like whenever the religions on uneven with religions off. Now the question became Onda lived. Last video is that we can order rich 12 word for minority. So how to turn on this Really? So in order to do that, what we need to do is we need to make use off transistor raised switching Sauvage. Now, I don't know if you know about the transit straight surgeon circuit or not, but if you don't know them, just be with me and we'll see. What is it on the straits, which in some transistors are basically to terminal active devices off which all the logic circuits are made off, which all the logic gates are made off rich. Even the entire microcontroller are denies. Mirabeau off all that makeup until it is available. It comes in different forms are primarily two types. One, it's called us and we transistor and another one is called It's We End transistor, its ability to change between the two states and abol each to have two basic functions that is, switching amplification that have the do things that plants were going to. So in most of the cases, transistor is used as a such as this is an impure fire, depending upon how you connected inside the socket. Right now, what we want is you want to use under stresses switches off it, so let's see how the circuit off transistor will look like for this experiment will use this very popular and very common transistor called B C five for seven, which is a creep in small device. Looking exactly like this, the true Tamils off the transistor, our religion, bees and image and how we use it in a surgeon circuit. It's something like this. So all you need to do is Director emitter to ground. The enough collectors should goto second point off your lord Here, in this case, it's a combination off register and led the second point off your nor should go to the supply voltage doesn't matter what business supply voltage it is required. Sublevel is for this Lord, and the base of the transistor should be given which logic, high or logic. You. But we consume table resistance so that the current flowing to the base should not exceed 10 million piers. Remember that always this is foreign simulation. Propose that so we have not shown it. But if you're connecting this to the Arduino controller that there has to be up so human register differently. One kid sister. Now what happens is when you give logic high to the beast base perimeter and wish to collective. But the junctions are forward past if we allow sufficient courage to flow through hands start like 10 million piers transistor drives or goes into this saturation, in which case perimeter and leads to a collector. Both dysfunctions were small. Word best on the transfer of itself acts as a computer close to switch so the current will flow from this supplier through this lord through the transistor body. Through this imager, a lot of courage flows from collector to emitter to brunch, then the base it supplied with her. What do Wooldridge and maximum cases the world is given to? The peace is not exceeding five world and the current given to it is not exceeding 10 million. Transistor is a current control device and therefore there has to be had existed in between . If you don't chemical system, it will simply act as an Indian. Insulin appeared reticent, so it will act as the injunction on it will apply to it. Big amount off current from there, you know, been anything danced and exercise. So make this particular pin Look, our logic zero the base perimeter invested collectible detentions are reversed last and your Georgians now here you can use any kind off the ceiling provided that your transistor supports that much of courage. For example, the B C five for seven used in this case allows only 200 million years of current, so you should use a Lord, which can or which runs on and consumes only about 200 million peer of current. But it doesn't matter if you have a banana peer lord, you can get one impure transfer from market. Every MP in transistor will work in the same way and will provide you with the required amount off parents. So that's a surgeon circuit. Using clan system. You can turn on any diesel or using this, whether the world ages five or 12 volts 24 world here, it's simply doesn't imagine there's are under straits switching circuit force. What we want to do is we want to use this to turn on and turn off here. Let's say in the next video how we can use transistor to turn on and turn off really using argue that's watching this video 45. Relay Interfacing Chapter 3: hi there now that we have seen how and five use really and how trans straight circuit wolves. Lexie, How exactly? We can use the transistor and really together with already, so you can understand the Straits, which in circuit it's apparently very clear that what we need to do if we have to interface , really, it's use that away as a door to the device over here. So it's reference register and a lady combo. What will go even its will make use off, Really? So they relate. Quinn will act as a lord to transistor. That's how Could will look like this. So one point of the real equality was to 12. Word second point comes to the electoral off transistor. The image of the transistor goes to ground and the base grows. Victor drivel. Resistor to Are you open? Not really. Seven It shown in this era, but it doesn't need to be. You can use anything off our dino to interface the relay in this fashion. Now, whenever you make that particular pin go high or was it your five foot by writing digital rights in Kandahar? They re level going on because the transistor bill such, and thereby it will turn on the coil. Their vital on really the common will switch back to, you know, and between the common. And, you know, you can collect any kind off cell keeps that you want to control, whether it is D C or whether it is is it simply isn't natural. Remember when voting the coupling inside, really, or the operation? Certainly It's purely based on magnetism. So there is no flew off courage, no direct off courage between this side and this side, which is a bitch. So good. So this is how you can use a relieve it, Michael, are any microcontroller? Actually, this is there were using it will argue. But there is one problem. What happens is really is having a oil. We are running on the oil, actually. So whenever you give largest you want to this spin, it is expected that the points off immediately. But what happens is the point had stored a large number of charges and relates turned off by making this particular base signal zero. The charges don't get apart to get the shots or the drug in it speeds to French. And that's why the oil remains charged for some time, even if you john off it by giving zero onto the skin. Robert Association, what we need to do, is willing to provide a connecting part for those charges when they relates, turn off so that charges should get desecrated on the religion. Turn off immediately. But also it is a standard practice that we connect off library, die or, in this configuration, with really so the cattle off the night, or goes to the favor of the supply voltage and the intervals to collect in normal operation when the relation on the tire doesn't come into picture. But whenever you challenge off, there are constantly picture because in that case, it gives apart for the charges stored into the really to get computer circulated within really a tired the oil dire and himself in this circle profession and you're distributing, thereby resulting in a quick discharge off the oil and immediately, almost instantly, there really appears to be turned off. Now, using the socket, you can use any easy lure again, depending upon which is in or you're using. There are limitations to the contract off this, really, so it won't allow you to pass 10 amperes of current 15 people of color and 15 16 peels off a sugar properly labeled only allows you to pass five years off. Easy challenge on. If you want to go beyond that, you need to buy a bigger just like transistor. Relays are also available in any type off current treating you wanted to be and every really we work in exactly the same fashion. So that's how you can interface relieve its transistor. Who are you now then? I'm using a single. Really? That sounds okay when I'm using to less than a P and it sounds OK, What if if I'm using it, really? Is it Are you in that guest? Eloping it Transistors, registers and eight tires We nor seem that suitable option for me. And therefore what we know in such cases is we use our Harlingen pair searching. I see called you will end to it zero exit integrated chip with a very high vocation. High current darlington transistor. It allows you to interface details signal with higher validation Courage. The output side of Ulan is gentle related head for people 500 me ampere, so it cannot bridge small Lord statically, and it is primarily used for defense relates and stepper motives. With Michael, we can use this icy instead of transistor so that you can connect more, relates Philippines off inside. See without bothering about contributing register without bothering about this camping there, Lexi hopes, if you look at the inside of the really, it's something like this. So whenever I can take a lower here, so supply, then allure and the second pin boards or come students particularly. And this been one number respects our religious super number 18. So venue logic High number one In number 18 it's virtually shorted with grounds and whatever that you are connected. People number 18 well done on. So if there is ah particular device that you have connected to the number region in exactly this fashion here, But instead of connecting it to a collector, this skin will go to number 18 or 17 or 16 like that. So number one we'll call draws. The device connected to number 18 Number two will control of the best victory took number 17 3 to 16 for the 15 and so on, up to number each and Julian in number 11 the number nine should go by the forge to ground and number 10 should go through the common village because everything has a tire connected with hitch and go into the number 10. We should use that number 10 connecting through the supply voltage off exactly like this. So this is the number 10 will be given to 12 words and the release can dramatically connected here. Examples like this. So one point of the really we'll go to 12 old second part of Reliable who took the number 18. Number 10 will go to the same 12 volt. The traveled is missing in this diagram. You couldn't go to the same trouble signal. And if I want to switch on the really connected to pin number aging, what I will do is I will make the pin number one go high through RD. You can directly connect this main star you know, and you only to worry about connecting a registered in between as well as you. Really true, we concern about connecting an external tired over here across the point because there are separate Surgeon General, You can use this kind of configuration to interface as many realist as you want with our, you know, Bill statically. So with words about who you can allocate office aged real. It's in this fashion, so I hope it would be very simple for you if you're doing the experiment. If you don't understand things clearly, you can always drop me a message. But just wash to the video or listen to this video one more time, and I think you get it the whole job off telling you about you'll Edwards, Rhodri Wasco give you War facility to Connect relates the tale Comfortable transistor. And if you push it, the centric award more than 23 really is, then explain. Use it on the street. Otherwise, if you're designing up in Sydney off your own, then using Julian, I see, maybe more so. Thank you for much of this video. 46. EEPROM: Hi there. In this video, we'll study about a very interesting thing with respect to rd nose on that discordance. Beverly Prom R e Ebron. Now, so far, you have been doing a bit off duty. I you are you getting very comfortable with Artie Notes? Can you tell me if I have to store something into the memory of cardinal so that after positing it off and bothering it on the data or the content off, our dino should be available to me next time? What should I do? What I mean to say it. See program is available there. Program. It's a region injury Flashman the off Mike Robinson. But in the nationality of the microcontroller, you cannot save your custom de job during the some time off your program. So whenever your program is running, if you want to store, for example, highest temperature value or any kind off number, that is from serial port. If you want to store that what you should views, you cannot simply storage and a variable because whenever you store any region in a variable as soon as you power off the are, you know the variable what's needed in them Maybe this is off. Are you know there is an IMAX isn every And as soon as a power outage off the leader vanishes from the damage. Next time, it's not a living. So if you want the Dita to be available next time, when they are, you know, boots up all right. Next time they are, you know, powers. Then you must use something called s e Eat from are electrically erasable, programmable. Read only memory in our people. Fortunately with advanced micro controllers like Adam, bigotry to H, which is present on our, you know, microcontrollers. We have an in built each 10 to 4 bites off rams on. You know, we have 10 to 4 bites off them once and for quite simply means nothing but one keeping Arlene Omega. We have foreseen a land sits by yourself people. Um sorry, not lamb, but it. So all the ones aircrew for bikes doesn't sound very impressive, but it's still sufficient to store numbers or to store particular characters onto the problem off are you Answer. The important usage is to permanent strictly store a piece of data, easily retrieve that data as well as easy delete that. The problem is, you have some limiters base in order. Medics. Okay, for simple applications. If you need more storage than you have to connect an external prom chip through, I receive irritable. But Children. Let's see how we can use the internal from through programming in our you know, there is a simple library core. Let's keep prom, which has got many functions, but what we want what we're going to do is we're going to use these two primary functions Ebron don't read and he from their trades with the from that Really, you can really any location out of this 10 to 4 locations and with Ebron not right, you can right onto any off these locations. So really will simply really bites or NVIDIA and right Will city right? Remember, the storage is specified in pipes or in kilo pipes. What it means is even on all those ones, room for locations on each location. We have only a bit off space in which we can lay down a data. It's a system in protecting and looks like a core voyage. Now what I'll do is I'll simply open are you know and I'll try to regular core for equal. So let's see what we can to which next just close any previous program that we have and then see if this kitsch now I just save image onto the same location where I'm creating all this course videos so that it becomes easier for me to upload Ege later on. So we just searched for the equal on Florida. Okay, I don't seem to have any problem Folder Admit Create a problem. Let's see which the people from underscore side. So I just relate this for and I will use this much off course. I just missed it to you and have some characters which are not part of the programming. So there's just village does just open eggs. This characters don't not much to the water just billet them all. So let's simply village it all. And instead of just right on it from beginning hash include from the edge, then avoid set up. I just do the serial Begin over here in the words set up, because I want to simply able to write down some cereal messages, want to the German, and then why do? And so we already knew. Here it's I take an invariable e. It's called and the look Zied is zero. I have not connected anything. Travel a pin, but just let's take hips. Then let's sick. Unsigned Scar B, which is an April variable, just the very A. By fourth on. What you can do is keep from Underscore So Abram, not rights zero comma be, which is a beautiful watch. It will write the condemns off variable be on three publication zero. So this is any prompt trial core there. What we have suggestion is he has simply taken onto the apron. So let's try this school. I'll just put here a message. A prompt child cereal, George French, Ellen from Dr and then here after every right, just watch cereal rims not, and Ellen get it done. And now I will upload this score on the board. What the court is applauded will just open the serial terminal, and we'll see if the message comes so much. Now see, something is really from the animal pill, and it's showing us redundant 100 100 on like that. Now, if I have read that value now, instead of this court, I just comment this court now and just I'll try to really that value. Whichever What store? Then what I need to simply do. It's unsigned. Care is a Quintal. He prom? Not really. Zero. Then cereal dots prints this WAAS return on a prom and then serial dot Grinch Ellen, he really 1000. And that's the voters. So he plundered rights has returned the value of be on location zero in this corner. What we're doing is we're reading the tradition number zero into the variable called E, and now we're printing it onto the cereal. So 74 was going on to the and that's why so that's a simple trial off how you can read and write from people. Thank you for watching this video. 47. DC Motor Interfacing Chapter 1: Hi there. In this video, we'll try to see how we can use DC Motors with RD know how we can interface it and how we can drive it using the Arduino microcontroller board. So let's begin. BC Motor is just some kind off a small machine, which can convert the busy current given to it into the mechanical power. The mechanical power here is nothing but a rotational moment off the shaft that is, vengeance treated. This kind of DC Motors comes in a variety of sizes and shapes. Ah, simplest DC Motor will look like this. We also call it as a tri motor because it is very popularly used in a number of different points. It doesn't have any gears, and it has a very highest food. That's motives. Leg deeds, the venue to which you can see on the left are bigger than they have. Metal are plastic gears inside them, which reduces the actual spirit of the motor to a much lower value so that it gives us a higher amount off talk. So let's see how we can use it with the cardinal and saved. The DC Motor comes in a variety of sizes and shapes deserve some off them. So this one here walks on six Forge to 12 words. This kind of motor works on 12 world only, and this kindof motor, which is also called as a border our battery operated motor works on three vote and onwards up to 12 word. This kind of DC Motors have a simple tendency. Are very simple property in which they wrote it in order to run the DC Motor. What we have to do is we have to give this specified of world age to its spin. The motor has only groupings to which we have to connect the positive and negative offer DC power supply. This is a parts of black and come from about supply socket, which is converting easy to d. C are. You can also directly use a battery with this emotive. If you connect the supply in one direction, the motor instructed let's oclock ways, and if I just rivers the supply, then the motor time started and the globe ways what they have to go AIDS with hard. You know, we just don't want oh, simply done it on in either direction. But we also want to control the direction we want to control, how the motor rotates and by programmatically are directing down a court for it. We want to change the movement off murder. We also want to relate clock weights as the less anti clockwise applications are countless . The simplest application is the robotics. Are the robotic toys or the robotic car that we make? It's, Ah, it's a nice hobby project on with Decision are after decision who will be able to create a robot yourself. So let's see how we can drive a. D. C. Motive. That said, if you provide it the supply in one direction than the motor will rooted cloak with and if you provided supplying other direction, the motor will rotate and the cloak with we also call it. That's counter clockwise. It's now in orderto do it through program. What we need is we need some kind of drive circuitry. What kind of dress argued that there could be? Let's look at this. This is called as an edge bridge. The concept is very simple, but a very powerful one. What happens in X Bridge is a motor. It's connected between four switches like this and the supplies given to it. No. Whenever you cross some particular switches, you would see the direction of the motor changing. Let's try to do it in a simulation, actually. So just stay with me on. I'll start a simulation for each bridge Now to do that, I used the protests. I assize software, which I have. You don't need to have it right now in your machine. Let's just look at the simulation and then you can directly perform it. I don't hard her are onto the tinker guy, but the simulation it simpler for the C motor. So let's look at it in Brutus. - So this is an inch bridge connected DC Motor. As you can see, if I whenever I turn on the simulation, if I click on this, which and if I click on this which what would happen this mind off motor will get a positive supply from battery on. This point will get under get you supply from this pin. If I remove this truth switches and if I connect these truths, which is exactly a positive happen this point relegate the negative supply off motor at this point will get positive supply of the motor, so let's try to do it in simulation. If I close any other suggests there will be absolutely no effect at all. Now this evolution is on and the more headed straight nothing is happening. I just closed this one switch on this which now you can notice the mortar being rotated in a clockwise direction. If I removed it switches. And if I can it be under tow switches. Now you can notice the mortar being rotated in counter clockwise direction. This is the concept off each bridge more forever. But to do it electronically. But to do it through a program what we need is we need this kind off transits treads which in socket, which can do all that switch in job for its then the microcontroller and the Arduino gives signal. Do it now in order to do so in order to create our in order to interface the ABC Motor with our you know, this kind off edge, Which driver s is available? This Etch bridge, Trevor, I says give us a direct access to the DC Motor by simply giving some control signals from our green. One such h bridge Nevarez C is very popular on very widely used in motor applications. And that is any 293 d. It's elementary Deby because it can drive to DC Motors at the same time. What's that doing this immortal forever? It is. Those low signal voltage is from the microcontrollers output pin, and it can drive to the C motors at the same time with S Bridge Elementary Motor. However, we can also perform the spear control and direction control of the motor. It wants no external computers, and each motor can have 600 million years off current. Let's look at the keynote off this motor ever. I see. It's a very simple since stint been. I see, and you can easily understand it by the look and cute. Been 45 12 13 goes to ground. The number 16 should be connected to the logic supply voltage. So if you're interfacing with our you know that it should be connected toe five foot. The number eight is the motor supply will teach. So if my motor is five foot one or six fold one or nine volt or 12 world for divinity, it's I should give that supply to be number it. Mordor connects midwin output one and or put too the number three and six. Similarly, here the motor currents between the number 14 and number 11 so one mortar connects here. Between this, your foot lands under mortar, connects here between destroy or put lines, input even and into controls the direction off this motive and put B one and B two controls the direction off this side mood and then we remain with to enable signals which enable the particular driver. So this enables one if connected to logic, high voltage are fine world then it will enable inside of the motor forever and ever do in an Evel this side off water. So it's very simple. The pen description is quite simpler. The interfacing Let's see about the interfacing. So this is how we interface it. Answer border guards between number three and six and 14 and 11 and invent and into controls the direction off this motor. The controlling is very simple. If in violent into our 00 the motor is off, the imports are 01 The motor rotate in one direction and then put servant zero. The motor will rooted in other directions it should be. Hi, Lou. And if you keep both the inputs high, just like both, then put slow, it will keep the more drinkin obstinate. So it's very simple. The interfacing is also simple. You can simply connect the motor around. I see into a bread board and perform this wiring and start communicating it with our. You know, all they need to do is connect this troop in stores, you know, microcontroller spin and just make it high low according to the expectation. So let's create a sample experiment with this. 48. DC Motor Interfacing Chapter 2: Hi there. Let's see Example. Application off interfacing the DC Motor with hard. You know, here we have begun the microcontroller are, you know, board and this I see 293 D, which is a motor every sea animals in a nine volt battery and this would seem order. All those components are available. So when it is go to search on you can search for a tune entry Are the concerns for motor this emotive And, you know, for the rest of the components look at the connections. The motor is connected with the number three and number six The number one is an apple signal which is going toe microcontrollers Spin city number five number two and the number seven of the invasion in two pins, again going to two microcontroller pins or to argue no pins for direction Control The number four and five are the ground pins which are going to the ground off our dino and the same is going to the ground off or negative off the battery. Also the number eight is given with the mortar supply will ditch that is nine village. The interfacing is pretty simple. Let's iterate donna core for it, so I'll just delete whatever is written here. No, in in one is a goingto Let's up in number two. It's in two years ago. Toe number three in an everyone is equal to the number five. All you need to know then is inward set up. We need to make all of this spins go output or all of this. Spence markets apartment, so pin more in one comma output. Similarly, I just copy this and make it for into I'm enabled one. Neither loop what we have to do. It's simply change the status on invalid into pins and make the enable one been high. So I just waiting, set up itself. So digital. Right, Ian one comma higher and in Luke, let's late digital right in one comma, no digital rate in two common high. Then let's give Woody love say three seconds then digital rights in one common law on digital, right in two comma. So after some time, we're just making both off the fence guru so that we can observe the change. Whatever changed that it makes now, the court is really the connections are right. So pin number to enter here the import center. Number five. It's direction. Let's just close the court window and start the simulation After simulation started, you can see the motor is rotating in one direction. It will go so for three seconds, wait for one second and then again continued reading. That simple is that if I want to change the direction off this motor, what I'm doing, I simply used the entire court. I will based it again. And here I just have to change this polarity. So make the Noto higher and make the high to low. Now I have changed the way input is given in the second attempt. So let's see what it changes. So clock weights for three seconds and then anti clockwise for three seconds as a GNC. Now, when you have two motors connector, then there will be more declarations. So in three in four and enable toe will be added declarations. You will have to make all of them as output and you can control the direction using their respecto pins. There is one more thing you can go here and that is controlling the speed off this motor. If you notice we have connected the enable one pin directly to the microcontroller spin and made it higher. I answered off making a tie. You can chose true right on a log right down to it, where you just specify the pin number and you must specify the duty cycle we have discussed about DPW, so it means really understand it whenever you give zero. Here, the motor event rotate with zero power are will not rotate at all, and whenever you to 55 year, the motor will rotate with full speed between 0 to 55. Whatever you give the motors speed will be accordingly controlled. So if I get 1 27 here, so 1200 off of P cycle are 50% duty cycle wave and then that will simply release the spirit of the motor toe half as you can see, so it depends if you want the spirit control, then you can use the analog right. It is not doing nothing, but it is giving a square will to the inaudible signal which is making it go an apple. This apple and apple dissemble and every disability very higher it because the driver is an abundant assembled at a very higher it. What it does basically does not turn off or it does not physically turn off the motor. But its simplest suggested at a very high spirit. And because of the high speed switching, the spirit of the motor appears to be reduced a bit. So that's about the DC motor interfacing. Try to create a DC motor interface off your own. Trying to create a robotic try are you can do whatever you want with the motor. Remember, practically whenever you will be interfacing the DC motor, make sure to connect a capacitor off a large value. So this is what you should do when you are using it practically so connected capacitors between the pin number, age and ground. What happens with this capacitor is they never get a mortar powers on whenever it turns on . It immediately requires a large surge of current, and if your supplies not stable enough, then it will simply reset the microcontroller because it will disrupt the entire power line . This capacitor if you use a largely look capacity like 100 Micra fared or 2 20 micro fired will give that momentary boost to the motor, and the electronic circuitry will be safer. That's a practical tips unit toe. Make use off with the would be similar to driver carry only the experiments on, say, the DC Motor. Interfacing for yourself. It's very simple, so I hope you won't have any issues. File interfacing with it. Thank you for watching this video. 49. Servo Chapter 1: Hi there. In this video, we'll see how we can interface are servo motor with our Dina. Several motor is different than a normal DC motor on it has its own specifics, which has to be taken into account when you're using it with Arduino microcontroller. So let's see how we can interface Cicero Motor and how we can rotate it. So let's let's for study. About models are more murders. So several mortar is an actuator, which has a built in feedback mechanism that responds to a control signal by moving toe and holding toe a particular position or by moving at a continuous spirit. Basically, the job off servo, unlike the C Motors, is not to provide a continuous rotations most of the times, but its job is to hold on to some particular location or to a particular position on it. That's so by taking an actual field back about exposition and with the help of feedback, it can control its schools affection. So let's see what exactly is Ah, servo motor and DC motor? So what is the difference? So as you know, that DC Motor is a continuously rotating motor, but servos are or sir votes can be a continuous rotating service, or it can be a fixed angle server. When I say fixed angles. Terrible. It basically means that the servo motor can only wrote it from a particular angle to another particular anger. The most popular and the most common service, which are available, can wrote it from zero degree to one. It really it means that the survival is not even an apple or not. Also capable off completing a single rotation off its shaft. It can only get from one fixed position to maximum went into degree. Oppose it. Position in the same order. Spear can be controlled by applied voltage, and there is no control circuit inside the simulator. But in servo motor, the speed can be controlled by the billy. Between the position update signal. It's a hybrid motor, which consists off gear as well as its own Elektronik controller, and to control this arrow motor. What we need to give AIDS. We need to give it some fixed signals with specified dealing. Let's see what all those fixed signals with specified deal. It's primarily there at certain two types of service. One AIDS a continuous rotation servo, which can read it all the way around in either of the directions, and the other one is a standard server, which can only wrote it zero toe when it getting So. If this is the zero degree position, then this point at the Maxwell come to this point. That's the what is the degree movement at the next. That much is possible with Sanders Surfboards in both the conditions process. Tell the servo how much authority so the control signal are the pulse signal that we give to servo, tells about its movement or tells the server how much to move in which direction or in either direction on all the required drive circuitry is included inside the server itself. So if if you just know about the DC Motor, we need to connect an external driver circuit to it like 293298 But for servo motors, you don't need any external dry circuit. It's already there. All you need to do is just provided with her controlled signals. Now what we experiment with is a standard server, which can rotate from 0 to 1 90 degree senses. Let's see what is the control signal or artistic control. Pulse look likes for this sub. So what we need to give it its a fixed signal with the particular duration off. 20 milliseconds means the on duration and off duration off the pulse should combine and be equal toe 20 milliseconds. And we need to give this signal continuously to the server in order to hold a particular position. Remember, Unlike, let's say, the C motor, it won't do that. You just send the pulse once and it will hold its position. No. You have to give a 20 milliseconds Bowles to the service control signal continuously, without having any break without stopping for even a single second or even a single millisecond. The position off servo is determined by the on duration off the pulse that you give. So the total restoration is 20 milliseconds out of which the on duration can be at least one millisecond on at the max to milliseconds. So when you give one millisecond pulse to the server moments one millisecond on and 19 milliseconds off when you get this kind off pulse to the servo motor continuously, that the servo will hold on to or server will lock toe zero degree Celsius, just like you can see here. Remember, it will hold to that particular position, and even if you try to move it from that particular position, it won't move. It won't even now be disturbed by any external force if you apply harder force. If you play a larger force than the dark off servo, then definitely the servos shaft will be broken but aggravates it will hold on to that position now. If you increase the on period, let's say to 1.5 milliseconds There by the off period would be 18.5 million. Second, to consider total 20 millisecond duration that is always locked to 90 degree position, and in my own period it's to milliseconds and off. Period, let's say, is 18 milliseconds. Then the servo holds onto 1 80 degrees Celsius. If I have to come back from political cell, says 20 all I have to do is then again reduce this word again, reducing onward and increased the offer it within the 20 millisecond duration. So that's all there is to control the server. Remember one millisecond on arrest, 19 milliseconds off surveys at zero degree, locked at zero degree 1.5 millisecond on and rest off, then serve, always holding at 90 degrees and two millisecond on and rest. 80 milliseconds off survival hold onto 1 80 degrees. So that's how said, Well, it's controlled by the control signal. The bigger components off a servo motor includes some internal gear assembly. And then there is a part which can give us the precise position about the motor. And then there is Elektronik control circuitry inside, so it's a small DC motor inside it like this. It has a gear box with small plastic or metal years to reduce the rpm and increase the talk . And it had special electron ICS to interpret, couple signal and deliver father to the motor. If you look at a typical servo motors wiring or if you look at the connector off a typical servo motor, it will definitely look like one off its two styles. So when is the high textile and another one is Food Tapestry high taken for Taba are too big. Several manufacturing companies and they have this type of characters. These all the Cicero Motors only operate on plus five. Full signal maximum 5.5 fold signal can be applied to them on dividing it seems one end or the last wire off. Servo is black, which is usually ground where the middle wire is always final signal, and the last end off the server is a control signal, so you need to give the control signal through this yellow wire. Sometimes they're syringe also or fight. Wire rate is five foot and black. It's ground. So that's how the servo whiting EADS remember. If you correct the servo motor toe, are you know, if you have a small servo motor like this one, then it's fine you can connect it to the USB power supply. Are the five world of sorrow more frenetically because this doesn't take much current. But if you use larger servo motors like this, then they have higher tar cretins like three K G four cages, seven kids, and they require at least one M peer to ampere or 2.5 amperes of current. So if you're using larger through motors like these, do not use them on the direct our dino power supply and instead connect an external high current Favell power supply, to which, if you connected directly to the Ordinance Five World. And if you do have not connected any adapter or external power supply door, you know it will try to consume that current from the U. S. Report off PC and it might. There will be two condition first, Most probably. The server won't budge. It won't move even a single degree. Second thing it may cause is it may cause a permanent damage to the U. S. B sports off your computer. So if you are just experimenting out, make sure you use this type off smaller servo motors, this blue or plastic white plastic ones, which has got plastic gears. And with a small door in the next video, we'll say how we can't write down program for our, you know, to control the several motion. Thank you for watching this video. 50. Servo Chapter 2: Hello there, Alexey. How began in two phase this elbow guard, you know, and how we can write down a program for it. Now, If you have seen a typical self, a moocher like this, then they come with a number of different types of shafts. So they have a common shaft over here, which it so cooler to which you can connect a shaft like this are around days or even a lesson bulge, or a place like or across lake simple twitch. So the attachments are different and depending upon the requirement, depending upon what you want to put or what you want to install into it, the attachments may change. Now let's see if considering this is the attachment that we have for servo and these other three wires off. So so remember, the middle one is always the viral signal. It's usually the last one, which may be black or agree. It is always black. Authorities always ground, and the other last one or the third wire is wipes or orange, and it is a control signal. It can go to any beautiful. Do you know why there that this is important to understand it is good to sever. I just tell you how to do it now you can connect several on any. Be enough. Are you know analog rights will not work on the number nine and 10 if certain, who are used on. I don't say if you are using sir one number nine. Then you can't use analog. Great. I'm going to say that if you are using servo at all, their analog right functions will not work on the number nine as a lesbian number. Gen Remember that on most of the original boards. Like, you know, you can control every time up to 12 servo motors and with a bigger board like Arlene Omega , you can control for the eight service every time. Now, let's see. What is this? An elaborate the religion Things about so which are giving a pulse, went off one millisecond and then gradually increasing to milliseconds, are reducing it to control the position or to control the women. We don't have to write down all the cool program, and the serverless really handles every single detail. There are three major components off the server library. First of all, you have to create an object off this horrible every by writing servo space. You're sort of ruining. It can be myself. Object can be myself. So if I'm using multiple motors and I can I don't servo servo one servo servo to suitable several tree and liquids. So just you can all this and more objects that meaning, Um but for us, it was that you're using. Secondly, what you have to go. It's attach that servo to a particular. So here we will use the name of that object your sister money for have created and I valued server one dot attach And here I was like, No, no name off a pill or a particular member. So this number is up in which this fight control signal wire It's connector and on that mean the controls in those will be generated. And then what we do It's send the control signal to the server by writing my servo nor my servo darch rights and into the record. But I don't the position. It's all the other identity. The position is any position between Syria to when it remember. If you have fixtures are what was zero degree and if on the immediate next line you write, servo dot writes toe 1 80 Sure in sewage, because if you are moving so from 0 to 1 itty, then make sure you're moving it in gradual steps so that it moved slowly. If I just lie down, sir. Ordered right? Zero. So don't write 1 80 then it will be very abrupt movements. Now let's see how we can actually write down a court to rotate the servant was the election and covered by selection. Now, before that, let's just look at the core off server. So I have a simple program over here. So that's not several program, which is used to repair Dennis Irwin proper direction and chockablock with salad. But before I do that, what I do eat, I will just like you move a server used in regard to do this experiment. So you just just that much, Of course, so hashing cures that border ditch, then cerebral space, my civil name of my object, then serve up in his nine. It's not mandated to mention it like this, and silicon also nine etiquette here they didn't work set upon everyone is myself border attach serve up in, and then what? I do is work group, and as I want, I can read Known my servo, not Rights zero. Let's simply lay off one second my serve. All right. One It 01 80 is the woman that I'm expecting on a given 80 again. Give some, DeLeo tells, and let's start this evolution. So here I have connected. A suitable was little fire is going toe five volts and, uh, the ground wire is going to ground and the control signal orange where it's going to control. Now it's getting a bit slow, so let's so is this a big deal? That's it. Off one start to make it 3000 so that we can understand or observer change. And then let's start simulation so it will rotate by zero degree. It's not. It's really forced. Now it's locked at Vanity Fair for three second against zero degree again one entity. And that's how several books. So what I do is I just use They are, you know, I ve and I will save this score incipient save it adds server test for you. I just use, it seems, and then after this will try to create a program or we'll just use the program that I created, which is used which can be used to Brodet the server in clockwise as well as anti clockwise direction. So that's a lot of the quarter. The second poor I want to in view is this. So let me corporatists. I'll explain it on the books and now I'll stop this English in. I just changed this score. We'll also see which drew the desire location, order microcystis suitable clock and countered long disclose it now. So what we have done in this program is the are simply choosing or we're creating a for loop in which we are incriminating the angle from 0 to 1 attentiveness Celsius. Every time we incrementally on angle, we give a really off 15 milliseconds. Similarly, after doing all of this, we rich for Darcy three seconds and then we do the same thing in reverse direction. So we'll start from unity then as long as it is going better than zero, we will be Clement This Arvo angle every time this are going to come by myself without right, we have taken a really off 15 Really Second, this debate is nothing. What is really and after it's completely done. Let's wait for three more seconds. Now let's start this simulation now. It will gradually from 0 to 1 80 wait there for some time and then from what did you do? Zero. And then I'm gonna be good for something against humanity. And then when it you do zero. So that's that's about this horrible there, so interfacing and program for it. I wanted to create one more simple many project with servo that is using crew switches. And whenever I press us, which once the thorough angle should be incriminating, clockwise direction, private and whenever I use this, which to it should be Crimmins by one degree. So whenever I get message once that we should move an inch up. Then again, an inch down or not an inch. But basically Diggory's so dr to create this project and see for the output. It's very simple brush. Thank you for watching this video 51. PWM Chapter 1: hi there in this video, what we're going to do is we're going to talk about a very important concept with respect to our, you know, on that is called that speed W M R Bells were more relation. Pulse width modulation, basically is a technique that can generate us where wave onto any pain off microcontroller with off ride bulls were usually whenever we generate a square wave off this sort of whenever you generate a PW and reform on European apart, you know, what we do is we keep the frequency off their signal constant, and we change the on and off duration off the bulls. So because the total time duration escaped same, the frequency of the signal never changes. And what we do change is just on time. And often the general was off credibly is to control the power delivery going through that pain to the Lord because they are put alternate between on and off within a specified period. The this behavior changes the average power which has been delivered to the particular lower connected to it. Now, if I have to generate any such were form onto the yard, you know, Pence by simply writing down accord for it, then I can definitely do so from this. Very simple Are you know, court next see? So that's not, you know, cold over here. What I've done here is basically already come output and they're now additional right, A little coma. High digital, right? Led Khumalo. I don't know if you can spot it or not. That's why I have taken the camera area now exact, simple as that. So the on period is one second off periods one second, and that's why it's running perfectly fine. Now. Peter Blue is nothing but doing it at a higher speed on because if you do it at higher spirit, then it won't be apparently looking like this on and off, instead will see the lady being on almost all the times. But we can still change the bomber being delivered to the Hillary. How let's see now, instead of making 801,000 lets him a good 100 101st so that you can see the change now uploading the court Now the court. It's uploaded. Now you can Civility is blinking. No, just take a close look to the facility. Now it's blinking okay if I further, it is the deal. If I make it 10 milliseconds on and turn milliseconds small then sparked the change. Now the already looks almost always on the camera. It's still capturing some flickers, but it looks on. No, let's keep it 10 10 total. 20 milliseconds is the duration. It means the frequency off the signal. It's 50 hertz, one debated about 20 milliseconds. 50 hertz. Now, if I change the on period too 19 and if I make the off period one millisecond only. So let's see what changed. You see inability. It's almost looking, like always on Instead. Now, if I make this on Period five and on period 15 please make sure not that I'm not changing the frequency because the total liberation is kept 20. Now you can see the idiots feeding with quite Laura. Just send the register, is it? That's almost fading because the high period is low and the All Lupin Aidid's high. I felt it. Use it to say to milliseconds, and if it is low for 18 milliseconds, then let's see what we see. Very low late, but still, this deal it's our 55 not in sort of dealing. If I don't delay microseconds, the lips, the difference. Now that's make it one and off for 19. It's further lure, and if I make it 19 and chemical one, then it will look like it's almost completely on, isn't it? So this German from a very bright ality to a very lonely led. What we're doing is we're writing down a court for it where we are generating a single frequency signal, but we're changing the duty cycle are for changing the duration off on and off, period. And that's why we can see the power control happening onto the Ordina pits. The next video, we'll see how we can perform this on to the Arduino without writing a complete core for it . What I meant to say by complete core is that to know this much off court, what I need to do is I need to write down this much piece off program, and while my RD knows executing this, the program cannot do any other job in next video. We'll see how we can do this without writing a core forage and order. No can still be free to perform any other task. If you want to. Let's say it in the next video. Thank you 52. PWM Chapter 2: Hi there. Now let's see what exactly? It's probably, um and how generated on the Arduino microcontroller. So whenever you look at such a reform, whenever you look at the pewter, blame their form just like this one. So the on period and off period boat off them are crucial Part of this fear of being there for me and the total duration on pier plus off period combines our clears a total damn 1,000,000,000 t. So the important concept to understand about the problem is the duty cycle, which is the average on time, which is an indication off the average on time off your bit of temples. The duty cycle is equal toe be on. That is the on period divided by on plus t off X implements be on the weather where total duration D. And if you multiply 100 then you get the duty cycle in percentage, which is usually specified. So 50% of the cycle mints the bus is on for 4% of the times and the polls. It's off further 50% of the time. While writing the court for our you know, we have to understand that not all the ardent opens, Schedule it with a balloon signal on our you know, you know the number 3569 10 and 11 total. Six problem channels are present. And when we have to generate a POW and signal from this pains, we don't have to write down a program toe blink. Those spins means we just have to call a single function, which is called Let's Analog Right and they never do that. Call this function on a lot right and pass a pin number and that duty cycle value to it. It's star gendered in the signal from this pin. So even if you do not represent integrate function again the way form it's still generating there, and it will keep generating continuously as long as the system it's bothered on. So the function is called its analog right? This is the excerpt from the official Ordina page, the their form generated on you know, Nano and Mini, as well as on Ordina. Maker Controller is off 4 90 hers approximately or close to 500 hertz and on the number five and number six on, you know the way from gender David's 9 80 hertz. The syntax is very simple Analog ridge. Been number and then duty cycle. Now let's try to see that how it happens so very light. Another great zero means there would be no duty cycle at all. Generator. This is the cycle here, which were passing is a parameter between 0 to 2 55 to 55 mins completely on pills, zero men's completely off pills. And when you pass different values like 6400 to 1 27 200 according leader duty cycle changes. Since it is your total 50 fire not 0 200 the 50% duty cycle will be achieved with another great 1 27 So first of all, let us try to do it in tinker care. So I haven't already connector here toe number 11 as well as I have corrected an oscilloscope on to this point on Let's I don't a program for it. So an elaborate 11 comma 1 27 so more 11 comma output and another great 11 comma 1 27 is McCord. That simple is that began also right down this pain and set up itself so that it is not repeated continuously and you can see my void look is empty, and even when it's empty, it's still continuously generating the reader. Blame signal, Let's say our genders, the signal. So I'll start this simulation over here. Let's stop the court window and you can see the lady is on. But the brightness is not that high, and we can see a square signal is generating here. In order to us with this, see this square signal. Just select the oscilloscope on your school and make the times per division go 1000 microseconds or instead you can also keep it. That's one millisecond will also be sufficient to do it properly. Now if you change this. If I stopped the simulation and if I change this on a log right toe, let's say 10 and then start the simulation. Now it will generate our duty cycle, which is quite less for quite small. And if I make it say 200 then they do recycle. It's quite tired so on. Bidders are high. Dollar periods are very low, and if I make it to 55 then it's almost continuously high, so wouldn't be visible here. That's almost always high and see the loop. It's completely empty so you can do this either on any particular probably have been. And even if you write it down just once, the signal, the square signal keeps generating there continuously infinitely all the time. Now this is done on softer, and that's why I don't think so. You would be able to spot any differences. Let's see how it looks on the heart. So let's let's try to write down that program here. So it's sort of doing all these things. All this Jiffy do is on a local right. Six comma, 2 55 it will generate, or it will make the led go higher or it should look almost always high. So let me just run on the camera, so I hope the lady is visible to you. Now if you can spot it, see its brightly lit. Okay, now let's make a change on instead of do 55 lacerated 1 27 and now I'll apply or the court just see the difference on the go. Keep focusing on duality. If you can spot the brightness is a bit Luneau. Let's not get 50 and upload. Thanks for the Lord. Can you see the difference So that's how beautiful and signal is. Generator and next videos. Let's see how we can use the spit of land signals to create a fading effect on these illiterates and see the output off rich. Thank you for watching this video. 53. PWM Chapter 3: I Then now that we have just seen how we can use beautiful them, it already know unless I look the H A program 200 of trading effects for this particular led so that we should get to observe actually the early leaving the European signal going from 0 to 55 thereby they really will in Greece. Inner straightness slowly and this ending while decreasing. So let's choose and inside remember, it is also are fading Effect Jim over here in examples in basics food. If you want, you can use that. But here I'm going to show you how to create such a program in a simple manner. So in chai or icicle 20 eyes less then 2 56 I listless. Yes, I will start from zero and it will incriminate proof of this six upto 55 will increase on what we know. Violence is increasing every time. Well, analog rates number six coma and I will take a small dealing off and milliseconds. Whenever we do this. Once it's completely done. I'll stop for three seconds and then I'll repeat the court but instead here. What I do is I make eyes go to No. 50 five eyes greater than or equal to zero, and I minus mints at the same thing with leverage every three seconds. Now look at this. Led, if you can. Okay, No, let's around the school. Let's upload this. Let's see the evidence status. Can you see this so slowly? Became completely breaks, then absolutely became company to you off after three second against lowly bridge after three seconds again. If people slowly no getting it. If you increase this Julie. So even if you just make it 20 instead of 10 you will see master differences in the way the brightness changes. Oops, I just have to make it 20. Then you come up. So this rich I look at it. It's happening slowly, no and slowly getting down to see. And it's that's happening in literally seconds, not residence. If they're annoying to you, there's tickets. One. This three approach control you is the shortcut that I use a plural. Now it's probably focused. Hi. So that's about the limit spreading effect of them, for sure. Tried the score and see it for yourself. Thank you for watching this video 54. I2C Chapter 1: Hi there. There's nothing about our, you know, Let us move the words of one off the very important topics of interest to the microcontrollers in embedded system. And that is a communication interface. I do see in a communication interface with which or a communication bus with which the microcontroller or the Arduino can communicate with multiple devices at the same time. The advantage off using, I do see, is that you can communicate with number off such slave devices at the same time. But to do so, only two pins off our dino or any host microcontroller are used. Those weapons are cold as a C L and S t A. And whatever communication that happens in my juicy between the master and slave is a completely synchronous serial communication. So all the teacher it sent along with the clock the clock is generated by the monster itself and the teacher. It's passed on through the reliance to all the individual devices. Let's see about are the ideas is critical in a pigeon i two c. It's developed by Philips. It is actually licensed through Phillips, which is now a next week. And although all the other manufacturers also implement. I do see into their devices. They don't actually call it. Instead, the college Let's be a blue, which is also or let's to wire interface. So I to see the name I don't say I don't see him won't appear, but it will appear in the Philips. Where are an extremity devices? For example, if you look into the data shoot off lpc one forage, we will find out the name you see into the detention. But if you look into the leadership off, say, at made a treaty which they control using already No, no, you won't find anywhere to certain and certainly will find mind. Well, there is absolutely no difference in technicalities, in interfacing or in anything. Then you're dealing with CNN communication irritable. The communication happens with us. All the devices in the bus have a specific seven which adults? A bus is like this. Two wires are there to which all the devices are connector and every one of us has a specific seven which edges? I do think communication requires only two wives, which is called Let's S D A. C l. And all the communication happens in. I'd juicy through this two s on Always. Whenever you're doing the ideas communication, there is one master and other sleeve or the second device, which is asleep. Let us go into a really interesting resource off our dino that I prefer to use. But I do see, So this is a period I'll be sharing with you people. Yes, ive into some mutual decision about now. Let us assume that you have character microcontroller with CNN is relied on there. See if you have connector a slave device like it easy on a sensor or from then how exactly the communication happens. So the terms are basically transmitter and receiver as less masculine sleep. Remember, if I'm communicating with Lexie a sensor, then the microcontroller is master or sardinas muster on the sensor. It's live, but it doesn't mean that the cardinal it's transmitted all the time. And this leaves this evil because I'm connecting us and certainly no, I believe to hear the details from sense of and then that is the are the novel actors receiver and the sensor will act as transmitter, so the transmitted in silver balls and be exchanged. Master can be a transmitter that will assemble civil, similarly slave can be a master as you let's look and see. Not technically speaking how exactly the details It's transmitted for master toe sleep. Let's see a bit in detail. There are some conditions in I Lucy when the details switch transmitter. Most of all, it's far less data invalidity condition any data that is being passed on to the line off our dean of the Josef Ins. It said to be valid only when it follows the little validity condition and the bigger validity condition is the detail on is delayed mostly stable during the high period off. It means whenever the clock from goes from 0 to 1 and again goes to zero all the time that the industrialist Eben off the Zeeland should be stable. Doesn't matter if you try zero or one, but it should be stable all the time. The change is only allowed in the clock. It's blew off the clock in Syria. Remember this. You tabulated the condition post. Next, there is a start and stop condition. So ah, hydro, no transition on the SG a line. While a seal is high, it's going let's start condition. Whenever a master wants to communicate with us leave. It will start the communication by doing this kind off transition onto the I principles, it will keep the assailant high at the same time, it will make the STL line go low from high, which will indicate a start condition onto the bus and any other device will not. A change a communication after receiving this start condition. When the complete communication is John, the master will provide with us stop condition. A stop condition is low to high transition on Israel line while the assail line it's high. This will be fine us off conditions. So as long as the soft condition is not received, another master will not try to take over. The I do see bus detection of the starting stop condition by the device is connected to the bus is easy if there is necessary harbor and most of the modern ICI's and sensors who have it smart controllers within them who can detect the sergeant's off conditions off the bus after doing the sudden stop tradition. The communication happens in this form it, so the master will do watch. It will put this labor address onto the bus along with the clock on the date Alan with clock. It will put this remember slivers, depending upon whether it more stool, like are really from that prevails. It will give the aged, which as one or zero one for reading and zero phone right there, but thereby it will complete the aid with address. The last video. It's really light. Then the slave will acknowledged by giving an acknowledged condition. And then the monster will send nature to the slave and acknowledge and then data and then acknowledge. And it goes on and on alone until there is a stop condition generated. Now in all this communication, it may also happen that the monster more stool beautiful on this live in that case in the Muslim or severely from sleep. What we do or what is John here is a table or damage start condition. It's creative. So firstly, the slave addresses, even after stop start condition, then read with is given. Then the address is given. From here. We have to read and then we develop. It'd start condition after this different genera stark condition or Demi right condition. The slave will transferred Streeter to the master and the mustard will read them, according those who are interested to study about the music communication in very Beautiful in Britain, Pieces should definitely follow this scotch. I'm attaching this good along with this lecture. Fortunately, when you are using our dino, your only word toe every bit centerpieces because the our Dino has bigotry toward Controller, which has an on shift UW I controller, the on tribute of their controllable take care of generating all these conditions. If you properly configure the registers. Other mites reversal in 805 on we needed to create this kind of conditions with simple program or by creating functions like this. I a nightly start start stop basically indicates cinch and read like this. But are, you know, are the microcontroller right bigotry? True, it has an on chip putatively modern, and the Ordina provides with very sophisticated a fire library to profess it devices present on a prissy bus. Moreover, for different senses that you're going to use, let's say, for example, we're going to use Beichuan 70 like sensor on BMP, vanity, ah, bushman, temperature, humidity, temperature and special sense. So the librarians are also available to interface this hand off sensor, which makes us off the internal viral liberally and clear this answer completely and give you the Jetta for beginners in tow. The Arlena world are reminiscent stream or this is the best approach to fall from the next video. We'll see. What are the library functions of our, you know, and how we can interface with different sensors using papers. Thank you for watching this video. 55. I2C Chapter 2: Hi there. These are the functions or the member functions isn't in the rd nosebleed celebrity. So, first of all, what you need to do is to include the Royal Library uniting, hashing your wire dotage, and then you can use any of dysfunctions wired or begin. Why are not requests from murder, right? We're not read by are available, said Club On received one request any of this functions. Usually when you are interfacing with very wrong or sensor on a very raw I to see device like a problem, you might need to use this functions. But the benefit off using already know is that we get are really at the label and easy to use library for almost every interest vis that you might need. So it's better to not reinvent the wheel and use the existing cool. So let's say some of the sensors with our, you know, along with their library functions, thank you for 56. I2C Chapter 3: hello there. Having discussed about the eye to see on the communication that happens with hard to see with our, you know, let us actually see an example of a particular sensor which can be profess to the I to see purse and see the palace for it. So first of all, we'll see about this true sensor one. It's a B H 1750 which is a light sensor which can sense the amount of fallen light on Give us the units or give us the values in illuminates the unit off, which is looks so B H 1750 is a factory calibrated sensor which works on I Do see credible and it gives us output. In luminess, there's looks the operating voltage off pH. Mint 750 is 3.3 world, but usually you don't get this end of isis to profess, but you get more the electors, and usually this kind of models have a non triple digit regulator which can regulate the won five world age drummer. You know, 2313 would require for the icy welcome, so you will most probably encounter any such kind of model to use it or you know which you need to interface with it, and I know about them for it. The interfacing is very simple, with easy ground rules to five world and ground connection. And if CNN is deep, go study. I just The connections are recipients of our you know, you know. So if you are using hard enough, you know, on the pins artists, he, for instance three a. And if I it's a C L. So this SG a should go toe in a four and this a sale should go to pin a five off are you know, was that isn't you are good to read on a program for Beach once on 50 and see the output off itch. Now let's see another model off similar kind which interfaces on I Chrissy And then we'll see for the program off its senses. So along with the H 1750 this is how they replacing system. So the BCC should goto five old the ground pin off the sensor should go to ground. The help in should go do a five on the S t. A pin should go to the for? On some are, you know, no borders. These groupings are there, taken for his deal and SCL connection specifically for I to see. So it's OK if you connected here are here. It's simply it is a natural. Now, along with the H 1750 there is one more very interesting sensor that is the MP vanity. The inhumanity is manufactured by Bush. On it is an automatic or so Don't Belgrade, since which can give us temperature, racial as well. It's you. The interfacing is exactly similar. A sale is the line should goto our dino and decency and growing collection so it can give us barometric pressure temperature. I'll get you as a lesson sea level altitude, all in the same package. So let's see how we can write down a program for these things. The address off the MP vanity that specified it. Zero x 77 The 17 address and the address off engagements Valparaiso will see in our program . So if you have that sensors very good. Have them with you. You can do the connections one by one are you can also connect both off them together. In that case, a seal off. Both the sensors should go to the RD knows it's helping that it's the five and the SDA off both of the censorship Goto a four. So, let's say for the program off this true sensors. 57. I2C Chapter 4: Hello there. As discussed, let us see the program for Beichuan 750 and the impunity sensors. But to do that, we're going to need true specific libraries which are not directly downloadable at least as off now from the Cardinals library manager. So I have attentional libraries, which you can download from this section and use them once. Downloader, you will find this to zip files. So let's foster installed library for pH 17 crazy just extracted. And it repaid second in the four Little like this. This is the man in library installation matter. More purpose is to use these libraries externally. It's to let you know about how we can install libraries, including So open this folder and you will find another folder there, which is the H 1750 master. So simply rename this folder now to be H 1750 and no copy this folder and go to your program files. They're the RV noise installed and they're in the library's folder. You just need to peace to this world. Were there instructor permission and the beach mints one phrase. Really Restrict a sample court off ph 1750 library strains there in the library. Also, if you look into examples on opened this particular example Simple Beach one little simple . So it's on the same thing. It's exactly like this, So let's see how we can use this court. First of all, you need to include the viral every then you to include the VH 1750 11 terrified. Then we create an instance off pH. 1750 like sensor as night creature. Remember this like winter is just a name given by us. If you want, you can use any particular name over here. Then, in set up, we initialize the serial porch initialized. I do see critical or peanut butter model onto the Arduino, and then we simply initialize the sensor writing like future, not begin. And then this obviously really French. Be judgments on first protest begins. Remember when you put F like this in front of Fridge, then this particular text is not stored in RAM, but it store in the flash memory off article. The program. It's quite simple, so your age is also a privilege to using onstage inch lux, so it's not on the same things that seem. Which variable is Ippolito Light which are not read like level All the communication with high to see Onda interacting with the sensor is done by this library function then simply you parentage surrender current light Similar clinch Lux on several Alexa Lux is actually the calculator value on Alexis something we're printing as a unit for this particular sense . So once you're down or this program, you can see the output. Now, Right now, I have the compiled video for this program because I don't have this inside Right now I have created the video forage. So let's see the B H 1750 Looks like this. So see, this is how the sense that is inter fest The deficit is very simple. It only requires four lens. As you see, this is a ground. And these are the two assailants deepens required for I proceed, connection. And once you download this from them, you can Sapir see the amount off light. It actually shows the legend moments falling onto the sensor, right? No others insulate is just room a room like No, I've turned on the flashlight which should give high ratings. Would be ableto see them. So for 73 5 70 year alleged ins due to the flashlight off mobile it waas something similar to Elia earlier will also do the same thing. But this insulation or if you can see, gives us exact amount off like that. It's falling earlier. Just give us a very rough approximation off. What is the light falling on whereas PH months 750 can give you the exact number off limits . So if you have the sensor upon this experiment, the court and the library water off being are uploaded in the resources section of this video. See how it goes for you. 58. RTC Chapter 1: hi there in decision we're going to study about oven off. The most important interfaces with the are you know that it's a real time clock, real time clock, or RTC is a specialized chip or an icy, which is to be connected to already know externally so that they are, you know, can keep track off the current date time, other minute second and the entire calendar. So what happens is whenever you use our dino just has a microcontroller, you know that it doesn't have any kind of time keeping mechanism. Basically, our, you know, is a very simple, dumb microcontroller. It's not as powerful at specie, and therefore we don't know about the current time place. There's January 1st, 2020 19 whatever it is, and if let's say the time, it's 10 a.m. in the morning. We don't know these things with our you know. You can off course give this imports in the memory of heart, you know. But after power on after power off and power on dark, you know most probably will not retain it because they are, you cannot keep time. RTZ is an external chip which is not only used with RD knows, but it is being used for a long time, even in the computers also. So it's a safe that chip, which is used to keep the time it continuously, keeps track off time in spite off, even if there is a power failure, then there is a built in battery of a small battery. We also call it at Simone's battery so that batteries there, which can help the art easy to keep track of time. Let's study about such an RTC. I see with our dinner the icy that is in study here. It's called a DS 1307 The B s name is because it's manufactured by the last semiconductors , which is now a maxim integrated. So Maxim manufacturers this icy the name is the s 1307 and it's a very simple 16 pin icy. It's a real time clock I see which has got an eye to see missed serial interface. So because of eye to see it only needs for it only requires two pins off microcontroller toe. Get interface with it, and you can also hoping this icy, even if you already have in communicating with some other disobeys device. Like some sensors. What the is 1207 Cantu is. It can keep track off Date month, year. Be off the week. Our manage second as villas. Libya Compensation. The operating voltage off. This I see it's plus five. Vote on. It requires an external battery for keeping the timing. The external battery is required to keep track off time. Even then, the power or the main power is lost, and the artist see requires an external crystal to keep track of time. Basically, this is a very, very popular Valukas style, which we use with the S 1307 Why it's popular. It's because it is used in almost every places where we was oclock operation. So be each other. Wrist watches. The courts watches. We have our digital watches. We have our computer circuits. Are any partisanship like this mantra? 07 The same crystal is used to keep track of time. Yes, until 07 Also provide us with a 24 hour or trail our mode of operation, which we can select depending upon our requirement. Let's say in detail about decisive, so the applications are timekeeping for our you know, then any kind off timer best project where you might need some kind of alarming, like school bell alarm. Then artist is needed for the delicate application where we have to create a detail longer and we have to keep log off the sensor values or some vital information on. We have to save these values along with respect to time. Then we can also create an attendant system. And in creating this kind of system, you definitely needed timing because the attendants are logged in and love out is also based on timing. So similarly, you'll get an idea that any project or any book where you need precise time information In that case, you can use this icy obvious 13 07 The crystal, which is used here except special crystal, was value. It's 32.76 h kilohertz on. What I do now is I just opened the details. Shoot off this icing so that you can get up closer. Look to the icy. I remember being a developer and being someone who is walking with microcontrollers like hard, you know, during the day trash, it should become a very common thing for you people. So this is how the interfacing should be. There is up in number eight is vcc the number one and two are x one x two here you can crystal. Then there is a sail and SDA connection and then there is ground connection the sq w out which is shown here. It's optional and we sell them. Use it. Number three is re batch where we have to connect a small external cell for keeping the trying. When the primary power or primary VCC has lost its power. The interfacing is through assailant is realigns and just like any eye to see device, the country's F 07 also requires to external pullup resistors on today to see like so that would be done shit by maximum director. There is all the description about it. It has got a 56 parts off non volatile S dram. So there is a lamb storage which is keeping the memory which is keeping the can change intact or does not let it toe get vanished after power, backup or after power failures. That is because of this external said so there's the icy. It comes in a 70 package as well as in a true whole package on this is the Internal register map. Lex. Let's look into it. It's a school down. You can see the internal red instrument. So these are the Internet registers off this, I see. So at 00207 are the registers for time. And as you can see, the very first is a run control register, which can also have seconds information, then ch billions for gun control off the icy or artistic so respected zero, then the icy are the RTC's stopped. Then there is minute register, then hours register, date, register Did register mantra disturbed an era district. So all of this register store the values off those respective quantities. And whenever you turn on the icy or they never return on the artist, see the time it's kept properly and it keeps on increasing automatically. Next video, we'll see about more details about our kissy, and we'll see how we can write down a program in our, you know, to interface with this. Thank you 59. RTC Chapter 2: hi there. So now that we have seen about the artist Sidious won 307 basics, let's try to see how we can interface it with our. You know, if you have the I'll see in your hand, you can simply create a socket like this onto a Breitbart and interface the RTC with the eye to see pins off our dinner, which are in a four and a five. If not, then you better use this kind of readily available models, which make the experimentation much easier and simpler. Because either if you have this kind off a shell, which contains our dizzy and all the required connections onto it, all you have to do is just insert this shelled on to top off the are you know, and you go to I have a similar shield with me, which I'll be using for demonstration. And if you don't have a shield, then you can simply by this kind of artistry models. These are very easily available in the market, and all you have to do is just connected to these four wives, good arm with sissy SG and a seal so has discussed. The RTC requires an external 32.768 kilohertz Christian, I would like you to Google. Search that and know why exactly that. Crystal issues. There's an interesting answer to it. I'll just included by the end of this course, my views, that so this is that crystal, which feels 32.766 killers Crystal there it a quest three volt battery for time keeping. Now, if you see this model, then there is the small cell holder here. And if you look at this shell, then there is also a small cell older over here. So this cell holder is toe hold the three World battery. The eye to see address for DS 1307080 for right and Rex Divan. It's for read. You can use any modern fortune according to a desire. The connections are to be like this. A seal off the Arctic Sea chip or this icy needs to go toe been a five off our dino, which is a cell pin. And as Jipping should goto in a four, which is as deep in so is the happy enough controller should go to his jpn off icy and SLP in off controller or are, you know, should go to a self enough. The artist. The library, which we use, which we prefer for use. India's won 307 ins RTC lib by eight a foot. So if you open the library manager from your sketches, just search for artisan lip. You will get a number of different libraries. But what we have to use is this one, which is our Sicily, but effort. So we're using this library. I'll show you how to install this library. But first, let's have a look at the functions which this library provides us with it. So when you include artisan lip in your program, what you have to do is simply included with hash. Include are this elite dot etch. Then you create an instance off this library. So the RTZ underscored ES 1307 is a class, and RTC is an instance of this class. What happens is you have created ideas won 307 instance called RTC. Then you use the artisan or begin function toe initialize. The real time clock artist see dot is running. Function is used to check if the RTC's connected onto the bus or not. If it is character, the artisanal is running. Function will return you. The respective status. Art is not a just is a function which is used to adjust the date and time and did time Now is a good to our dissident knows our dessert now is the function, which is used to read the current date and time. We'll see about it in more details in the respect to sample core for it. So I just opened up program for it, which have created over here, and you use the video open. They are. You know, what you have to do first is you have to install the artist lib library from the library manager for it. You know it's there. Are available into the existing library manager. You don't need to do it externally. So how you do it is you simply go to sketch, then include library and then managed library. It's so into the managed libraries. The pop up window will come up, which will show you all the libraries that are available on. But you have to do here is just wait for this abdication. Off list done. Remember it happens every day, and they are, you know, is bothered on every time it's connected to Internet. It checks for updates for your libraries and check some new leg. It is, too, just not sure RTC, even our disease. Enough, But you will get a lot of heart. Izzy libraries them and you'll have to search for their efforts. So better directly. Search for RTC lip. So when it says about it, does he live? You'll get this. It's already installing that slider. Install Button is no great out on my computer, just installed in Self Library and then look at the school. Now what we have done. We have included artist Salem that we have created an instance off art insidious 1307 Then we have taken on a there. We have a condom, different names, off week or big dates into the Eric. So it's an ad a having seven key limits, and each claimant can be as long it's trilobites. So that's why it's taken at 7 12 So it's a Giulietta. So seven off Desiree will have Sunday, Monday, Tuesday, Wednesday, Thursday, Friday that sort off all the variables that you can use now in world set up. What we have done is vile cereals are not cereal. Now you will get this particular, or you will see this particular sample a number of different Arden examples. Basically, this line will ensure that your court will only execute when the serial monitor is connected. Since we're doing just the testing, we don't want the court to execute unless we are using or unless we have opened the city. And that's where this line is. There a particular leaves us for our you know, you know, if you're using our you know, you know, then anyways, what happens is whenever you turn on the serial port or whenever you turn on the serial monitor, the article is a reset once, and that's like it certainly did for, you know or mega like that what we're done here. It's also fall surrendered. Begin with how satisfied Baldridge and then busy, if not, are dizzy Dark begin, if not artistic. What begin means if artisanal begins returns zero. If our dissident begins at zero, then only dysfunction will be executed and what we have done in this function it's couldn't find RTZ and then violent means we just blocked the core here. So what we do is wait here in financially and here we just sprint a straightness on Syrian so the program will come down only or program will execute further only if they are disease detectives. Then next we'll chicken if not our disease running. So it will check what it'll check if our dizzy is not running and if it's not running. So if our disorder turning function on are destroyed, is running function down? Zero. It means artist is not running. Then this slope will execute on what we learn here. What we what we execute here. It's cereal, not French. Ellen artist is not joining, and then I just start this is Dayton time using this syntax. Now this is a vague to use the current date and trying off the computer to be used in the program. So whenever one happens is, let's say, if I have to say the data in time for now, like when I'm doing the program. So in that case, what you can do is you can simply use this kind of function like this, so are considered just so their time. Let's say 2019 I'm doing it on 29th off August and this is the time is, let's say, 10 in the morning. So this 2019 then this one is actually the month. So if it's office than its each, this is it. And this is time, our minute second like that. So Howard, it's is here. Munt date our minutes second. But what happens is whenever I put this information and we never actually gonna upload button. And while the program is compiled and applauded, the seconds have elapsed. The time has gone a bit too further, and that's why we use this kind of our dealers. Internal mechanism date time F underscore underscored H comma F underscoring the score time . So this basically does what is each inserts the current stage and time off the system at the time of downloading. Then look, what we have done is if you have taken or we have used this special later type created by this library called deep time and we're using, we're creating and since off it which is now isolated, time is a structure in which number of different parameters can be saved at once and now is according to our dizzy dodge. Now, this is how we read it. So once you really are considered now in a variable called now we can simply bring to the respect to contents off this no structure which are here now, that year. Now, for months now, the day No, no, they are week now that are now the minute and Notre second. Then there are some more things done which are no doubt, units, time on. There are some calculations done with it. So in the next video, we'll try to down or this onto the are you know, and then we'll see the output. 60. RTC Chapter 3: Hi there. So let's try to do this Experiment with our dizzy. I have this chilled over here. So if you don't know about this shield ourselves so far, you know, then just have a look around this kind of things. So what happens is this is the bare bone. Are you know that we're using for a long time now? And there are a number of different shells available for our you know. So the chips are nothing but a variety off. Are you interfaces on the structure? It's purposefully created so that you don't need to do any kind of fighting. You don't need to do any kind of hydro connections. All you have to do is see if you look at your carefully. It also looks exactly like are you know, the top portion. The curves on the Kurtz are exactly similar on all the pins are also exactly seem so the pencils exactly seem the purpose is to connect this chilled onto the rd No. Like this on four happens is all the required corrections for this shield are done automatically onto the already know board. So you don't need to worry about anything. It has got an RTC ship right over here. And if you can spot this tiny crystal is there, there is also sell older over here. But I don't have ah, tiny cell right now and for trial. This is not required. Unless you're going toe power off and power on, you're not going to require this cell. So let's connected to the computer. So here's what USB key people and, uh, let me just connected here onto the computer. Once it's collected, you can see the pink off the windows that comes, just go to board. And Jews already know General No, no. Then go to Tools Port on 17 and simply uploaded. So I think at the moment of uploading the time off my system Watts 7 43 off the evening and its 29th August 2019. So right now I'm compiling it. The date and time that is loaded is the last detail time when the program starts downloading itself. So let's see, it's still compiling. The sketch was compiling his John. It will upload it, and that's the uploading is done, which doesn't take much time. All we have to do is open this single put Now it starts. I have to change the boater to match the one I have used in my core, which is 96 double zero. And you can see the old Certs 29 each 29th 2019 80 29. Tell us jittery and the time it's 7 43 off the evening so you can check it with my system time. It has done quite correctly. So did 7 44 03 On the artistic time, it's 7 43 52 something so it's lagging with, Let's say, 20 seconds off dealer and that's fine with me. Then here is the UNIX Timestamp. For those who don't know about the UNIX timestamp, it is the mechanism off storing time in other item of digital equipment's by simply storing the number off seconds passed from 1st January 1970 midnight. So from the from the 12 noon off the midnight of January 1st, 1972 this day or to this moment, whatever number off seconds that have elapsed, this is that time stem. And by dividing it by this value, which is John over here. 86400 l What we get is the total number off days that have been passed. So that's about that this libraries demonstration tried out for yourself after trying out the demonstration off artist. See, what you have to do is you have to try out how you can create some interesting projects surrounded. So you just check for this other. We just check for this minute you can create an alarm for ah turning on the buzzer or led for a particular our as well as on a four particular day. All you have to do it simply is this now don't other now dominate, not second. And you can use them for comparisons. Thank you for watching this video. And next video will see something very interesting bittersweet to artists itself. So thank you. 61. RTC Chapter 4: Hi there. Now that we have seen how we can interface the SD card of it or Dino either using an external model or by using and shield or in a cigar chilled. Now let's see how we can. I don't program for it. So I have a sample cordial really? Over here with me. Let's see how their sample Koreans. So what you need to do is you need to include the SP I library which is responsible for initiating all the spare communications with. Are you know then you need to include the SG library off the SD card library. Then we specify the chip selects signal since the clock later in data out pins off S p I R . Fixed The only area building here is the chip selects signal on. We have mentioned the chip select at number 10 off our people. If you have connected it elsewhere, then that's your choice. Remember, in all these connections showed, this is optional. See us. But rest off depends are mandatory and they should be connected at dot specified in numbers only because these are the hardware SPF been so far. And thats why this should be collected this means only number 11 12 and 13 C s u can connect to any Ordina open and just wherever you corrected specified toward you. So instead up. What we do is visibly start with serial porch toe. Just bring the messages onto the serial port. Then initializing it's Ricard. It's a message given to the serial port, then s t dot begin ships Alex So here the number will be provided. If there isn't is Ricard present, then dysfunction will return a non zero if it returns. Since your overhead means if it's a not value on a zero value, then if it means that the card is not connected properly there it's some issue in your hardware that it some issue in the connections you have made or the card is damaged. So what? It prints its card filled or not present and it will bait you. It will not do anything except you again, President, he said. Britain. The program comes around only if the card is present. And so the serial message printed its card intial ist means we can start with the cold. No one would look. What we have done is we have taken our string the string is equal to This is our dino sample court. Now, you can easily guess that instead of just an arbitrary sample court leg is you can definitely use any particular text over here so you can convert your date and time into a string. Then you can connect the sensor values to it. We can connect, do three different sense of value, storied. You can create any kind of string you want. And then what we do is we create an object off class file. So file data file is equal to SD Dodge Open, detailed log dot txt and then we given attribute that it's filed right. It means we want toe right onto this particular fight. Now there are different attributes for ah, riding a reading and writing file on. If you look at the streak card library of our you know, then it it specified that you can have a read attribute as the less you can have a right attribute whenever you create the particular file using Israel or open. Then the attribute is mentioned here. The attributes file right? So if the finest available next line is if the data file is available, then what we do. It's the job file dot French Ellen dusting. What is the dusting? The data string is nothing but this simple welcome message that we have written over here, which is this is our dino sample code. And then what we do is a tough I'll not close. So Datafile Lord French Ellen and Datafile dot close at simple as a just two lines. And since I have included new land over here itself, I can remove this end and I can simply do the tough i'll dot bridge the industry notify not close and then serial dot print Ellen Day trusting So the same serial dusting off the same text line it's printed onto the serial port. So basically what I'm doing here is I'm just creating a txt file called little of Notts Tree on. It will contain a number of different instances off this particular text as minute as the loop executors that many number off explains would be present on to the Africa. So data file this president and it can be a bunch. Then this will happen. Otherwise it will just show a message. Enter opening day, Tulum Knottiest This is a very simple and very easy to demonstrate demo or very easy toe try out demo for his record. So to experiment with this, first of all, what I do is I will connect Meistrich card to the computer to check if it condensed some previous return or much so here I just remove this is recorded, profess, then connected into a memory card reader, and then I'll correct this card reader to the computer. So whenever I open it there, it's something I have it sent previously. So just village and as discussed, use the SD for matter or is regard for matter on former days regard. So this is a free software which is available so this open it. It will show you the name off your SD card drive. And then just for Matic's was the formatting is completed. No, what I do is I will remove it from the computer, and now I'll insert this into the party. No board. So let's see. You can do it. So I just started the camera one small so you can have a look. So now I have ah, have pharma treated tonight, but it's a very moved it. Now what I'll do is I'll inserted into the card holder or card reader like this into the shield like this and now well connected to computers. That's what I have no connected. Now what I do, it's I will simply go to tools, so make sure if everything is right, it's already know you know should be there. Then put it should be the same port which needs to be and then upload now that the port is downloaded on through the art, you know what I'll do is I'll simply open the serial Port Onda. I will have to choose the Powder Ridge to match the fund, which I have used in my program. So let's make it 96 double zero on multiple times. There's executing as against since we have not mentioned any delay, which we should have. Actually, by the end of the court, the program is repeating multiple times. So let's take dealer. But now what we do is I'll just remove this. No, now I have the movie as a guard. Then I'm using this external card reader. I've connected it into it, and now I have connected Carter that well, laptop I don't have a built in is recorded in my laptop. So that's why I'm using discarded that he was regarded on on your city log. As you can see, the new line is not printing to it, although we had given slash in the new land is not printed. So I've removed or diligent this fight for now. And let's keep it as it is, So Datafile dot Sprint Ellen dusting I've removed, regarded up, connected toe the article. Then Martin is connected back into the machine and then uploaded the court. Now there is a delay. Also in more so not many lines will be printed onto these regard. Uh, after positing on, we can see initializing as regards initial. Is this it? Sample core sample. Poor sample. I just keep the controller into the city state for some time, and I will remove the gardener. You can see the mission's It's shrodes initializing a cigar card filled card. Not present. Why? Because I have removed the guard So the court was executed a few times. Now let us again use the card reader, then see for the digital file which is generated over here. So let's see this. So this is the previous content. And from here on, you can see the new content on new life. Now, that's a very simple sample. If you if you're more interested to learn about it, then you can create a CS, refile with peach and thyme from our artists program on then the sensor information from our PH. D program or ultrasonic program, and then create a data log off this I'm including it as a project for you to finish. I will also be providing you with this source court off it, but you have to write on your own first So child with this hysterical interface, if you have, it's very interesting and very, very simple to use. There are a number of different projects that you can do with it, but the first thing is getting started and understanding the inter office. So that's it for this video. I hope you will like this video. Hope you will experiment with this hard. You know, for the wrong Thank you for watching this video 62. SD Chapter 1: Hi there. In this video, we'll see about a very interesting interferes with our dino. And that is a memory card interface. American interface are SD card interface is basically the same SD card that we use in the digital cameras as well as in the mobile phone. We normally call it as my kristic card because off its nature, because off its physical sites. But actually it is. It is. Bye bye, properties or technically, it's called that s D card itself on Lexie. How can interface is ricard toe already know now, ultimately, why would we would like to interface the is regarded argument definitely to create files and to create or to save detail. Now you might have seen or you might have known about the problem that we can use to store the data. But always remember, the stories for a prom is always less so. The prom present inside the inside of the microcontroller is very small insights on. Even if you connect some external problems, then they don't have much, much memories like one K to four K and like quite so there are off course so bigger size of Abrams also. But they don't provide you the flexibility to write down a file off one GB or do GB. Also with memory card, you can create large files as well. Lexi Home Every guard is interface to our dino. And before knowing about the memory card interfacing, let's talk a bit about SP now. So far in this course, we have talked about I to see which is a bus protocol where multiple devices can be connected to our dino. Over. Only two lines on all of the devices connected to the bus can communicate with the are, you know, only using the stool. It's off course at a time only one device can communicate, but it reduces a lot of hardware headache harder, complex cities. And that's why it's always preference. S p I is not something similar, but sp I It's preferably used as a very high spirit serial communication interface between master and multiple slaves, so you can use SP. I like a bus, but it is not usually done. So SP I is primarily used for a very high spirit communication, and when there are multiple espirit devices which are needed to be communicated with the same controller, then they can be multiplex. Also, let's see how it's used. So in a spear there are this primary lines. One is a silky that it's cereal clock as answer the entire communication. It's cereal and it sink owners. So the master provides the clock pulses for doing all the communications and that is provided by this line called SC. Then there is a land collards M. O s, which stands for master out slave. In this mos happen goes to the Mos i pin or data input pin off the SPD sleeps if you have connections So this is master out slave in And then there is a master in slave out master in slave open usually goes toe a my soap in off The slave devices are there has also been called It's the out so d out off the device comes to a mile soft master and the in off the device is given to the Mos i off master So using this a clk mos i and m I s o all the communication is happening between the master and the selector Sleep now If there is only one slave then you can keep this live select been, which is also like a chip select Been continuously given to ground means if you keep it ground or if I give it zero, then that's slated selector. And if it is only one device you're communicating with you then you can just keep it grounded. But if you have. But if you have multiple such slaves character with our dino at the same time, then what you have to do is you have to judge it. Different slave select signals from our deal. So a silky and where sign in my ESA will be common Toe all the slave devices, as you can see. So there, there trump common the same. A sale will go to all the devices that you want to communicate to the same M. O. S. I and the same reminds. So it's shared. But the SS bar are slim. Select signal will be different. So if I have to communicate with three devices from our Dino, I needed three different slave select pins on slept Select is nothing complicated. It's just any general purpose input output pin. So when you want to talk with this green device, he will make that been low When you want to talk with this blue device, you will make the SS to low interest off them high. And when you talk with the third device, you will keep a Sastri Lou and essence Venice is too high. SP i protocol is at simple s that there is nothing complicated into it. The master will provide oclock. It will send data if there is greater Toby received in that data will be resettled over these lines and a very high spirit. Communication happens between this layer and master. Why they're discussing this is because is Ricard supports or is Ricard interfaces with SP? I protocol to the controller And that's why we have just had a small introduction toe SPF and next video. Let's see how we can actually interface the has regard with Artie. Thank you for watching this video. 63. SD Chapter 2: Heidi. Now that we have discussed about the SP, I in brief let's talk about the Zika. So the micro SD card that you have in your hands or you might have in your phones usually looks like this. So what do you see here is the micro SD card. That is this smaller version off it. What you're looking at is been out off this particular thing. I don't know if my camera can focus. It will. So this is the micro his record. And there's the pin out you're looking at focus, Focus, focus. Okay, that's not doing it. So you might have been using with laptop the adaptor like this. So this is the regular restaurant card sites Onda. We use this adaptive in 30 micro's record into it and we use it with lacto with this. Depends are properly visible if you need. You can also simply solder wires toe. This is regard interface on their interface. It with the are, you know? So look at the pence off. Is Ricard over here? So those are the pins off a stryker. The 82. This is the pain which is x not used, not collector. This is the CIA spin that is ship selected. This one is D I. That is data in Butch Are it can correct to muster out slave in this one here is really deep in And remember, it's strictly trip one cable. So you're not supposed to give five Altruistic are. Then you can have the experience. CLK are a CLK The envious is nothing but the ground been And then beagle means the data out of his record which goes study in off microcontrollers It goes toe master enslave out. The last thing is again X which is not connected. I'm not needed now. One thing is to remember with top with particularly micro SD card that our dino has more recording capability in That's five use this kind of external device the most simple solution for storing a large piece of data to our dino. The simplest solution is using a micro SD card and if you don't find how to connect this, my kresic are directly to already know. Then you can use this kind off models or even the shell that I showed you previously this kind of thing. So it has got a micro SD card interface over here, If you can see Remember, this kind of interfaces are very simple to use and should be recommended if you don't know about how exactly to do the connections Office regarded controller One thing is to remember , with respect to my crazy card on that is it is a strictly 3.3 volts device, so it should not be given any more World is than 3.3 volts as well as the interfacing lines should also marked gate more than three words signals. So if you can X e s b i A sale kdu directly to our you know, it will also damage the pins and that's what we need is some kind off level can murder which can convert five or signals into the respective 3.3 world signal. And most of the physical models like this have this included on twitch. So I have this particular shield over here. It has launched all the required stuffs in twitch. Then I have a whole lot from material over here I have one more Is Ricard interface like this. So it's not exactly like this one, but it also has got a very small I see here which access level converters The connections with this kind of models become simpler. You have to go. Five will directly from our you know, there is their own ship dish regulator which converts it to 3.3 world. And then there are all these little converters on You have to connect the pins to the respective SPL lines off RD. So these are some of the most important thing you should understand about already know already know and theistic our interface that they're Stoudt point we will devices. The SD cards are long storage but can be formatted with file system before using instead card with our dino. Make sure that you use the official is required for matter on for my trip into the fact 32 former. So if you don't get this official for matter, it's OK to format it in windows, but it is preferred, at least for the first time before my did with this regards Official is different matter. What's your formatted it with a team I see for matter, you're really to use this card and this morning, with hardly no what we do is we using internal ISRAELY berating, Desperate of on is very, very complex. Do not even think off hard, according it, at least if you're a beginner, so use the is deliberately, which is they're all really present inside. The already know it enables the reading and writing the contents of his record. You can start creating files onto the Stryker, preferably the text files. Some examples have there onto the aid efforts such, and we also have going to see one example off how we can create the files on Twisted. And then we'll see a project with his regard and RDC that's completely tell over. So here is how the breakout off for our QC is and these are the SP I Prince off are you know, we haven't discussed it yet before? So let's see. CS is just a chip select signal, which I have told you before. Also, it just gets connected to energy. Power doesn't matter. Very connected with the show that I have the CIA spin. It's connected to your number 10 that the I've been off the Africa, which is the Data import mints. Master out slave in the number 11 of our dinner is that import s I number. Well, is a my s o the number 13. It's clock or CLK, And then what we need to do is to give five old and ground signal to this morning. So just make a connection like this, or if you have a show like me, they can simply insert the shell on. Then use this bigger version off the card reader, and you can simply inserted into this. You can create a file directly. So that's how you have to do the hardware connections. In the next video, we'll see how we can write down the program. Forage. Thank you for watching this video. 64. Conclusion: Hi. This congratulations and operating this course, taking on blank walls and competing all the assignments included in itch by sitting in front of a computer because a lot of dedication and commitment you have exactly shown packed. So congratulations. I hope you're on this or all the concepts that we have covered into this course nicely. I'm completed all the exercises. Do not forget to donor the resources provided with discourse. Your maximum engine on. Thank you.