So far in these lessons, we have just been using the Arduino output pins. If we actually want to read values from a sensor or other such components, we need to learn how to read values from the analog pins. These are pins A0 through A5. This lesson will teach you all about the analogRead command that allows you to interact with these pins. Enjoy!
In this new series of lessons, I will be using this Arduino kit.
As we learn more about programming the Arduino, we become more and more excited about connecting and controlling simple circuits. In order to do this, we need to begin to understand how to design and analyze the circuits we are building. In this lesson we introduce you to Ohm’s Law and some techniques that will allow you to design and analyze simple series circuits. If you want to follow along at home, you can order the Arduino Kit we are using HERE. The nice digital voltmeter used in the lesson is available HERE.
In Lesson 7, we learned how we can get in-between voltages from the Arduino pins using the analogWrite command. Actually, this command only approximates analog voltages, and does not produce actual analog signals. It works by quickly turning the voltage to the pin on and off. For example, if you ask for 2.5 volts, it will quickly switch the pin on, with it on 50% of the time and off 50% of the time. Similarly, if you asked for 1 volt, it is really switching 5 volts on and off quickly. For this case, it would be on 20% of the time and off 80% of the time. This technique is called Pulse Width Modulation. In this video we show you the actual waveforms coming from the analogWrite command on an oscilloscope. If you want to follow this lesson at home, you can get the Arduino kit we are using HERE.
In earlier lessons we learned how to turn pins on and off with the Arduino digitalWrite command. This is great if you only want 0 or 5 volts. In this lesson we show how you can get the in between values by using the analogWrite command. In later lessons we will show more specifically how analogWrite works, but this present lesson gets you started, and shows you how to control brightness of an LED. In all these lessons we are using the Arduino Super Starter Kit, which you can pick up HERE.
In this lesson we take you step by step through how to build and program your own Binary Counter. In lesson 5 we showed you how to count in Binary, and how Binary numbers work. In today’s lesson, we show you how to practically implement a binary counter using the arduino and LED’s. We are using the elegoo kit, which you can pick up here.