Alexander Nordskov
/
LAB08_Oppgave2
s
Fork of LAB08_Oppgave2 by
main.cpp@1:e5f12ffcf32f, 2015-10-21 (annotated)
- Committer:
- rlanghbv
- Date:
- Wed Oct 21 11:10:55 2015 +0000
- Revision:
- 1:e5f12ffcf32f
- Parent:
- 0:6332c3bffb25
- Child:
- 2:bea496327565
first commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rlanghbv | 0:6332c3bffb25 | 1 | #include "mbed.h" |
rlanghbv | 0:6332c3bffb25 | 2 | |
rlanghbv | 0:6332c3bffb25 | 3 | PwmOut servoMotor(PA_7); |
rlanghbv | 0:6332c3bffb25 | 4 | |
rlanghbv | 0:6332c3bffb25 | 5 | int main() |
rlanghbv | 0:6332c3bffb25 | 6 | { //sørg for å at servoMotor pulsen har en |
rlanghbv | 0:6332c3bffb25 | 7 | // Periode tid på .01 sek |
rlanghbv | 0:6332c3bffb25 | 8 | while (true) { |
rlanghbv | 0:6332c3bffb25 | 9 | //Roter Servo hodet minus 60 grader |
rlanghbv | 0:6332c3bffb25 | 10 | // servoMotor har pusbredde på 1000 us |
rlanghbv | 0:6332c3bffb25 | 11 | wait(0.2); |
rlanghbv | 0:6332c3bffb25 | 12 | //Roter Servo hodet pluss 60 grader |
rlanghbv | 0:6332c3bffb25 | 13 | // servoMotor har pusbredde på 2000 us |
rlanghbv | 0:6332c3bffb25 | 14 | wait(0.2); |
rlanghbv | 0:6332c3bffb25 | 15 | } |
rlanghbv | 0:6332c3bffb25 | 16 | } |
rlanghbv | 0:6332c3bffb25 | 17 | |
rlanghbv | 0:6332c3bffb25 | 18 | |
rlanghbv | 0:6332c3bffb25 | 19 | |
rlanghbv | 1:e5f12ffcf32f | 20 |