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: mbed
main.cpp@0:f45212966fb1, 2019-02-18 (annotated)
- Committer:
- mazdo25
- Date:
- Mon Feb 18 13:13:34 2019 +0000
- Revision:
- 0:f45212966fb1
- Child:
- 1:813f4b17ae65
initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mazdo25 | 0:f45212966fb1 | 1 | #include "mbed.h" |
mazdo25 | 0:f45212966fb1 | 2 | #include "Encoder.h" |
mazdo25 | 0:f45212966fb1 | 3 | #include "PID.h" |
mazdo25 | 0:f45212966fb1 | 4 | #include "Wheel.h" |
mazdo25 | 0:f45212966fb1 | 5 | #include "QEI.h" |
mazdo25 | 0:f45212966fb1 | 6 | |
mazdo25 | 0:f45212966fb1 | 7 | //blue D8 |
mazdo25 | 0:f45212966fb1 | 8 | //Green D9 |
mazdo25 | 0:f45212966fb1 | 9 | //Red D5 |
mazdo25 | 0:f45212966fb1 | 10 | |
mazdo25 | 0:f45212966fb1 | 11 | int main() { |
mazdo25 | 0:f45212966fb1 | 12 | DigitalOut enable(PC_12); |
mazdo25 | 0:f45212966fb1 | 13 | enable.write(1); |
mazdo25 | 0:f45212966fb1 | 14 | Encoder* LE = new Encoder(A5,A4); |
mazdo25 | 0:f45212966fb1 | 15 | Encoder* RE = new Encoder(A2,A3); |
mazdo25 | 0:f45212966fb1 | 16 | Wheel* leftWheel = new Wheel(LE,PB_7,PB_14); |
mazdo25 | 0:f45212966fb1 | 17 | Wheel* rightWheel = new Wheel(RE,PA_15,PB_13); |
mazdo25 | 0:f45212966fb1 | 18 | |
mazdo25 | 0:f45212966fb1 | 19 | |
mazdo25 | 0:f45212966fb1 | 20 | |
mazdo25 | 0:f45212966fb1 | 21 | } |