Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
pot/pot.cpp@8:2abfdbf5a3b8, 2016-11-11 (annotated)
- Committer:
- dlweakley
- Date:
- Fri Nov 11 21:19:06 2016 +0000
- Revision:
- 8:2abfdbf5a3b8
- Child:
- 10:4dd96f046784
- Child:
- 11:ed9539245ea0
test methods and angle class
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| dlweakley | 8:2abfdbf5a3b8 | 1 | #include "mbed.h" |
| dlweakley | 8:2abfdbf5a3b8 | 2 | #include "pot.h" |
| dlweakley | 8:2abfdbf5a3b8 | 3 | |
| dlweakley | 8:2abfdbf5a3b8 | 4 | Pot::Pot(PinName _pin) : angle(_pin) { |
| dlweakley | 8:2abfdbf5a3b8 | 5 | |
| dlweakley | 8:2abfdbf5a3b8 | 6 | } |
| dlweakley | 8:2abfdbf5a3b8 | 7 | |
| dlweakley | 8:2abfdbf5a3b8 | 8 | float Pot::get_angle(){ |
| dlweakley | 8:2abfdbf5a3b8 | 9 | float a = angle.read()*360; |
| dlweakley | 8:2abfdbf5a3b8 | 10 | return a; |
| dlweakley | 8:2abfdbf5a3b8 | 11 | } |