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

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

Название: Arduino Sketches

Автор: Langbridge James A.

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

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

Серия:

isbn: 9781118919699

isbn:

СКАЧАТЬ Arduino Micro lives up to its name; it is one of the smallest Arduino boards available. Despite its small size, it still has a large amount of input and output pins; it has 20 digital input/output pins, of which 7 can be used as PWM outputs. It also has 12 analog inputs.

The Micro is not designed to have shields but it does have an interesting layout, as shown in Figure 1.8. It can be placed directly onto a breadboard.

Figure 1.8 The Arduino Micro

      Arduino Due

      The Arduino Due differs from all other Arduino designs in that it is not based on an AVR, but rather uses a microcontroller based on an ARM Cortex-M3, the Atmel SAM3X8E. This advanced microcontroller is clocked at 84 MHz and is a full 32-bit device. It has a large amount of digital and analog I/O: 54 digital pins (12 of which can be used as PWM) and 12 analog inputs. The board has 4 UARTs, an SPI header, a Twin-Wire Interface, and even includes a JTAG header.

      The Arduino Due has more strict power supply requirements, and the microcontroller itself is powered under 3.3 V. Be careful not to apply 5 V to any of the pins: otherwise, you will damage the board. When choosing a shield for the Due, make sure the shield supports 3.3 V. You can identify if a shield is Due compatible by making sure it conforms to the Arduino R3 layout.

The Arduino Due is an incredibly powerful Arduino. The Due has 512 KB of flash memory and a total of 96 KB of SRAM. It can handle the largest programs at a fast speed. If you have a lot of calculations to perform, this is the Arduino that you need (Figure 1.9).

Figure 1.9 The Arduino Due

      LilyPad Arduino

      The LilyPad Arduino is an interesting device. It strays from the typical Arduino build because it is not rectangular, but round. Secondly, it does not support shields. What it is designed for, however, is to be a small device that is perfect for wearable computing, or e-fabric. The round shape means that connectors are evenly distributed, and its small scale (2 inches in diameter) makes it perfect for wearable devices. This device is easily hidden, and multiple manufacturers have designed devices especially for the LilyPad: Wearable LEDs, light sensors, even battery supply boxes that can be sewn into fabric.

To make the LilyPad as small and as light as possible, some sacrifices were made. The LilyPad does not have a voltage regulator, so it is vitally important to deliver at least 2.7 volts, but more important, no more than 5.5 volts; otherwise, the LilyPad will be destroyed (see Figure 1.10).

Figure 1.10 The LilyPad Arduino

      Arduino Pro

      The Arduino Pro exists in two versions, based either on the ATmega168 or the ATmega328. The 168 version operates at 3.3 V with an 8 MHz clock, and the 328 version runs on 5 V at 16 MHz. Both versions have 14 digital inputs/outputs and 6 analog inputs. It has a JST battery power connector, a power switch to select between power modes, and space reserved for a power jack, if needed. It does not have a USB connector but instead uses a FTDI cable for programming.

The Arduino Pro is different from most other Arduinos in that while it is a prototyping board it is designed to be embedded in projects. It does not come with headers – indeed, it does not have any headers at all, as shown in Figure 1.11. All the digital and analog inputs and outputs are placed at the exterior of the board, retaining shield layout, ready to be soldered to wire or connectors if necessary. Instead of being used for prototyping, the Arduino Pro is aimed at semipermanent installation in finished products. The Arduino Pro was not designed by Arduino but was designed and is manufactured by SparkFun Electronics.

Figure 1.11 The Arduino Pro

      Arduino Robot

      The Arduino Robot is, simply put, an Arduino on wheels. There are two Arduino boards on the Robot – one controls the on-board motors, and the other contains sensors. The Control board controls the Motor board and gives it instructions on how to operate.

      The Control board is powered by an ATmega32u4, with 32 KB of flash, 2.5 KB of SRAM, and 1 KB of EEPROM. It also has an external I2C EEPROM device, providing more storage. It has a compass, a speaker, three LEDs, a five-button key pad, and an LCD screen. It also has three solder points for external I2C devices. It also has I/O capability, with five digital I/Os, six PWMs, and four analog inputs. There is space for eight analog inputs (for distance sensors, ultrasound sensors, or other sensors) and six digital I/O pins for other devices (four of which can be used for analog input).

The Motor board is a fully independent board, powered by an ATmega32u4, the same microcontroller as on the Control board. The Motor board contains two wheels powered independently, five IR sensors, and I2C and SPI ports. It also contains the power supply; it is powered by four rechargeable AA batteries, and contains a jack port to recharge the on-board batteries. The board can also be powered by an on-board USB connector, but in this configuration, for safety reasons, the motors are disabled (Figure 1.12).

image

Figure 1.12 The Arduino Robot

      Arduino Esplora

      The Arduino Esplora is a strange device. Where most Arduinos are designed to sit on a table or be placed under fabric, the Esplora is designed to be held in your hand. Based on an ATmega32u4, it is not shield compatible and does not have any solder points for inputs and outputs. Instead, it looks and feels like a game pad; it has thumb inputs in the form of four digital switches, one analog joystick, and a linear potentiometer. For more feedback, the Esplora has a buzzer and an RGB LED. It also features more advanced devices; it has an on-board microphone, a temperature sensor, a connector for an LCD screen, and a three-axis accelerometer.

The Esplora has 32 KB of flash; 4 KB are used by the bootloader. It has 2.5 KB of SRAM, and 1 KB of EEPROM. It is a capable device, and it makes up for its lack of connectors with four TinkerKit connectors: two inputs and two outputs, as shown in Figure 1.13.

image

Figure 1.13 The Arduino Esplora

      Arduino Yún

      The Arduino Yún is based on an ATmega32u4, but it also has an Atheros AR9331 on the same board. The Atheros processor has a complete Linux distribution, based on OpenWRT, famous for Linux-based wireless routers.

The Arduino Yún has built-in Ethernet and WiFi, and also has a micro-SD slot. The Yún is different from other Arduinos and shields in that it has advanced network functionality; the Arduino can send commands to OpenWRT and then continue processing its sketch (Figure 1.14). The two processors work independently, the Bridge library facilitates communication between the two processors.

image

Figure 1.14 The Arduino Yún

      Arduino Tre

      The СКАЧАТЬ