Jit Patel / Mbed 2 deprecated JLR_display_nucleo_test

Dependencies:   mbed

main.cpp

Committer:
galthop
Date:
2019-07-30
Revision:
0:bcd95253c3d1

File content as of revision 0:bcd95253c3d1:

#include "mbed.h"
 

CAN can1(PB_8, PB_9, 500000);

const char msg1_data[] = {0x38, 0x30, 0xAD, 0x29, 0x90, 0x1E, 0x6A, 0x00};

CANMessage msg1(0x40,  (const char *)&msg1_data, 8, CANData, CANStandard);

Ticker ticker;

void send() 
{
    can1.write(msg1);
}
 
int main() 
{
    // Send a message every second
    ticker.attach(&send, 1);

    // Wait forever
    while(1) 
    {    
        wait(1);
    }
}