An example program driving the AnalogOut. Connect a pair of earphones!

Dependencies:   mbed

Fork of app-board-AnalogOut by Chris Styles

main.cpp

Committer:
AndyR
Date:
2014-05-05
Revision:
2:1b650317539d
Parent:
1:754db1ff50f2

File content as of revision 2:1b650317539d:

#include "mbed.h"

AnalogOut Aout(p18);
//AnalogIn pot1(p19);
int i = 0;

int main()
{
    while(1) {
       // for(float i=0.0; i<1.0; i+=0.01) {
          
          if(i==1) 
          {
            i=0.0;
          }
            else i=1;
            Aout = i;
            wait(0.000001);
        
    }
}