![](/media/cache/group/Logo_v4_ZnplGO9.jpg.50x50_q85.jpg)
il est la, il est beau!!!!
Dependencies: m3piBluetooth mbed
main.cpp@0:b839dbffc636, 2018-05-03 (annotated)
- Committer:
- thomasstrub
- Date:
- Thu May 03 14:03:58 2018 +0000
- Revision:
- 0:b839dbffc636
- Child:
- 1:63050abd40e9
projet pacman
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
thomasstrub | 0:b839dbffc636 | 1 | #include "mbed.h" |
thomasstrub | 0:b839dbffc636 | 2 | #include "m3pi.h" |
thomasstrub | 0:b839dbffc636 | 3 | #include "polulu.h" |
thomasstrub | 0:b839dbffc636 | 4 | |
thomasstrub | 0:b839dbffc636 | 5 | |
thomasstrub | 0:b839dbffc636 | 6 | |
thomasstrub | 0:b839dbffc636 | 7 | int main() |
thomasstrub | 0:b839dbffc636 | 8 | { |
thomasstrub | 0:b839dbffc636 | 9 | int f = 115200; |
thomasstrub | 0:b839dbffc636 | 10 | deffreq(f); |
thomasstrub | 0:b839dbffc636 | 11 | |
thomasstrub | 0:b839dbffc636 | 12 | char c = 'a'; |
thomasstrub | 0:b839dbffc636 | 13 | char* message = "Hello World!"; |
thomasstrub | 0:b839dbffc636 | 14 | sendmsg(message); |
thomasstrub | 0:b839dbffc636 | 15 | while(1) { |
thomasstrub | 0:b839dbffc636 | 16 | stop_motors(); |
thomasstrub | 0:b839dbffc636 | 17 | getdir(c); |
thomasstrub | 0:b839dbffc636 | 18 | char* message2 = "Je viens de recevoir :"; |
thomasstrub | 0:b839dbffc636 | 19 | sendmsg(message2); |
thomasstrub | 0:b839dbffc636 | 20 | sendmsg(&c); |
thomasstrub | 0:b839dbffc636 | 21 | //move |
thomasstrub | 0:b839dbffc636 | 22 | assignDirection(c, 0.2); |
thomasstrub | 0:b839dbffc636 | 23 | getCapt(); |
thomasstrub | 0:b839dbffc636 | 24 | suiviIntersect(); |
thomasstrub | 0:b839dbffc636 | 25 | } |
thomasstrub | 0:b839dbffc636 | 26 | } |