Hardware Reference
In-Depth Information
fflush(stdout);
}
}
}
return 0;
}
This also includes the functionality to write noncontrol codes to stdout , which may be redirected to a log file.
If you compile the previous program with g++ as arduino_read , you can start it as a process in the background, making
it daemon-like for very little effort:
./arduino_read > logfile 2>&1 &
Arduino Hardware
For some complex applications, the ATmega168 chip on the Arduino board is not powerful enough to handle the task.
So, in common with other computers, additional chips are necessary to ease the burden. In keeping with the modular
design of the Arduino, these chips are built up into stand-alone boards with the necessary interfacing circuitry so that
they can be directly mounted on top of the existing Arduino board. For this reason, they are known as shields . Most
shields also include a pass-through so that other shields can be placed on top of it. There is then a separate software
library that is used to control the device and that is copied into the Arduino/hardware/libraries directory.
N
Note
Not all shields are compatible with all models of Arduino.
There are many Arduino shields on the market, most with freely available specifications and circuit diagrams.
Each shield has a specific task and includes the following problem domains.
Ethernet Networking
There is the Arduino Ethernet Shield that supports four concurrent connections, working in either client or server
mode using TCP or UDP packets. It is based on the Wiznet W5100 chipset and uses digital pins 10-13 to communicate.
Wireless Control
Thanks to the exceptional work of Arduino hackers, there is now a WiFi shield available, capable of using the 802.11b
and 802.11g protocols. The code at http://arduino.cc/en/Main/ArduinoWiFiShield , along with the WiFi shield
library, provide WEP and WPA2 encryption along with an onboard SD micro slot. There are also examples to turn the
unit into a web server.
As befits its status, the WiFi shield makes use of many pins to communicate between itself and the Arduino.
Consequently, if you have an input/output heavy application, then look to the 4051 chip
( http://playground.arduino.cc/learning/4051 ) to multiplex the outputs and expand its capabilities.
N
Tip
If the shield and Arduino refuse to talk, then shorting pins 3 and 7 might help.
 
Search WWH ::




Custom Search