Hardware Reference
In-Depth Information
Finally, to make the example even more visually appealing, a i nal phase is
used. By using two for loops and using one value for the output and another
value for the delay between operations, the result is a racing light going from
one side of the LEDs to the other, going ever faster and faster.
Multiple comments have been placed in the i le to explain to the user what
the sketch is doing. So long as LEDs are connected to the board (cathodes con-
nected to the pins) the user will be presented with a nice light show.
README
Every project should have a README i le, a simple text i le that describes the
project. When you look at a project on GitHub, the text you see on the project
page comes directly from the README i le in the project. Here is mine:
/***********************************************
ArduinoSketches Expander Shield Driver
This library is used to control the two PCF8754APs
present on the expander shield. They can perform both
reads and writes, but to perform a read, the output
on that pin must be high.
This library accesses those devices through bit-wise,
byte-wise or word-wise reads and writes.
Written by James A. Langbridge, enhanced by a reader of
Arduino Sketches.
Released under BSD license
To run the examples in this library, you will require
at least 8 LED lights, and corresponding resistors
(for red LEDs, use 150 ohm resistors). The anode should
be connected to the resistor and power supply, and the
cathode should be connected to the input/output of the
shield.
***********************************************/
The i rst line tells the user what this library is for: the Arduino Sketches
expander shield. It contains a little more detail on the project, what it does, how
it achieves that, who originally wrote it, and the license the project is distributed
under. I wrote the original library, but you will continue the project. This library
is distributed under the BSD library; use it in any way you see i t.
Secondly, the i le also includes the list of components required to run the
examples, if required. For this example, the user requires 8 LEDs, and the
corresponding resistors.
 
Search WWH ::




Custom Search