Stefan Vukcevic
/
canrx
sfadfsdvdfd
Revision 1:41d392ac86e9, committed 2019-04-05
- Comitter:
- Tafkal
- Date:
- Fri Apr 05 08:02:30 2019 +0000
- Parent:
- 0:c9b767ca1c98
- Commit message:
- CMT;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r c9b767ca1c98 -r 41d392ac86e9 main.cpp --- a/main.cpp Wed Oct 18 19:26:38 2017 +0000 +++ b/main.cpp Fri Apr 05 08:02:30 2019 +0000 @@ -1,19 +1,16 @@ #include "mbed.h" -DigitalOut led1(LED1); -DigitalOut led2(LED2); -CAN can1(PB_5, PB_13); - -char counter = 0; +CAN can1(PA_11, PA_12, 100000); +Serial pc(PC_10,PC_11,19200); +CANMessage msg; int main() { - printf("main()\n"); - CANMessage msg; + pc.printf("PILETINA SE ZA PRSTE LEPI!\n"); while(1) { - printf("loop()\n"); + //printf("loop()\n"); if(can1.read(msg)) { - printf("Message received: %d\n", msg.data[0]); - led2 = !led2; - } - } -} + pc.printf("Mmmmmm, jarac kazes?"); + pc.printf(" Id: %d\n",msg.data[0]); + }; + }; +}; \ No newline at end of file
diff -r c9b767ca1c98 -r 41d392ac86e9 mbed.bld --- a/mbed.bld Wed Oct 18 19:26:38 2017 +0000 +++ b/mbed.bld Fri Apr 05 08:02:30 2019 +0000 @@ -1,1 +1,1 @@ -https://mbed.org/users/mbed_official/code/mbed/builds/b484a57bc302 \ No newline at end of file +https://os.mbed.com/users/mbed_official/code/mbed/builds/5571c4ff569f \ No newline at end of file