Coder Social home page Coder Social logo

Change RX/TX pins about arduino-can HOT 6 CLOSED

sandeepmistry avatar sandeepmistry commented on May 29, 2024
Change RX/TX pins

from arduino-can.

Comments (6)

Petros144 avatar Petros144 commented on May 29, 2024

maybe have a look at ESP32SJA1000.h

line 11,12

#define DEFAULT_CAN_RX_PIN GPIO_NUM_4
#define DEFAULT_CAN_TX_PIN GPIO_NUM_5

try some other pins... it should work....

from arduino-can.

craig-timms avatar craig-timms commented on May 29, 2024

I've tried this on RX=32/TX=33 and RX=25/TX=26.

I've also tried changing the pins in the ..esp32\hardware\esp32\1.0.4\cores\esp32\HardwareSerial.cpp (https://hackaday.com/2017/08/17/secret-serial-port-for-arduinoesp32/)

With no success. Any other ideas?

I have the same hardware that is using this library successfully with another ESP32 and the standard pins 16/17.

from arduino-can.

Petros144 avatar Petros144 commented on May 29, 2024

Do you want to interface via serial connection? im not shure what you want.

what is the problem using default pins? for CAN bus?...

from arduino-can.

craig-timms avatar craig-timms commented on May 29, 2024

So I'm using the lib and the standard RX=16/TX=17 lines connected to the SN65HVD232 transceiver without issue. This is with the ESP-32 board below.

image

I also want to use the lib with this board. This board does not have the standard serial pins available though. Therefore I need to interface with the SN65HVD232 using other RX/TX lines. Ideally I'd like to use X=32/TX=33 or RX=25/TX=26. I've used 25/26 before as serial lines with another library by using this library https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/HardwareSerial.cpp

image

from arduino-can.

Petros144 avatar Petros144 commented on May 29, 2024

im still not shure what you want to do with the Serial Interface with a CAN tranciver?!?
This Lib is for Can Bus and are default to use with GPIO 4 & 5.

Pins 16/17 are normaly used for Serial1

Please tell us what exactly is your plan so we can move on.

If you have problems with the Serial infertace look for SoftSerial emulation.... this works on any pins.

from arduino-can.

craig-timms avatar craig-timms commented on May 29, 2024

Should have looked closer at the readme, sorry. This is the answer to my question: CAN.setPins(rx, tx). Not working yet but will update.

from arduino-can.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.