![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Part One of my Project Course. Implementation of simple I/O and a custom defined protocol over UDP/IP.
Dependencies: C12832 LM75B mbed EthernetInterface mbed-rtos
potentiometer.h@3:538e17979246, 2018-03-23 (annotated)
- Committer:
- bertgereels
- Date:
- Fri Mar 23 13:42:13 2018 +0000
- Revision:
- 3:538e17979246
- Parent:
- 2:6bfe732ba6bc
Cleared response array before constructing ack.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bertgereels | 0:88d3b9015f7c | 1 | #include "mbed.h" |
bertgereels | 0:88d3b9015f7c | 2 | #pragma once |
bertgereels | 0:88d3b9015f7c | 3 | |
bertgereels | 0:88d3b9015f7c | 4 | namespace ProjectOne{ |
bertgereels | 0:88d3b9015f7c | 5 | |
bertgereels | 0:88d3b9015f7c | 6 | class Potentiometer{ |
bertgereels | 0:88d3b9015f7c | 7 | public: |
bertgereels | 2:6bfe732ba6bc | 8 | /* |
bertgereels | 2:6bfe732ba6bc | 9 | * Constructor for Potentiometer class |
bertgereels | 2:6bfe732ba6bc | 10 | * |
bertgereels | 2:6bfe732ba6bc | 11 | @param The pins connected to the potentiometer on the application board. |
bertgereels | 2:6bfe732ba6bc | 12 | @return Nothing. |
bertgereels | 2:6bfe732ba6bc | 13 | */ |
bertgereels | 0:88d3b9015f7c | 14 | Potentiometer(PinName analogPin=p19); |
bertgereels | 2:6bfe732ba6bc | 15 | |
bertgereels | 2:6bfe732ba6bc | 16 | /* |
bertgereels | 2:6bfe732ba6bc | 17 | * Method gets the potentiometer value. |
bertgereels | 2:6bfe732ba6bc | 18 | * |
bertgereels | 2:6bfe732ba6bc | 19 | @param Nothing. |
bertgereels | 2:6bfe732ba6bc | 20 | @return A float containing the potentiometer value (0...255). |
bertgereels | 2:6bfe732ba6bc | 21 | */ |
bertgereels | 1:b5c534165dfe | 22 | float getPotValue(void); |
bertgereels | 0:88d3b9015f7c | 23 | private: |
bertgereels | 0:88d3b9015f7c | 24 | AnalogIn pot1; |
bertgereels | 0:88d3b9015f7c | 25 | }; |
bertgereels | 0:88d3b9015f7c | 26 | }; |