lab 1

Dependencies:   mbed

Committer:
kevinmark13
Date:
Tue Dec 02 21:40:47 2014 +0000
Revision:
0:3bd15e115d9f
HW Lab 1 Part 1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kevinmark13 0:3bd15e115d9f 1 // Kevin_Maddox_LAB1Part1.cpp : Defines the entry point for the console application.
kevinmark13 0:3bd15e115d9f 2
kevinmark13 0:3bd15e115d9f 3 /***********************************************************************
kevinmark13 0:3bd15e115d9f 4 PROGRAMMER: Kevin Maddox
kevinmark13 0:3bd15e115d9f 5 DATE: 01 Dec 2014
kevinmark13 0:3bd15e115d9f 6
kevinmark13 0:3bd15e115d9f 7 EXPECTED BEHAVIOR:
kevinmark13 0:3bd15e115d9f 8 This simple program is to flash 1 led on the chip set mbed indefinitely
kevinmark13 0:3bd15e115d9f 9 this sample program is from text book p.24
kevinmark13 0:3bd15e115d9f 10
kevinmark13 0:3bd15e115d9f 11 ************************************************************************/
kevinmark13 0:3bd15e115d9f 12
kevinmark13 0:3bd15e115d9f 13 #include "mbed.h"
kevinmark13 0:3bd15e115d9f 14
kevinmark13 0:3bd15e115d9f 15 DigitalOut myled(LED1);
kevinmark13 0:3bd15e115d9f 16
kevinmark13 0:3bd15e115d9f 17 int main()
kevinmark13 0:3bd15e115d9f 18 {
kevinmark13 0:3bd15e115d9f 19 while(1) { //begin infinte loop
kevinmark13 0:3bd15e115d9f 20 myled = 1; //logic on
kevinmark13 0:3bd15e115d9f 21 wait(0.2); // wait .2s until next commnd
kevinmark13 0:3bd15e115d9f 22 myled = 0; //logic off
kevinmark13 0:3bd15e115d9f 23 wait(0.2); // wait .2s until next commnd
kevinmark13 0:3bd15e115d9f 24 }
kevinmark13 0:3bd15e115d9f 25 }