Quantcast
Channel: Sensors - Arduino Forum
Viewing all articles
Browse latest Browse all 1069

Trying to configure MCP2515 to ESP-32 NodeMCU board

$
0
0

I'm try to configure an MCP2515 to an ESP-32 NodeMCU board. I only want to be able to read a small subset of messages from a CANbus on a BMW R1250GS
I'm using this library:
autowp/arduino-mcp2515: Arduino MCP2515 CAN interface library (github.com)

I have not connected anything to the bike yet - I'm trying to determine if I've wired stuff up the right way in advance. Here's what I've done

  1. Above library downloaded to IDE
  2. Verified that SPI3/VSPI is configured as follows ( MOSI = GPIO 23, MISO = 19, SCLK =18 CS = 05)
  3. Made the following connections based on drawings with autowp library and also the NodeMCU board docusments here pinoutESP32NodeMCU.png - Google Drive

MCP NodeMCU ESP32
INT -> GPIO 02
SCK -> 18
SI -> 23
SO -> 19 (with 4k7 resistor inline)
CS -> 05
GND -> GND
VCC -> 5V
INT -> unconnected

  1. Compiled and uploaded the Read only example code
    Without the MCP board being connected to a CANbus I'm getting garbage the serial monitor - I'd expected either an error (because not connected) or nothing.
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1184
load:0x40078000,len:13260
load:0x40080400,len:3028
entry 0x400805e4
------- CAN Read ----------
ID  DLC   DATA
0 0 
9FFFFFFF 0 
0 0 
0 0 
9FFFFF80 0 
0 0 
0 0 
9FFFFFFF 0 
9FFFFFFF 0 
400 0 
0 0 
404 0 
9FF38080 0 
0 0 
0 0 
0 0 
9FFF8780 0 
7FC 0 
9FFFFFFF 0 

Does this look ok?
Do I need to connect INT and if so - where?
Thanks
I

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 1069

Trending Articles