File tree Expand file tree Collapse file tree 3 files changed +30
-11
lines changed Expand file tree Collapse file tree 3 files changed +30
-11
lines changed Original file line number Diff line number Diff line change 11//  Copyright (c) Sandeep Mistry. All rights reserved.
22//  Licensed under the MIT license. See LICENSE file in the project root for full license information.
33
4+ //  Selección del hardware a utilizar
5+ #define  HW_RTLS_V4_0_X 
6+ //  #define HW_RTLS_V4_1_X
7+ 
48#include  < CAN.h> 
9+ #include  " boards.h" 
510
611void  setup () {
7-   Serial.begin (9600 );
8-   while  (!Serial);
12+   Serial.begin (57600 );
913
1014  Serial.println (" CAN Receiver"  );
1115
16+   CAN.setPins ( A_GPIO_5, GPIO_INT1 );
17+ 
1218  //  start the CAN bus at 500 kbps
1319  if  (!CAN.begin (500E3 )) {
1420    Serial.println (" Starting CAN failed!"  );
Original file line number Diff line number Diff line change 11//  Copyright (c) Sandeep Mistry. All rights reserved.
22//  Licensed under the MIT license. See LICENSE file in the project root for full license information.
33
4+ //  Selección del hardware a utilizar
5+ #define  HW_RTLS_V4_0_X 
6+ //  #define HW_RTLS_V4_1_X
7+ 
48#include  < CAN.h> 
9+ #include  " boards.h" 
510
611void  setup () {
7-   Serial.begin (9600 );
8-   while  (!Serial);
12+   Serial.begin (57600 );
913
1014  Serial.println (" CAN Receiver Callback"  );
1115
16+   CAN.setPins ( A_GPIO_5, GPIO_INT1 );
17+ 
1218  //  start the CAN bus at 500 kbps
1319  if  (!CAN.begin (500E3 )) {
1420    Serial.println (" Starting CAN failed!"  );
Original file line number Diff line number Diff line change 11//  Copyright (c) Sandeep Mistry. All rights reserved.
22//  Licensed under the MIT license. See LICENSE file in the project root for full license information.
33
4+ //  Selección del hardware a utilizar
5+ #define  HW_RTLS_V4_0_X 
6+ //  #define HW_RTLS_V4_1_X
7+ 
48#include  < CAN.h> 
9+ #include  " boards.h" 
510
611void  setup () {
7-   Serial.begin (9600 );
8-   while  (!Serial);
12+   Serial.begin (57600 );
913
1014  Serial.println (" CAN Sender"  );
1115
16+   CAN.setPins ( A_GPIO_5, GPIO_INT1 );
17+ 
1218  //  start the CAN bus at 500 kbps
1319  if  (!CAN.begin (500E3 )) {
1420    Serial.println (" Starting CAN failed!"  );
@@ -36,11 +42,12 @@ void loop() {
3642  Serial.print (" Sending extended packet ... "  );
3743
3844  CAN.beginExtendedPacket (0xabcdef );
39-   CAN.write (' w'  );
40-   CAN.write (' o'  );
41-   CAN.write (' r'  );
42-   CAN.write (' l'  );
43-   CAN.write (' d'  );
45+   CAN.write (' W'  );
46+   CAN.write (' I'  );
47+   CAN.write (' T'  );
48+   CAN.write (' R'  );
49+   CAN.write (' A'  );
50+   CAN.write (' C'  );
4451  CAN.endPacket ();
4552
4653  Serial.println (" done"  );
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments