When this pin is connected to GND the board will reset. The next two pins are labeled 5V and 3.3V and just return those voltages, regardless of what the voltage of the power supply is. The next two pins are labeled GND and are two more ground pins, exactly like the one in the top row. So for example, if you power your Arduino with a 9V power supply through the power jack, then this pin gives you 9V. This pin provides direct access to the voltage provided by the power supply. If you are running short of digital pins keep in mind that you have six more available to you.Ĭontinuing on the bottom from right to left we find a pin labeled VIN. You will see later that an important part of any project is allocating pins to components. Also unlike the digital pins which can be configured as inputs or outputs, the analog pins can only be inputs.Īn interesting property of the analog pins is that they can be used as digital pins as well, with pin numbers 14 to 19. Typically the voltage range goes up to 5V, but the range can be changed by applying the desired maximum voltage to the AREF pin. Unlike the digital pins which have only two possible states, an analog pin can have 1024 possible states, according to the voltage applied to it. On the bottom right we have six pins labeled 0 to 5. Since these are not in all boards I will not discuss them here. Some Arduino boards have more pins to the left of AREF. This pin is rarely used, it tells the Arduino how to configure the voltage range of the analog pins. The next pin on the top left is labeled AREF, short for analog reference. Connected devices can connect their own GND pin here. The ground is what closes a circuit and allows the electric current to flow uninterrupted. The next pin on the top from right to left is GND, short for ground. These can be used, for example, to light a LED at different levels of intensity. These pins are capable of producing simulated analog output over a digital line. Pins 3, 5, 6, 9, 10 and 11 are marked with a ~ or a PWM label, short for pulse width modulation. The pin 13 LED is located below the pin 13 itself, labeled with the letter L in the diagram above. Pin 13 has a LED attached to it on most Arduino boards, so it is a convenient pin to send simple visual information out to the real world. These are used by the serial communication hardware to send and receive data. Pins 0 and 1 are also labeld RX and TX respectively. Some of the digital pins have preassigned functions. Since these pins are digital, they have only two possible states, HIGH and LOW. These pins can be individually configured as inputs or outputs, meaning that digital data can be read or written from connected devices on these pins. On the top, from right to left there are 14 pins labeled 0 to 13. During testing I will be powering my Arduino with a USB cable, but the final robot will receive power from a battery box connected to the power input jack. On the left side you have the USB port (grey box) and the power input jack (black box). Here is a diagram of a typical Arduino board. The Arduino board communicates with connected devices via its input and output pins, so I'll quickly go over what these pins are. I encourage you to get the parts I listed in the previous article and try these tests along with me. By the end of it you will know the basics of programming sensors, motors and other devices connected to the Arduino, and will also have an understanding of how a wireless remote controller can communicate with the Arduino board over Bluetooth. This is a pretty long article that is heavy in information that can be applied to most Arduino projects. Today I will introduce you to the programming side of my project. I showed you the parts I bought and what features I wanted to implement in my little remote controlled robot vehicle. In the previous article I introduced you to my project. Part IV: A (Not So) Basic Robot Firmware.Part II: Programming the Arduino (this article).Here is the list of articles I have published: Welcome to the second article in the tutorial series in which I'm building a remote controlled Arduino based vehicle robot.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |