Projectlab Elektronica-ICT KULeuven

Dependencies:   EthernetInterface TMP102 TextLCD mbed-rtos mbed

werking.pdf

Potentiometer.cpp

Committer:
seppeduwe
Date:
2014-03-17
Revision:
4:466d859bfb13
Parent:
3:344115c04cd0

File content as of revision 4:466d859bfb13:

#include "mbed.h"
#include "Potentiometer.h"

Potentiometer::Potentiometer()
{
    potentiometer = new AnalogIn(p15);
}

float Potentiometer::getPotentiometer()
{
    return potentiometer->read();
}
//Legacy code
int Potentiometer::getPotentiometer255()
{
    return (int) potentiometer->read()*255;
}