QQQ

Dependencies:   mbed-rtos mbed

Fork of BX-car_s by Tony Lin

Committer:
TonyLin
Date:
Thu Jun 26 14:29:53 2014 +0000
Revision:
10:9f0ce6ba7663
Parent:
7:fd976e1ced33
ok;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
backman 7:fd976e1ced33 1 #include "mbed.h"
backman 7:fd976e1ced33 2 #include "pot.h"
backman 7:fd976e1ced33 3
backman 7:fd976e1ced33 4 BX_pot::BX_pot(char t){
backman 7:fd976e1ced33 5 switch (t){
backman 7:fd976e1ced33 6 case '1':
backman 7:fd976e1ced33 7 pot_in = new AnalogIn (PTB3);
backman 7:fd976e1ced33 8 break;
backman 7:fd976e1ced33 9 case '2':
backman 7:fd976e1ced33 10 pot_in = new AnalogIn (PTB2);
backman 7:fd976e1ced33 11 break;
backman 7:fd976e1ced33 12 }
TonyLin 10:9f0ce6ba7663 13 }
backman 7:fd976e1ced33 14
backman 7:fd976e1ced33 15 float BX_pot::read(void){
TonyLin 10:9f0ce6ba7663 16 return pot_in->read();
backman 7:fd976e1ced33 17 }