Tony Lin
/
BX-car_s
share
Fork of BX-car_2 by
pot.cpp
- Committer:
- TonyLin
- Date:
- 2014-06-29
- Revision:
- 20:4ed21397e775
- Parent:
- 7:fd976e1ced33
- Child:
- 10:9f0ce6ba7663
File content as of revision 20:4ed21397e775:
#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(); }