Projectlab Elektronica-ICT KULeuven

Dependencies:   EthernetInterface TMP102 TextLCD mbed-rtos mbed

werking.pdf

Committer:
seppeduwe
Date:
Mon Mar 17 18:40:46 2014 +0000
Revision:
4:466d859bfb13
Parent:
3:344115c04cd0
Einde Labo

Who changed what in which revision?

UserRevisionLine numberNew contents of line
seppeduwe 1:635e76c52151 1 #include "mbed.h"
seppeduwe 1:635e76c52151 2 #include "Potentiometer.h"
seppeduwe 1:635e76c52151 3
seppeduwe 1:635e76c52151 4 Potentiometer::Potentiometer()
seppeduwe 1:635e76c52151 5 {
seppeduwe 1:635e76c52151 6 potentiometer = new AnalogIn(p15);
seppeduwe 1:635e76c52151 7 }
seppeduwe 1:635e76c52151 8
seppeduwe 3:344115c04cd0 9 float Potentiometer::getPotentiometer()
seppeduwe 1:635e76c52151 10 {
seppeduwe 3:344115c04cd0 11 return potentiometer->read();
seppeduwe 3:344115c04cd0 12 }
seppeduwe 3:344115c04cd0 13 //Legacy code
seppeduwe 3:344115c04cd0 14 int Potentiometer::getPotentiometer255()
seppeduwe 3:344115c04cd0 15 {
seppeduwe 3:344115c04cd0 16 return (int) potentiometer->read()*255;
seppeduwe 1:635e76c52151 17 }