Skip to content

Fix CAN Bus tutorial #1236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ The goals of this tutorial are:
- Arduino IDE ([online](https://create.arduino.cc/) or [offline](https://www.arduino.cc/en/main/software))
- [Arduino R4 Minima](https://store.arduino.cc/uno-r4-minima)
- [Arduino Renesas Core](https://github.com/arduino/ArduinoCore-renesas)
- CAN transceiver module\*
- CAN transceiver module *
- Jumper wires

In this tutorial, we are using a SN65HVD230 breakout module.
* In this tutorial, we are using a SN65HVD230 breakout module.

## Controller Area Network (CAN)

Expand All @@ -45,7 +45,7 @@ To connect the CAN transceiver, follow the table and circuit diagram below:
| ------------- | --------------- |
| D5 (CANRX0) | CANRX |
| D4 (CANTX0) | CANTX |
| 5 V | VIN/VCC/5 V |
| 3.3 V | VCC |
| GND | GND |

Then, between the CAN transceivers, connect the following:
Expand Down
16 changes: 8 additions & 8 deletions content/hardware/02.hero/boards/uno-r4-wifi/tutorials/can/can.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ The goals of this tutorial are:
- Arduino IDE ([online](https://create.arduino.cc/) or [offline](https://www.arduino.cc/en/main/software))
- [Arduino R4 WiFi](https://store.arduino.cc/uno-r4-wifi)
- [Arduino Renesas Core](https://github.com/arduino/ArduinoCore-renesas)
- CAN transceiver module\*
- CAN transceiver module *
- Jumper wires

\*In this tutorial, we are using a SN65HVD230 breakout module.
* In this tutorial, we are using a SN65HVD230 breakout module.

## Controller Area Network (CAN)

Expand All @@ -41,12 +41,12 @@ For this tutorial, we will use a simple example that sends a CAN message between

To connect the CAN transceiver, follow the table and circuit diagram below:

| UNO R4 WiFi | CAN Transceiver |
| ------------- | --------------- |
| UNO R4 WiFi | CAN Transceiver |
| -------------- | --------------- |
| D13 (CANRX0) | CANRX |
| D10 (CANTX0) | CANTX |
| 3.3V | VIN/VCC/5V |
| GND | GND |
| 3.3V | VIN |
| GND | GND |

Then, between the CAN transceivers, connect the following:

Expand All @@ -57,9 +57,9 @@ Then, between the CAN transceivers, connect the following:

## Code Examples

The following code examples needs to be uploaded to each of the UNO R4 WiFi boards, one will send a message, one will receive it. These examples are available in the Renesas core, and using the Arduino IDE, you can access them by navigating to **File > Examples > Arduino_CAN > CANWrite/CANRead**
The following code examples need to be uploaded to each of the UNO R4 WiFi boards, one will send a message, one will receive it. These examples are available in the Renesas core, and using the Arduino IDE, you can access them by navigating to **File > Examples > Arduino_CAN > CANWrite/CANRead**

The library used is built in to the core, so no need to install the library if you have the core installed.
The library used is built into the core, so no need to install the library if you have the core installed.

To initialize the library, use `CAN.begin(CanBitRate::BR_250k)`, where a CAN bit rate is specified. Choose between:
- BR_125k (125000)
Expand Down