![](/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.cpp@0:88d3b9015f7c, 2018-02-26 (annotated)
- Committer:
- bertgereels
- Date:
- Mon Feb 26 11:25:59 2018 +0000
- Revision:
- 0:88d3b9015f7c
- Child:
- 1:b5c534165dfe
First Commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bertgereels | 0:88d3b9015f7c | 1 | #include "potentiometer.h" |
bertgereels | 0:88d3b9015f7c | 2 | |
bertgereels | 0:88d3b9015f7c | 3 | namespace ProjectOne{ |
bertgereels | 0:88d3b9015f7c | 4 | |
bertgereels | 0:88d3b9015f7c | 5 | Potentiometer::Potentiometer(PinName analogPin) : pot1(analogPin){ |
bertgereels | 0:88d3b9015f7c | 6 | |
bertgereels | 0:88d3b9015f7c | 7 | } |
bertgereels | 0:88d3b9015f7c | 8 | |
bertgereels | 0:88d3b9015f7c | 9 | int Potentiometer::getPotValue(void){ |
bertgereels | 0:88d3b9015f7c | 10 | return pot1.read_u16(); |
bertgereels | 0:88d3b9015f7c | 11 | } |
bertgereels | 0:88d3b9015f7c | 12 | |
bertgereels | 0:88d3b9015f7c | 13 | } |