Now put it all together.
The 4 code segments
Arduino + code: what segments should our code ALWAYS have?
PINS — DECLARE pin constants with meaningful names.
INIT — CONFIGURE pins as inputs or outputs, and do other initialization in setup().
RUN — A readable loop() describing what happens.
LOGIC — Functions containing the actual operations.