Arduino Sketches. Langbridge James A.
Чтение книги онлайн.

Читать онлайн книгу Arduino Sketches - Langbridge James A. страница 7

Название: Arduino Sketches

Автор: Langbridge James A.

Издательство: Автор

Жанр: Зарубежная образовательная литература

Серия:

isbn: 9781118919699

isbn:

СКАЧАТЬ not-yet-released Arduino Tre promises to be a phenomenal beast. Up until now, the fastest Arduino was the Arduino Due, based on an ARM-compatible microcontroller. The Tre, created by Arduino and BeagleBoard, combines the power of a full computer with the flexible input and output of an Arduino.

      The Tre has a Cortex-A8 class processor, the Sitara AM335X processor, running at 1 GHz. This processor has access to 512 MB of RAM and has an HDMI port capable of displaying Full HD (1920 x 1080). All this power is interfaced by an Atmel ATmega32u4 using the Arduino programming environment that enthusiasts have come to love.

      Arduino Zero

      The Arduino Zero is a brand new Arduino using Atmel's SAM D21 microcontroller. It has 256 KB of flash memory, 32 KB of RAM, and runs at 48 MHz. The Arduino Zero is designed to handle future requirements from the Maker community, by creating a design that is powerful, robust, and flexible enough to be used in robotics and wearable projects, as well as the IoT. It is also the first design to have an advanced debugger interface.

      Your Own Arduino?

      Arduino has always created open-source designs, and all the boards listed previously have schematic files available directly from the Arduino website, under a Creative Commons Attribution Share-Alike license. Put simply, this means that you are free to study the Arduino schematics to make your own or to make modifications either for personal use or professional use on the condition that you give credit to Arduino for the original design and release your own design under the same license.

      With the exception of the Arduino Due, all Arduino boards are based on the Atmel AVR. These chips can be bought from electronic distributors with the Arduino firmware pre-installed, or if you have the proper tools, you can buy blank chips and load the firmware yourself.

      Shields

      An Arduino by itself is a capable device and already includes numerous input and outputs, but its power only starts there. Because Arduino designs are open source, numerous companies have developed shields, printed circuit boards that are placed on top of the Arduino board that connect to the Arduino's pins. There shields add functionality by using different inputs and outputs, either digital I/O or through serial communication.

      What Is a Shield?

      A shield is a printed circuit board that can be placed on the top of most Arduino boards. It connects to the Arduino's processor through male header pins. Adding a shield to an Arduino does not necessarily expand the possibilities of an Arduino, but most do.

      For most prototyping projects, you connect wires to the Arduino's headers and connect them to a breadboard. This is easy enough for a lot of applications, like outputting data to two or three LEDs. For more complex applications, a breadboard isn't practical due to the complexity of the wiring, or the size of the components. Micro-SD card readers are extremely small and cannot be placed onto a breadboard. Soldering wires to a micro-SD reader isn't particularly easy, so your choices are limited. Writing data to a micro-SD card is something that can happen a lot, so it's fortunate several companies have developed shields with a micro-SD reader. If your application requires data logging, all you have to do is to connect the shield to the top of the Arduino, add a few lines of code, and you are ready to go. It is that simple.

      As said previously, not all shields add functionality. Some shields exist to help prototyping – allowing you to solder components onto the shield – without having to make your own PCB. Prototyping on a breadboard is an excellent way to test that your design works, but after the design is proven, it is time to make a better board. For example, if you were creating a doorbell application, it would be complicated to hide a breadboard behind the ringer. Instead, you could solder those components onto a prototyping board, saving space and making your design much more resistant to shock or tampering. The added advantage of this type of board is that you do not need to create your own printed circuit board or do any complicated routing.

      The Different Shields

      Shields exist for a wide variety of applications: storage on SD cards, network connectivity by Ethernet or WiFi robotics control, enabling displays like LCD and TFT screens, to name but a few.

      Most shields can be stacked, so you are not limited to using only one at a time. However, some shields may require input and outputs that will subsequently be unavailable to other designs. Be careful when you choose your shields!

       Arduino Motor Shield

      When using motors, special care has to be taken. When turned off, motors can induce voltage spikes, and components need to be added to a design account for this possibility. Also, typically, USB power is insufficient for motors. The Arduino Motor Shield takes care of this and enables the programmer independent control of two DC motors, or one stepper motor. This shield can either be powered from the Arduino or rely on an external power supply.

       Arduino Wireless SD Shield

      The Wireless SD shield is designed for an Xbee module but works with any radio modem with the same footprint. The on-board micro-SD slot allows the shield to act as a data logger. It also has a small prototyping area for adding components.

       Arduino Ethernet Shield

      The Arduino Ethernet shield does exactly as the name implies; it adds Ethernet connectivity through a W5100 controller, supporting up to four simultaneous socket connections. This module also includes a micro-SD slot for data-logging.

      The Arduino Ethernet Shield has an optional POE module. On a POE network, the module (and the parent Arduino) can be powered directly over Ethernet.

       Arduino WiFi Shield

      The Arduino WiFi Shield includes an HDG104 Wireless LAN controller, enabling an Arduino to access 802.11b/g networks. It can connect to open and encrypted networks. This module also includes a micro-SD slot for data-logging.

       Arduino GSM Shield

      The Arduino GSM shield connects to the Internet through a GPRS network, at a maximum of 85.6 KBps. It also has voice capabilities; by adding an external microphone and speaker circuit, it can make and receive voice calls. It can also send and receive SMS messages. The modem, an M10 by Quectel, is configured using AT commands, handled in software by the GSM library.

      The Arduino GSM Shield comes with a Bluevia SIM card; which allows for machine-to-machine roaming data connections in blocks of 10 or 20 megabytes. However, the GSM shield will work with a SIM card from a different provider.

       Your Own Shield

      In some cases, you will want to make your own electronics. For prototyping, a breadboard is sufficient, but when you need something more robust and more professional, it is time to make your own shield. There are several software options to assist you, but one of the best is the Fritzing application. In Fritzing, you can create breadboard designs, translate them into electronic schematics, and generate a shield layout directly. Fritzing also has its own shield creation system; just upload your schematic to its website and receive a professionally built shield.

      What Can You Do with an Arduino?

      This is one of the most commonly asked questions, but the answer is both simple and complicated. Put simply, you can do almost anything you can imagine. The most difficult part of any Arduino project is identifying a need. Maybe you have an aquarium at home and would like to control the lighting in a specific way? Maybe you would like to add a parking assist device onto your car. Some people just want to add some СКАЧАТЬ