Page 1 of 1

MCP2515-Library MicroPython

Posted: Tue Sep 18, 2018 1:25 pm
by timi257
Hello,
I'm new to MicroPython and don't have much experience with it, so please pardon if any questions sound stupid.

I have a working Arduino-Sketch that uses this lib: https://github.com/autowp/arduino-mcp2515
To communicate via CAN-Bus.

Now I want to port this sketch to MicroPython on a ESP32, but I can't find any library for the MCP2515. What would be the best way to use it? Is there any possiblity to import the C-Code so that I can use it from within my main.py? I don't have experience with compiling my own micropython-version. But if there's some good tutorial how to do it for the ESP32 or something I could try that and I'd be grateful.
Or would it be easier to re-write the C-Code from the library into a python-Script and use this python-script?

Thanks for your answers!

Re: MCP2515-Library MicroPython

Posted: Tue Sep 18, 2018 5:25 pm
by jickster
timi257 wrote:
Tue Sep 18, 2018 1:25 pm
Hello,
I'm new to MicroPython and don't have much experience with it, so please pardon if any questions sound stupid.

I have a working Arduino-Sketch that uses this lib: https://github.com/autowp/arduino-mcp2515
To communicate via CAN-Bus.

Now I want to port this sketch to MicroPython on a ESP32, but I can't find any library for the MCP2515. What would be the best way to use it? Is there any possiblity to import the C-Code so that I can use it from within my main.py? I don't have experience with compiling my own micropython-version. But if there's some good tutorial how to do it for the ESP32 or something I could try that and I'd be grateful.
Or would it be easier to re-write the C-Code from the library into a python-Script and use this python-script?

Thanks for your answers!
I have zero experience with ESP32 but solid experience with the C micropython programming.

Your first issue is that your lib is in C++.
According to https://www.esp32.com/viewtopic.php?t=362, C++ is iffy.

Re: MCP2515-Library MicroPython

Posted: Sun Jun 06, 2021 4:04 pm
by Jim_Merkle
Timi257,
I too am looking for a working MCP2515 library. Anyone create or find one yet?

Thanks