volume test

Dependencies:   mbed

main.cpp

Committer:
neoqased
Date:
2014-10-20
Revision:
0:aafad4013d38

File content as of revision 0:aafad4013d38:

#include "mbed.h"

PwmOut myled(LED1);
AnalogIn volume(p20);

int main(){
    float vol = 0;
    myled.period_us(100);
    while(1){
        vol = 1 - volume;
        myled = vol;
        wait_ms(50);
    }
}