File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ // Copyright (c) Sandeep Mistry. All rights reserved.
2+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+ //
4+ //
5+ // This examples queries the engine RPM (OBD-II PID 0x0c) once a seconds and
6+ // prints the value to the serial monitor
7+ //
18#include < CAN.h>
29
310// Most cars support 11-bit adddress, others (like Honda),
@@ -16,6 +23,7 @@ void setup() {
1623 while (1 );
1724 }
1825
26+ // add filter to only receive the CAN bus ID's we care about
1927 if (useStandardAddressing) {
2028 CAN.filter (0x7e8 );
2129 } else {
Original file line number Diff line number Diff line change 1+ // Copyright (c) Sandeep Mistry. All rights reserved.
2+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+ //
4+ //
5+ // This examples queries the ECU for the Mode 01 OBD-II PID's it supports and prints the supported
6+ // OBD-II PID's to the serial monitor
7+ //
8+ // A full list of PID's and their meaning can be found here:
9+ // https://en.wikipedia.org/wiki/OBD-II_PIDs#Mode_01
10+ //
111#include < CAN.h>
212
313// Most cars support 11-bit adddress, others (like Honda),
@@ -16,6 +26,7 @@ void setup() {
1626 while (1 );
1727 }
1828
29+ // add filter to only receive the CAN bus ID's we care about
1930 if (useStandardAddressing) {
2031 CAN.filter (0x7e8 );
2132 } else {
Original file line number Diff line number Diff line change 1+ // Copyright (c) Sandeep Mistry. All rights reserved.
2+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+ //
4+ //
5+ // This examples queries the ECU for the car's Vehicle Identification Number (VIN) and
6+ // prints it out to the serial monitor using Mode 09 and OBD-II PID 0x02
7+ //
18#include < CAN.h>
29
310// Most cars support 11-bit adddress, others (like Honda),
@@ -16,6 +23,7 @@ void setup() {
1623 while (1 );
1724 }
1825
26+ // add filter to only receive the CAN bus ID's we care about
1927 if (useStandardAddressing) {
2028 CAN.filter (0x7e8 );
2129 } else {
You can’t perform that action at this time.
0 commit comments