![](/media/cache/profiles/493c8b3821e768713a4d1c5b1e7f5ad4.jpg.50x50_q85.png)
miniblip servo example
main.cpp@0:e3d2be5607ba, 2015-11-26 (annotated)
- Committer:
- pighixxx
- Date:
- Thu Nov 26 09:29:07 2015 +0000
- Revision:
- 0:e3d2be5607ba
miniblip servo example
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
pighixxx | 0:e3d2be5607ba | 1 | // miniblip servo demo |
pighixxx | 0:e3d2be5607ba | 2 | |
pighixxx | 0:e3d2be5607ba | 3 | #include "mbed.h" |
pighixxx | 0:e3d2be5607ba | 4 | #include "Servo.h" |
pighixxx | 0:e3d2be5607ba | 5 | |
pighixxx | 0:e3d2be5607ba | 6 | Servo myservo(P0_15); |
pighixxx | 0:e3d2be5607ba | 7 | |
pighixxx | 0:e3d2be5607ba | 8 | int main() { |
pighixxx | 0:e3d2be5607ba | 9 | for(float p=0; p<1.0; p += 0.1) { |
pighixxx | 0:e3d2be5607ba | 10 | myservo = p; |
pighixxx | 0:e3d2be5607ba | 11 | wait(0.2); |
pighixxx | 0:e3d2be5607ba | 12 | } |
pighixxx | 0:e3d2be5607ba | 13 | } |