Chris Styles
/
EA_potentiometer
An example program showing how to use the Potentiometer on the Embedded Artists baseboard
main.cpp
- Committer:
- chris
- Date:
- 2010-03-02
- Revision:
- 0:43de45cb558c
File content as of revision 0:43de45cb558c:
#include "mbed.h" // Potentionmeter is on mbed p15 // Ensure J27 is fitted AnalogIn pot (p15); Serial pc (USBTX,USBRX); int main() { while(1) { float ain = pot; pc.printf("Analog pot voltage = %.2fv\n",ain*3.3); wait(0.2); } }