302-2019 Group 2 / Mbed 2 deprecated 302CombinedCode

Dependencies:   mbed

main.cpp

Committer:
Jtroper
Date:
2019-01-22
Revision:
1:b86f099a314a
Parent:
0:0e723924ae7c
Child:
2:a17f7da1ca7c

File content as of revision 1:b86f099a314a:

#include "mbed.h"
#include <iostream>
DigitalOut myRled(LED1);
DigitalOut myBled(LED2);
AnalogIn PotCheck(PTE20);

int main() {
    float fPotValue = 0;
    while(1) {
        //myRled = 1;
        //wait(0.2);
        myRled = 2*fPotValue;
        wait(0.2);
       // myBled = 1;
        //wait(0.2);
        myBled = 2*fPotValue;
        wait(0.2);
        cout<< "\rI can't do that Carter" << endl;
        fPotValue = PotCheck.read();
        cout << fPotValue << endl;
    }
}