An electronic device includes: a main unit; a cap unit that is capable of
having a portable electronic device attached thereto; an instructing unit
that issues an instruction to designate a tilt angle of the cap unit with
respect to the main unit; a driving unit that drives the cap unit in
accordance with the instruction from the instructing unit; and a
controlling unit that controls the operation of the driving unit in
accordance with the instruction from the instructing unit, when the
portable electronic device is not attached to the cap unit.