Bert Gereels / Mbed 2 deprecated ProjectOne

Dependencies:   C12832 LM75B mbed EthernetInterface mbed-rtos

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers potentiometer.h Source File

potentiometer.h

00001 #include "mbed.h"
00002 #pragma once
00003 
00004 namespace ProjectOne{
00005         
00006         class Potentiometer{
00007             public:
00008                 /*
00009                 * Constructor for Potentiometer class
00010                 *
00011                 @param The pins connected to the potentiometer on the application board.
00012                 @return Nothing.
00013                 */
00014                 Potentiometer(PinName analogPin=p19);
00015                 
00016                 /*
00017                 * Method gets the potentiometer value.
00018                 *
00019                 @param Nothing.
00020                 @return A float containing the potentiometer value (0...255).
00021                 */
00022                 float getPotValue(void);
00023             private:
00024                 AnalogIn pot1;
00025         };
00026 };