Nano with MCP2515 canbus questions

Hello again, I'm tinkering with another new project, my first go round with canbus or can bus didn't go so well, I was stubborn and didn't want to ask for help and gave up. Now, more hours of searching, youtubing and another round of canbus boards, I've got part 1 checked as a success.
Part one, just be able to read the canbus data

Youtube video that got my part 1 checked :slight_smile:

library's he said to use (2 of them)

sketch from

#include <can.h>
#include <mcp2515.h>

#include <CanHacker.h>
#include <CanHackerLineReader.h>
#include <lib.h>

#include <SPI.h>
#include <SoftwareSerial.h>

const int SPI_CS_PIN = 10;
const int INT_PIN = 2;

const int SS_RX_PIN = 3;
const int SS_TX_PIN = 4;

CanHackerLineReader *lineReader = NULL;
CanHacker *canHacker = NULL;

SoftwareSerial softwareSerial(SS_RX_PIN, SS_TX_PIN);

void setup() {
    Serial.begin(115200);
    while (!Serial);
    SPI.begin();
    softwareSerial.begin(115200);

    Stream *interfaceStream = &Serial;
    Stream *debugStream = &softwareSerial;
    
    
    canHacker = new CanHacker(interfaceStream, debugStream, SPI_CS_PIN);
    //canHacker->enableLoopback(); // uncomment this for loopback
    lineReader = new CanHackerLineReader(canHacker);
    
    pinMode(INT_PIN, INPUT);
}

void loop() {
    CanHacker::ERROR error;
  
    if (digitalRead(INT_PIN) == LOW) {
        error = canHacker->processInterrupt();
        handleError(error);
    }

    error = lineReader->process();
    handleError(error);
}

void handleError(const CanHacker::ERROR error) {

    switch (error) {
        case CanHacker::ERROR_OK:
        case CanHacker::ERROR_UNKNOWN_COMMAND:
        case CanHacker::ERROR_NOT_CONNECTED:
        case CanHacker::ERROR_MCP2515_ERRIF:
        case CanHacker::ERROR_INVALID_COMMAND:
            return;

        default:
            break;
    }
  
    softwareSerial.print("Failure (code ");
    softwareSerial.print((int)error);
    softwareSerial.println(")");

    digitalWrite(SPI_CS_PIN, HIGH);
    pinMode(LED_BUILTIN, OUTPUT);
  
    while (1) {
        int c = (int)error;
        for (int i=0; i<c; i++) {
            digitalWrite(LED_BUILTIN, HIGH);
            delay(500);
            digitalWrite(LED_BUILTIN, LOW);
            delay(500);
        }
        
        delay(2000);
    } ;
}

hardware:

nano clone, updated from old bootloader to regular
(didn't want to chance damaging the 1 genuine until i know it works) :slight_smile:

HiLetgo 2pcs MCP2515 CAN Bus Module TJA1050 Receiver SPI Module for Arduino AVR from Amazon

software:
canhacker 2.0 from https://www.mictronics.de/

So I was able to wire it up per the schematic from

I've connected it to the car, configured it per the video, and got tons of "ID's" even though I only have an 2 can bus modules plus the nano combo.

Engine Control Unit and the Transmission Control Unit

At this point super excited!!! I started doing checks, seeing what changes, what doesn't when performing specific operations. I found 2 so far, maybe the easiest:

ECU: Accelerator throttle pedal %
TCU: transmission Park and reverse.

and this is now where I cannot google the answer. Some of the searching is super confusing and all of their threads are closed.

Question.. well one of many, what can bus library have you had experience with to
read a message and turn on a output pin? - link to thread if its available?

I think when I first tried, I had quite a few folders in arduino/library folder, each folder had different names but some had same file names within it like can.h (for example) some googling said that can be a problem .. maybe that messed me up the first time.

Currently, this time, I only have those 2 previously mentioned Librarys /folders in my Library folder.

this is the beginning of the can bus data I've maybe identified as Throttle Pedal and Gear position

ID		DLC		DATA									COMMENT

				01	02	03	04	05	06	07	08		

0AA		8		-	-	-	-	-	-	-	00		0% THROTTLE PEDAL
0AA		8		-	-	-	-	-	-	-	FF		100% THROTTLE PEDAL

0F9		8		00	00	40	00	00	00	00	05		Transmission in Park & neutral
0F9		8		7A	12	40	00	00	00	00	05		Transmission in Reverse
0F9		8		07	CB	40	00	00	00	00	05		Transmission in Drive

This is copied from my excel file I started, so this is not extracted from a screen shot or anything.

If anyone has a link that will help point me in the right direction on the next step in this project,

Step2: I want to take message

0F9		8		7A	12	40	00	00	00	00	05		Transmission in Reverse

to turn digital pin on, else off type of sketch.
Then with that I hope I can expand on more messages and outputs.

This post has been crazy long and I want to take little steps and don't want to annoy the active members who are so willing to help with too many questions too fast.

Really appreciate everyone help on the past projects, and look forward to making progress on this one and sharing code as I go

Clint

1 Like

You have to understand that CanHacker library on the arduino hides all details from you. To be able to read Can messages directly from the bus you have to get rid CanHacker and start from low level CAN examples and tutorials for "can.h" and "mcp2515.h" libraries.

that's crazy :frowning: I thought for sure that looked like a normal can message from searching.
@b707 Would you be able to elaborate on what details it hides?

Now to find a tutorial or link on how to use the nano and MCP2515 board and the "low level" can examples..

thanks for your reply.
clint

The autowp library has a basic receive demo that displays the Ids and data much like CanHacker.

Modify the mcp2515.setBitrate setting as necessary.

Hi, thank you @mikb55 for your reply too. I just got back from the garage after uploading the can_read sketch (no modifications to the wiring between nano and MCP board) and changed the
mcp2515.setBitrate(CAN_500KBPS);
to suite my application and it reads, crazy fast.
It read the same data, well it does not display 3 digits of ID if the ID is only 2 characters or numbers
example: one of the ECU ID (seems to be a few extras ID's) but from the canhacker program displays"0AA" and can_read displays only "AA"

snip from strait from serial monitor:

20:36:03.227 -> AA 8 2A 16 34 E1 6 4B 1C FF 
20:36:03.227 -> BE 6 8 0 FF 4 E3 FE 
20:36:03.227 -> 1ED 8 1 F4 0 0 0 0 24 D1 
20:36:03.227 -> C7 4 0 0 0 0 
20:36:03.227 -> F9 8 0 0 40 0 0 0 0 5 
20:36:03.227 -> 189 8 4F FF F FF 30 0 FF 8C 
20:36:03.227 -> 19D 8 40 0 3F FF 0 0 0 FF 
20:36:03.227 -> 1A1 7 0 10 1 0 96 6B FE 
20:36:03.227 -> 1BA 8 C 3 8A C6 A0 8A 98 A9 
20:36:03.227 -> 1C4 8 27 62 C0 30 2 FE 7 1 
20:36:03.227 -> F9 8 0 0 40 0 0 0 0 5 
20:36:03.227 -> AA 8 2A 16 34 E1 2 4B 1E FF 
20:36:03.227 -> BE 6 0 0 FF 4 E2 0 
20:36:03.227 -> 1ED 8 1 F4 0 0 0 0 24 D1 
20:36:03.227 -> C7 4 0 0 0 0 
20:36:03.227 -> F9 8 0 0 40 0 0 0 0 5 
20:36:03.227 -> 189 8 8F FF F FF 2F FF FF 8C 
20:36:03.227 -> 19D 8 80 0 3F FE 0 0 0 FF 
20:36:03.227 -> 1A1 7 0 10 1 0 96 6B FE 
20:36:03.227 -> 1BA 8 C 3 8A C6 A0 8A 98 A9 
20:36:03.227 -> 1C5 6 3F B9 33 71 33 67 
20:36:03.274 -> 2C3 8 6 20 8 AC 0 0 CA 13 
20:36:03.274 -> F9 8 0 0 40 0 0 0 0 5 
20:36:03.274 -> AA 8 2A 16 34 E1 6 4B 1C FF

where 8th for ID "AA" = FF/255 255*2.55 = 100% throttle (during this test I held throttle down 100%)
So I guess next step is to find an example how to use the mask code? and mask somehow only a ID and data to fit an example, and then have it turn a pin HIGH or LOW.

Next step after that hurdle (understatment) will be to see how to have a range from say for example that 8th bit, with range of 0-FF and have it output HIGH or LOW when at 7E to FF (126 - 255 which would be 50%-100%). That's going to be a at least week or 3 later before I get there:)

Thanks again,
Clint

Im looking at Freematics webpage

https://freematics.com/pages/products/arduino-obd-adapter/

and it uses [ELM327 AT command-set]..

There is an example code on the main page. but don't know if it will work on the Nano MCP2515 setup..

#include <Wire.h>
#include <OBD.h>

COBDI2C obd;

void setup()
{
  // we'll use the debug LED as output
  pinMode(13, OUTPUT);
  // start communication with OBD-II adapter
  obd.begin();
  // initiate OBD-II connection until success
  while (!obd.init());
}

void loop()
{
  int value;
  // save engine RPM in variable 'value', return true on success
  if (obd.read(PID_RPM, value)) {
    // light on LED on Arduino board when the RPM exceeds 3000
    digitalWrite(13, value > 3000 ? HIGH : LOW);
  }
}

#include <Wire.h> // whats this? specific to ELM style interface?
#include <OBD.h> // seems specific to his ELM style interface?

COBDI2C obd; //what is this?

still searching for examples, this is all I've come up with so far.

clint

The Freematics adaptor acts as an ELM327 interface bridge between the CAN bus OBD interface and an Arduino.

The Arduino doesn't need a MCP2515. The documentation says it uses "Rx/Tx or SDA/SCL" for communication with the adaptor.

I found a guy that did a crazy awesome project and shared his code on GitHub

his project was pretty sweet. In his code, he had the setup read reverse (once he figured out the data) and had the Arduino turn it into an output.

I chopped down his code own to what looked like it would work, but... was a dud.
he must have used the old Sparkfun MCP2515 library. The new one, Master, it compiles with error. I deleted it, installed the old version, restarted and compiles.

#include <SPI.h>
#include "mcp_can.h"


MCP_CAN CAN(10); // CAN Shield interface

void setup()
{
    // Configure pin modes
    pinMode(LED_BUILTIN, OUTPUT);
    digitalWrite(LED_BUILTIN, LOW);

    // Initialize serial port and CAN bus shield
    Serial.begin(115200);

    while (CAN.begin(CAN_500KBPS) != CAN_OK) {
        // Retry until successful init
        delay(100);
    }

    Serial.print (" Successful init ");
}

void loop() {
  
    unsigned char len = 0;    
    byte buf[8];                 
    byte tmp[9];                            //not sure what this is for
    int tempValue;                       //not sure what this is for

 

    // -------
    // Process data from the CAN bus
    // -------

    if (CAN.checkReceive() == CAN_MSGAVAIL) {
        // Read CAN frame into `buf` and length into `len`            // i didnt sen a byte len?? like byte buf[8];  
        CAN.readMsgBuf(&len, buf);
        int id = CAN.getCanId();

        if (id == 0b10101010 && len == 8) {                // 0AA gets error when compiled, converted to binary, try for accelerator pedal FF full throttle 
            // Full Throttle
            if (buf[7] & 0b11111111) {
                // Full Throttle engaged
                digitalWrite(LED_BUILTIN, HIGH);

            } else {
                // Not Full Throttle
            }
        }
    }
}

It compiles, but does does not turn on the BultinLED when pedal is at known 100%.
Serial monitor shows it to be successful at initialization

12:48:38.196 -> Enter setting mode success 
12:48:38.196 -> set rate success!!
12:48:38.196 -> Enter Normal Mode Success!!
12:48:38.196 ->  Successful init 
// demo: CAN-BUS Shield, receive data with check mode
// send data coming to fast, such as less than 10ms, you can use this way
// loovee, 2014-6-13

#include <SPI.h>
#include "mcp_can.h"

/*SAMD core*/
#ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE
    #define SERIAL SerialUSB
#else
    #define SERIAL Serial
#endif

// the cs pin of the version after v1.1 is default to D9
// v0.9b and v1.0 is default D10
const int SPI_CS_PIN = 10;
const int LED        = 8;
boolean ledON        = 1;

MCP_CAN CAN(SPI_CS_PIN);                                    // Set CS pin

void setup() {
    SERIAL.begin(115200);
    pinMode(LED_BUILTIN, OUTPUT);

    while (CAN_OK != CAN.begin(CAN_500KBPS)) {            // init can bus : baudrate = 500k
        SERIAL.println("CAN BUS Shield init fail");
        SERIAL.println("Init CAN BUS Shield again");
        delay(100);
    }
    SERIAL.println("CAN BUS Shield init ok!");
}


void loop() {
    unsigned char len = 0;
    unsigned char buf[8];

    if (CAN_MSGAVAIL == CAN.checkReceive()) {         // check if data coming
        CAN.readMsgBuf(&len, buf);    // read data,  len: data length, buf: data buf

        unsigned long canId = CAN.getCanId();

        if (canId == 0x0AA && len == 8) {                // 0AA gets error when compiled, converted to binary, try for accelerator pedal FF full throttle 
            // Full Throttle
            if (buf[7] & 0b11111111) {
                // Full Throttle engaged
                digitalWrite(LED_BUILTIN, HIGH);

            } else {
                // Not Full Throttle
            }
    }
  }
}
//END FILE

code compiles, does buildin led does not activate when full throttle. I loaded the can read sketch, and at full throttle, the 8th bit is FF...

stuck like chuck :frowning:

thanks
clint

Given that the autowp receive sketch shows the 0xAA ID messages, use that as your starting point and add your message ID matching and 8th byte matching code to that.

1 Like

thank you for your reply. I tried changing the canId to

if (canId == 0xAA && len == 8)

still no luck. I noticed the onboard LED on, but dim. I tried setting
digitalWrite (LED_BUILTIN, LOW)
in the void loop, still dim, commented out all LED_BUILTIN, still dim...
I found:

but does not show full code. If the built in led is an issue, Serial.print text is fine for confirmation.

I just realized I made this in the Project Guidance section, How to move it to Programming Questions...I just noticed this

In post #10 I said you should add your ID and data matching code to the working autowp receive example.
Instead you continued to edit the non-working Seeed Studio sketch.

Also, at this point there is no need to investigate masks and filters as this is a complex and confusing concept even for advanced users.

i misunderstood your instruction. I don't understand where to add id and data matching code to the working autowp receive example.

Take your working receive demo and replace the loop section with this.

void loop() {
  if (mcp2515.readMessage(&canMsg) == MCP2515::ERROR_OK) {
    if(canMsg.can_id == 0xAA){
      if(canMsg.can_dlc == 8){
          Serial.print("Throttle position = "); 
          Serial.println(canMsg.data[7]); // highest possible number is 255 (0xFF).
      }
    }
  }
}
1 Like

Sorry for the long delay, I got sidetracked with other projects. I made the update to the code, now it only displays the message and updates :slight_smile: now I will expand and see if i can get the LED_BUILTIN to turn on when say over a value of 50.

attached code that compiles and displays only the one value... super cool, thank you @mikb55 again for getting me this far.

I do have more questions though. When i try and do math equation in the code, it will compiles, and upload but will not compute, it only shows

16:57:34.934 -> Throttle position = 0
16:57:34.981 -> Throttle position = 0
16:57:34.981 -> Throttle position = 0
16:57:34.981 -> Throttle position = 0
16:57:35.028 -> Throttle position = 0
16:57:35.028 -> Throttle position = 0

if i change

Serial.println (canMsg.data[7]); // highest possible number is 255 (0xFF).

to

Serial.println (0.392156862745098 * (canMsg.data[7])); // highest possible number is 255 (0xFF).

it compiles, uploads and converts 0-255 to 0-100...

but when i try to use the math 100/255 to get the same result,

Serial.println ((100/255) * (canMsg.data[7])); // highest possible number is 255 (0xFF).

it compiles, uploads, but only shows 0 and will not calculate.

updated just to show working code with no math.

#include <SPI.h>
#include <mcp2515.h>

struct can_frame canMsg;
MCP2515 mcp2515(10);


void setup() {
  Serial.begin(115200);
  SPI.begin();
  
  mcp2515.reset();
  mcp2515.setBitrate(CAN_500KBPS);
  mcp2515.setNormalMode();
  
  Serial.println("------- CAN Read ----------");
  Serial.println("ID  DLC   DATA");
}

void loop() {
       
  if (mcp2515.readMessage(&canMsg) == MCP2515::ERROR_OK) {
    if(canMsg.can_id == 0xAA){
      if(canMsg.can_dlc == 8){
          Serial.print("Throttle position = "); 
          Serial.println(canMsg.data[7]); // highest possible number is 255 (0xFF).
      }
    }
  }
}

I tried this asell for the next step: to get the onboard LED to turn on:

#include <SPI.h>
#include <mcp2515.h>

struct can_frame canMsg;
MCP2515 mcp2515(10);


void setup() {
  Serial.begin(115200);
  SPI.begin();

  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
  
  mcp2515.reset();
  mcp2515.setBitrate(CAN_500KBPS);
  mcp2515.setNormalMode();
  
  Serial.println("------- CAN Read ----------");
  Serial.println("Throttle Position");
}

void loop() {
       
  if (mcp2515.readMessage(&canMsg) == MCP2515::ERROR_OK) {
    if(canMsg.can_id == 0xAA){
      if(canMsg.can_dlc == 8){
          Serial.print("Throttle position = "); 
          Serial.println (canMsg.data[7]); // highest possible number is 255 (0xFF).
          if (canMsg.data[7] < 128) {
             digitalWrite(LED_BUILTIN, HIGH);

            } else {
                // Less than 100% Throttle
           digitalWrite(LED_BUILTIN, LOW);
            }
      
      
      
      }
    }
  }
}

it does not turn on. I will look for some LED's and resistors in my electronics bin and connect them to an output pin in case the onboard led cannot be used like this with the mcp2515 board....

clint

To make 100/25 division work as expected, one of the numbers has to be a float.

See the link below for examples. Click the green button to run the simulation.

1 Like

Thank you, I updated the sketch to include the (float) and the math worked as intended !

Serial.println (((float)100/255) * (canMsg.data[7])); // highest possible number is 255 (0xFF).

more questions on the way :slight_smile:
on how to get the builtin led to light when value exceeds a value? or just in case the builtin led cannot be functional with this sketch, i could use an digital pin.
I played around and am thinking its because of the If statement.... because the if was met, it doesn't do anything else after?

Also how would I go about adding another message filter to the sketch, for example, display another can message, filtered down just like like in post 16?

thank you again for your time and help
clint

I think the built in LED cant be used, I added an LED with a 220 ohm resistor to pin 3, updated code, It is not worked as designed, It will blink at about 1 second interval (when i had the delay (1000) but removed it to see what would happen), but inconsistently.
When unplugged from OBD2 port, led does not turn on (as intended)

#include <SPI.h>
#include <mcp2515.h>

struct can_frame canMsg;
MCP2515 mcp2515(10);

int Led = 3;                  // Led connected to D3 on Nano



void setup() 
{
  Serial.begin(115200);
  SPI.begin();

  // initialize digital pin Led as an output.
  pinMode(Led, OUTPUT);
  //  digitalWrite(Led, LOW);
   
  mcp2515.reset();
  mcp2515.setBitrate(CAN_500KBPS);
  mcp2515.setNormalMode();
  
  Serial.println("--------- CAN Read ---------");
  Serial.println("---- Throttle Position ----");
  Serial.println("--------- LED Test ---------");


  
}

void loop() 
{


    
  if (mcp2515.readMessage(&canMsg) == MCP2515::ERROR_OK) 
    {   
    if ((canMsg.can_id == 0xAA) && (canMsg.can_dlc == 8))               
       {
          Serial.print("Throttle Position = "); 
          Serial.println (((float)100/255) * (canMsg.data[7]));   // Converts FF value of 255 to 0-100
          digitalWrite(Led, HIGH);                                // Turn on LED if TPS Can Message Recieved

       }
   
    }
 
                                                                       
 
           else
           Serial.println(" No Throttle Position Can Message Recieved ");   
           digitalWrite(Led, LOW);

   
}

this code will display

22:20:28.765 ->  No Throttle Position Can Message Recieved 
22:20:28.765 ->  No Throttle Position Can Message Recieved 
22:20:28.765 ->  No Throttle Position Can Message Recieved 
22:20:28.812 -> Throttle Position = 0.00
22:20:28.812 ->  No Throttle Position Can Message Recieved 
22:20:28.812 ->  No Throttle Position Can Message Recieved 
22:20:28.812 ->  No Throttle Position Can Message Recieved 
22:20:28.812 ->  No Throttle Position Can Message Recieved 
22:20:28.812 ->  No Throttle Position Can Message Recieved 
22:20:28.812 ->  No Throttle Position Can Message Recieved 
22:20:28.812 -> Throttle Position = 0.00
22:20:28.812 ->  No Throttle Position Can Message Recieved 
22:20:28.812 ->  No Throttle Position Can Message Recieved 
22:20:28.812 ->  No Throttle Position Can Message Recieved 
22:20:28.812 ->  No Throttle Position Can Message Recieved 
22:20:28.812 ->  No Throttle Position Can Message Recieved 
22:20:28.858 ->  No Throttle Position Can Message Recieved 
22:20:28.858 -> Throttle Position = 0.00
22:20:28.858 ->  No Throttle Position Can Message Recieved 
22:20:28.858 ->  No Throttle Position Can Message Recieved 
22:20:28.858 ->  No Throttle Position Can Message Recieved 
22:20:28.858 -> Throttle Position = 0.00
22:20:28.858 ->  No Throttle Position Can Message Recieved 
22:20:28.858 ->  No Throttle Position Can Message Recieved 
22:20:28.858 -> Throttle Position = 0.00
22:20:28.858 ->  No Throttle Position Can Message Recieved 
22:20:28.858 ->  No Throttle Position Can Message Recieved 
22:20:28.858 ->  No Throttle Position Can Message Recieved 
22:20:28.858 ->  No Throttle Position Can Message Recieved 
22:20:28.905 ->  No Throttle Position Can Message Recieved 
22:20:28.905 ->  No Throttle Position Can Message Recieved 
22:20:28.905 -> Throttle Position = 0.00
22:20:28.905 ->  No Throttle Position Can Message Recieved 
22:20:28.905 ->  No Throttle Position Can Message Recieved 
22:20:28.905 ->  No Throttle Position Can Message Recieved 
22:20:28.905 ->  No Throttle Position Can Message Recieved 
22:20:28.905 ->  No Throttle Position Can Message Recieved 
22:20:28.905 ->  No Throttle Position Can Message Recieved 

It will display actual throttle value, I just happened to copy and paste a section that had 0.00

I dont understand why it is running the ELSE statement...
I happened to notice the led is barley lit, probably because the code is running so fast, its acting like PWM.

Maybe I need a switch case to turn on the led?

After getting a bit discouraged, and wanting to start other projects I circled back to this one.

somehow I managed to change the right bits and got it to work.
expected when in Reverse, led on D3 lights up, when not in Reverse, light does not light up.

Successful LED activation when in Reverse video link

#include <SPI.h>
#include <mcp2515.h>

struct can_frame canMsg;
MCP2515 mcp2515(10);

int Led = 3;                  // Led connected to D3 on Nano

void setup() {
  Serial.begin(115200);
  SPI.begin();

  // initialize digital pin LED_BUILTIN as an output.
  pinMode(Led, OUTPUT);
  digitalWrite(Led, LOW);
  
  mcp2515.reset();
  mcp2515.setBitrate(CAN_500KBPS);
  mcp2515.setNormalMode();

  Serial.println("------- CAN Read -------");
  Serial.println("------- Reverse -------");
  Serial.println("------- LED Test -------");
}

void loop()
{

  if (mcp2515.readMessage(&canMsg) == MCP2515::ERROR_OK)
  {
    if (canMsg.can_id == 0xF9)
    {
      if (canMsg.can_dlc == 8)
      {
        Serial.print("Reverse = ");
        Serial.println (canMsg.data[1]); // 0 Park, 18 reverse
        if ((canMsg.data[1]) == 18)  
        {
          digitalWrite(Led, HIGH);
          Serial.print ("Reverse Selected ");
          
        }
        else
        {
          // Reverse Not Selected
          digitalWrite(Led, LOW);
          Serial.print ("Reverse not selected ");
          
        }
      }
    }
  }

}

Super excited to get this thing to read and turn on an LED all from the canbus :slight_smile:
Next I'm going to change the can id from Transmission, to Engine ECU and read throttle pedal and do the same, turn on led when TPS throttle position sensor is 50 - 100.

Question .... If this canbus and arduino setup is connected, Best guess will it drain the battery because it is communicating, or would I need to add some more code, to detect if Ignition is on then communicate?

thanks,
Clint

edit: changed the lines to read the ECM, engine control module, read the TPS values and turn on the led if between a range. I just picked 50-94.5

Throttle Pedal 50-94.5% = LED on video link

Next will to see if the Nano can do 2 can bus operations at the same time:
turn on one LED when in Reverse and 2nd LED when throttle position over 50%.

The LED_Builtin does not work with these library ..... no biggie, just sharing.
If i make no hardware changes, and just upload blink sketch, the onboard led will blink.

clint

and back to crushed.... as in no more progress... I cant seem to get the canhacker program to work again. I did all the same things I did the first 2 times of using it and somethings different.

Ive tried downloading them again, making the 16mhz to 8mhz change in the .h file and nada.... after it uploads successfully, I can connect to the ardunio setup from the canhacker program but it freezes.. best way to describe it... sometimes it will read a can ID or more than 1 can ID, but the count is always 1 and never updates..
I even removed all folders from arduino's library and reinstalled them from the newly downloaded zip folder and same result, seems like it wont want to communicate.

The can_read examples works no problem just not easy to see changes like with the program.
any advice?
thanks again,
clint