![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
tugas akhir
Dependencies: Motor mbed millis
Fork of DagonFly__RoadToJapan_15Mei_Ultimate by
main.cpp@53:11515147caf9, 2018-05-08 (annotated)
- Committer:
- Najib_irvani
- Date:
- Tue May 08 14:59:08 2018 +0000
- Revision:
- 53:11515147caf9
- Parent:
- 52:a39e26b935a9
tugas akhir
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
fanny868 | 0:9072e932503c | 1 | #include "mbed.h" |
Najib_irvani | 53:11515147caf9 | 2 | #include "encoderKRAI.h" |
fanny868 | 0:9072e932503c | 3 | #include "Motor.h" |
be_bryan | 26:256160a1a82d | 4 | #include "millis.h" |
Najib_irvani | 53:11515147caf9 | 5 | |
Najib_irvani | 53:11515147caf9 | 6 | encoderKRAI encLauncherDpn( D2, D3, 28, encoderKRAI::X4_ENCODING); |
Najib_irvani | 53:11515147caf9 | 7 | //encoderKRAI encLauncherBlk( PC_12, PD_2, 28, encoderKRAI::X4_ENCODING); |
Najib_irvani | 53:11515147caf9 | 8 | Serial pc(USBTX,USBRX); |
gustavaditya | 31:d5cbda07fd95 | 9 | |
gustavaditya | 31:d5cbda07fd95 | 10 | |
be_bryan | 52:a39e26b935a9 | 11 | |
Najib_irvani | 53:11515147caf9 | 12 | int main() { |
Najib_irvani | 53:11515147caf9 | 13 | |
Najib_irvani | 53:11515147caf9 | 14 | pc.baud(115200); |
Najib_irvani | 53:11515147caf9 | 15 | //wait_ms(10000); |
Najib_irvani | 53:11515147caf9 | 16 | startMillis(); |
Najib_irvani | 53:11515147caf9 | 17 | pc.printf("Hello World\n"); |
Najib_irvani | 53:11515147caf9 | 18 | |
Najib_irvani | 53:11515147caf9 | 19 | while(1) { |
be_bryan | 52:a39e26b935a9 | 20 | |
Najib_irvani | 53:11515147caf9 | 21 | pc.printf("%d\n", encLauncherDpn.getPulses()); |
Najib_irvani | 53:11515147caf9 | 22 | wait_ms(100); |
be_bryan | 52:a39e26b935a9 | 23 | } |
be_bryan | 52:a39e26b935a9 | 24 | } |