Moving CAN project to ESP32 - Need Help
Posted: Thu Feb 28, 2019 10:40 am
Hi everyone,
I've been working on a canbus project for a while now.
I started based on a blog from CuriousNinja (http://curious.ninja/project/bmw-e46/e4 ... ace-intro/)
I've got everything set up and running. Implemented many cool features. The next step I would love to take is move the project from the Arduino Nano to an ESP32 which will allow many more features such as control over WiFi.
The problem I'm facing is that my programming skills aren't good enough to get the code working on the ESP32.
It uses a library written by someone from the arduino forum. The library uses interrupt.h which doesn't work on the ESP32 because of the different chip architecture.
Currently I'm using a TH3122.4 transceiver but I've read there are numerous other chips.
What I'm looking for is a way to get the code working on an ESP32.
The main code I use reads and writes full hex messages passing over the bus. So for example:
So I can check for messages by comparing the received byte array to a stored byte array.
Also I can send a message to the car by addressing a stored byte array.
would it be possible to do the same thing with an ESP32?
Or would I have to use something entirely different?
I would like to point out that this is a hobby project, but I'm also trying to make it possible to sell it as a product once it is finished.
It's for a specific older type of BMW so there's not a huge marktet but maybe I can sell a few.
Thus if anyone is willing to do more than just point me in the right direction and maybe even write some of the code that is needed, I could compensate it with a fair amount of money.
Really hoping that you guys can help me out so the project can become much more exiting with WiFi/Bluetooth functionality!
All help appreciated!
Cheers,
Luck
I've been working on a canbus project for a while now.
I started based on a blog from CuriousNinja (http://curious.ninja/project/bmw-e46/e4 ... ace-intro/)
I've got everything set up and running. Implemented many cool features. The next step I would love to take is move the project from the Arduino Nano to an ESP32 which will allow many more features such as control over WiFi.
The problem I'm facing is that my programming skills aren't good enough to get the code working on the ESP32.
It uses a library written by someone from the arduino forum. The library uses interrupt.h which doesn't work on the ESP32 because of the different chip architecture.
Currently I'm using a TH3122.4 transceiver but I've read there are numerous other chips.
What I'm looking for is a way to get the code working on an ESP32.
The main code I use reads and writes full hex messages passing over the bus. So for example:
Code: Select all
const byte LOCK_ALL_DOORS_2 [7] PROGMEM = {
0x3F, 0x05, 0x00, 0x0C, 0x34, 0x01, 0x03 // Locks all doors
};
Also I can send a message to the car by addressing a stored byte array.
would it be possible to do the same thing with an ESP32?
Or would I have to use something entirely different?
I would like to point out that this is a hobby project, but I'm also trying to make it possible to sell it as a product once it is finished.
It's for a specific older type of BMW so there's not a huge marktet but maybe I can sell a few.
Thus if anyone is willing to do more than just point me in the right direction and maybe even write some of the code that is needed, I could compensate it with a fair amount of money.
Really hoping that you guys can help me out so the project can become much more exiting with WiFi/Bluetooth functionality!
All help appreciated!
Cheers,
Luck