add OBDII PIDs example

This commit is contained in:
loovee
2017-06-27 17:16:25 +08:00
parent 84329c2601
commit 8ff75c35ea
4 changed files with 191 additions and 35 deletions
+3 -4
View File
@@ -1,4 +1,6 @@
// demo: CAN-BUS Shield, send data
// loovee@seeed.cc
#include <mcp_can.h>
#include <SPI.h>
@@ -25,7 +27,6 @@ unsigned char stmp[8] = {0, 0, 0, 0, 0, 0, 0, 0};
void loop()
{
// send data: id = 0x00, standrad frame, data len = 8, stmp: data buf
stmp[7] = stmp[7]+1;
if(stmp[7] == 100)
{
@@ -43,6 +44,4 @@ void loop()
delay(100); // send data per 100ms
}
/*********************************************************************************************************
END FILE
*********************************************************************************************************/
// END FILE