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.
Diff: main.cpp
- Revision:
- 8:2edddda41050
- Parent:
- 7:5ad5ce91831f
- Child:
- 9:5a790f59217e
diff -r 5ad5ce91831f -r 2edddda41050 main.cpp --- a/main.cpp Sat Jun 03 14:59:00 2017 +0000 +++ b/main.cpp Sat Jun 03 15:14:35 2017 +0000 @@ -69,7 +69,7 @@ led2 = !led2; for(i=0; i<8;i++){ printf("Numero de carte = %X\n\r",MessageRx.data[i]); - ID[i] << MessageRx.data[i]; + ID[i]= MessageRx.data[i]; } send_Buzz=rechercheID( ID); //si buzz ok, on trait Buzz par un signal @@ -99,24 +99,31 @@ { led1 = !led1; printf("TIC3s\n\r"); + + Id = 0x222; + MessageBuzzer.len=1; + MessageBuzzer.id=Id; - CanPort.write(MessageBuzzer); + if( send_Buzz=true) + { + MessageBuzzer.data[0] = 0x01; + CanPort.write(MessageBuzzer); + send_Buzz=false; + } + + /*if (Id < 0x3FF) Id++; else Id = 0x000;*/ - - wait(3); + } } int main() { - char c[8] ={0x00,0x00,0x00,0x00,0x3E,0xC1,0xF5,0x8A}; CanPort.frequency(20000); - Id = 0x222; - MessageBuzzer.len=1; - MessageBuzzer.data[0] = 0x01; + //MessageTx.data[1] = 0xAA; MessageTx.format = CANStandard;