Course design for controlling electric curtains with single chip microcomputer