![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
sadasd
Revision 2:68fc7aa5f068, committed 2019-06-11
- Comitter:
- Tafkal
- Date:
- Tue Jun 11 20:49:20 2019 +0000
- Parent:
- 1:285c99e43ed3
- Commit message:
- asd
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 |
--- a/main.cpp Fri Apr 05 08:01:10 2019 +0000 +++ b/main.cpp Tue Jun 11 20:49:20 2019 +0000 @@ -4,11 +4,11 @@ Serial pc(PC_10,PC_11,19200); Ticker ticker; CANMessage msg; -char counter = 1; +char counter = 0; void send() { printf("send()\n"); - if(can1.write(CANMessage(1600, &counter, 1))) { + if(can1.write(CANMessage(1601, &counter, 1))) { pc.printf("wloop()\n"); counter++; pc.printf("Message sent: %d\n", counter); @@ -16,7 +16,14 @@ } int main() { + wait(1); pc.printf("main()\n"); ticker.attach(&send, 1); - while(1){} -} + while(1){ + if(can1.read(msg)) { + pc.printf("Mmmmmm, jarac kazes?"); + pc.printf(" Id: %d\n",msg.data[0]); + } + //pc.printf("KrvavuTiMajkuJebem!\n"); + } +} \ No newline at end of file
--- a/mbed.bld Fri Apr 05 08:01:10 2019 +0000 +++ b/mbed.bld Tue Jun 11 20:49:20 2019 +0000 @@ -1,1 +1,1 @@ -https://os.mbed.com/users/mbed_official/code/mbed/builds/5571c4ff569f \ No newline at end of file +https://os.mbed.com/users/mbed_official/code/mbed/builds/a330f0fddbec \ No newline at end of file