embedded systems switch and LED example from lecture