running car

Dependencies:   mbed mbed-rtos

Fork of Boboobooo by kao yi

pot.cpp

Committer:
backman
Date:
2014-06-28
Revision:
11:418e39749f48
Parent:
7:fd976e1ced33

File content as of revision 11:418e39749f48:


#include "mbed.h"
#include "pot.h"



BX_pot::BX_pot(char t){
    
    
    switch (t){
       case '1':  
         pot_in = new AnalogIn (PTB3);
       break;
       case '2':
         pot_in = new AnalogIn (PTB2);
       break;
    }
    
    
    
    }
    
 float  BX_pot::read(void){
     
     
     
  return    pot_in->read();
     
     
}