I am attempting to create a program in MED-PC that would last for 30 minutes, during which a houselight would be paired with an electric shock. The session would consist of 2-minute periods of houselight-off and houselight-on, and when the houselight is on, 1-second shocks will be randomly presented. Does anyone have code or know how to write code in MED-PC to accomplish this?