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.
Dependencies: Motor encoderKRAI mbed millis
main.cpp@0:417af40e0c3c, 2018-11-05 (annotated)
- Committer:
- sarlilouis
- Date:
- Mon Nov 05 14:28:15 2018 +0000
- Revision:
- 0:417af40e0c3c
buat jaswin
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| sarlilouis | 0:417af40e0c3c | 1 | #include "mbed.h" |
| sarlilouis | 0:417af40e0c3c | 2 | #include "Motor.h" |
| sarlilouis | 0:417af40e0c3c | 3 | |
| sarlilouis | 0:417af40e0c3c | 4 | #define TS 12.5 |
| sarlilouis | 0:417af40e0c3c | 5 | |
| sarlilouis | 0:417af40e0c3c | 6 | |
| sarlilouis | 0:417af40e0c3c | 7 | Motor motor1(PB_4, PA_12, PA_11); |
| sarlilouis | 0:417af40e0c3c | 8 | |
| sarlilouis | 0:417af40e0c3c | 9 | |
| sarlilouis | 0:417af40e0c3c | 10 | |
| sarlilouis | 0:417af40e0c3c | 11 | int main(){ |
| sarlilouis | 0:417af40e0c3c | 12 | while(1){ |
| sarlilouis | 0:417af40e0c3c | 13 | |
| sarlilouis | 0:417af40e0c3c | 14 | motor1.speed(0.3); |
| sarlilouis | 0:417af40e0c3c | 15 | |
| sarlilouis | 0:417af40e0c3c | 16 | } |
| sarlilouis | 0:417af40e0c3c | 17 | } |