Hardware Reference
In-Depth Information
CHAPTER
2
Programming for the Arduino
The Arduino is an embedded system, that is to say it has the minimum amount
of hardware to get the job done. That does not mean that it is by any means a
weak system; there is no point in having a PCI bus if it will never be used—it
will only take up space, energy, and increase the overall cost of the device.
Arduinos are lightweight—and inexpensive—and make excellent embedded
systems. Just like all embedded systems, programming is done on a host com-
puter, not the Arduino itself.
Programming an embedded system, and indeed programming any sort
of system, is the art of writing text that can be understood by a human, and
translating it into a binary i le that can be understood by a processor. For this,
some tools are required. The data written by humans is called source code , and
because most source code is in text format, sometimes a simple text editor is
enough. Most people go with an Integrated Development Environment ( IDE ), an
augmented text editor with add-ons designed for developers. These add-ons can
range from text auto-completion to debugging and often include tools to handle
different types of source i les , which contain source code. Some projects might
use only one i le, but large projects can sometimes have hundreds of i les, if not
thousands. After the source code is written, a compiler must be used, which
reads in the source code and creates one or more binary i les. These binary i les
are later uploaded onto the Arduino and run by the microcontroller.
 
Search WWH ::




Custom Search