![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
2.2 Potentiometers experiment Original code
main.cpp@0:79b918af3cd2, 2020-07-26 (annotated)
- Committer:
- vmg
- Date:
- Sun Jul 26 20:52:31 2020 +0000
- Revision:
- 0:79b918af3cd2
2.2 Potentiometers experiment Original code
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
vmg | 0:79b918af3cd2 | 1 | #include "mbed.h" |
vmg | 0:79b918af3cd2 | 2 | |
vmg | 0:79b918af3cd2 | 3 | PwmOut led1(LED1); AnalogIn pot1(p19); int main() { |
vmg | 0:79b918af3cd2 | 4 | while(1) { |
vmg | 0:79b918af3cd2 | 5 | led1 = pot1; |
vmg | 0:79b918af3cd2 | 6 | wait(0.01); |
vmg | 0:79b918af3cd2 | 7 | } |
vmg | 0:79b918af3cd2 | 8 | } |
vmg | 0:79b918af3cd2 | 9 |