Dependencies:   mbed

Committer:
jderemer3
Date:
Wed Mar 01 16:39:17 2017 +0000
Revision:
0:dfd9a86fd08c

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jderemer3 0:dfd9a86fd08c 1 #include "mbed.h"
jderemer3 0:dfd9a86fd08c 2
jderemer3 0:dfd9a86fd08c 3 DigitalOut myled(LED1);
jderemer3 0:dfd9a86fd08c 4 DigitalOut Ctrl(p8); //Solenoid output control bit
jderemer3 0:dfd9a86fd08c 5
jderemer3 0:dfd9a86fd08c 6 int main() {
jderemer3 0:dfd9a86fd08c 7 while(1) {
jderemer3 0:dfd9a86fd08c 8 Ctrl = 1; //ON
jderemer3 0:dfd9a86fd08c 9 myled = 1;
jderemer3 0:dfd9a86fd08c 10 wait(0.5);
jderemer3 0:dfd9a86fd08c 11 Ctrl = 0; //OFF
jderemer3 0:dfd9a86fd08c 12 myled = 0;
jderemer3 0:dfd9a86fd08c 13 wait(2);
jderemer3 0:dfd9a86fd08c 14 }
jderemer3 0:dfd9a86fd08c 15 }