Macchina Docs
  • Macchina.cc
  • Introduction
    • Disclaimer
  • Product Documentation
    • M2 Docs
      • Getting Started
      • Arduino IDE Quick Start
      • M2 Code libraries
        • CAN bus
        • Single-wire CAN
        • LIN
      • Next Steps with M2
      • Detailed Reference
        • Installation
        • Processor
        • Pin Mapping
        • Automotive Interfaces
        • Communication
          • M2 Bee-Compatible Add-ons
          • Cellular
        • Power
        • Storage/Memory
        • 12V IO
        • LEDS/Buttons
        • Enclosures
        • Breakout Board
        • Schematics and Source
      • Versions of M2
    • A0 Docs
      • Quick Start Guide
      • Firmware Reference
      • Hardware Reference
      • Projects
      • Troubleshooting
    • SuperB Docs
      • Getting Started
      • Hardware
      • Sending AT Commands
    • P1 Docs
      • Getting Started
      • Pin Mapping
      • Interfaces
      • Power Supply Note
    • OBD3way Docs
  • Projects
    • A0 Projects
      • A0 CAN Vehicle Data
      • A0 CAN Point to Point
      • A0 CAN Read VIN
      • Work-in-Progress A0 projects
    • M2 Projects
      • "OK Google, start my car!"
      • M2 and SavvyCAN, the Basics
      • Help Collect Voltage Data
      • Mini-Project Tutorials
        • M2 CAN Loopback
        • M2 CAN Point to Point
        • M2 SWCAN Point to Point
        • M2 VIN Extraction
    • P1 Projects
      • P1 CAN Vehicle Data
      • P1 CAN Loopback
    • Community Projects
    • Project Support
    • Other Resources
  • Support /contact us
    • Contact US / FAQ
    • Common Issues
    • Out of Stock/ Status
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Projects
  2. M2 Projects
  3. Mini-Project Tutorials

M2 CAN Point to Point

Send a CAN frame between 2 M2's.

PreviousM2 CAN LoopbackNextM2 SWCAN Point to Point

Last updated 1 year ago

Was this helpful?

Items Used

  • 2x M2

  • 1x OBD3way board

  • 1x 12V power supply

M2 Sketch

Upload THIS SKETCH to your M2, which sends a CAN frame on CAN0 or CAN1 when you push switch 1 or 2, respectively. M2 will also blink a light when it receives a CAN frame on either channel.

OBD3way Setup

Connect both M2s and OBD3way board as shown below. This connects the CAN0 of one M2 to the CAN0 of the other.

Test

Try sending a CAN frame from one M2 to the other; pushing the button on one M2 should cause the other M2 to blink, signifying it has received the frame! You can also try rerouting the jumpers to send between the different CAN channels. (The M2 sketch also includes serial printouts, keep your M2 connected to your computer and open the Arduino IDE's serial monitor at baud 115200 to view these messages.)

CAN0 on the left is connected to CAN0 on the right.