CAN
CAN Bus Interface
- Overview
- Commands
- Samples
- On-Module Code
A CAN bus interface supporting CAN V2.0B with both standard and extended arbitration IDs, plus remote frames. Used widely in automotive electronics, industrial machinery, and any system where multiple controllers share one bus. The module handles arbitration, framing, and CRC internally — your host code sends and receives CAN frames with simple text commands over any supported interface.
Common uses: reading OBD-II diagnostics, vehicle hacking and instrumentation, robot drive-train integration, multi-controller industrial projects, and classroom intro-to-CAN labs.
Key features • Support CAN V2.0B | Resources 📄 Schematics PID: 0x030001 |
Modules ship without cables to reduce waste. Some specialty boards include a USB cable; for the rest, see Cables to add cables to your order.
Commands this module accepts. See Samples for runnable code in popular host languages.
| Function | Description |
|---|---|
Bitrate(b) | Sets the b bitrate (125K, 250K, 500K, 1M) |
RxFull() | Returns 1 if there is a received CAN message. |
RxRd() | Reads a received message. Returns the ArbID of the message or -1 if none. b9 is a 9-byte array contains the message body, with first element containing DLC followed by 0 to 8 bytes of data. |
TxFree() | Returns 1 if ready for new data, or previous transmit request succeeded. |
TxReq(i,l,b9) | Request to send a message with i EID and l length of the b9 data array. Returns 1 if a message was posted or 0 if busy to take a new one. |
DVer() | This driver version. |
Peek under the hood
The script below is this module's driver — it teaches the hardware how to respond to the commands listed above. It ships pre-loaded from the factory; most users never need to open it.
loading...
Example code that calls this module's commands from popular host languages.
New here? See Get Started to connect a module and send your first command.
- Python
- MicroPython
- JavaScript
- .NET
- Arduino
loading...
loading...
loading...
loading...
loading...
Code that runs directly on this module's MCU. See how On-Module Code allows modules to run standalone.
- Script
- Arduino IDE
This example runs using the default DUELink Internal Engine using its Scripting Language, and it expects the module's driver to be loaded first, see the Commands Tab.
loading...
See Arduino IDE page for more info.
loading...
Ordering Info
| Product | Part Number | Price |
|---|---|---|
| DUELink CAN | GDL-CMCAN-B | $14.95 |