Code Monkey home page Code Monkey logo

arduino-peugeot-can's Introduction

Arduino Peugeot 207 CAN bus sketch

This sketch reads data from my Peugeot 207 "confort" CAN bus and sends it over serial. It is meant to replace the stock screen by a custom color LCD running an iOS app, and add a backup camera (see this blog post for more information).

It works with a CAN bus shield (or any MCP2515 based boards) and the CAN bus library from Seeedstudio. I only tested it on a Peugeot 207 but it should work on all RD4-equipped Peugeot/Citroen cars.

Serial packets

The packets sent over serial are formatted like this:

0x12 0xXX 0xXX 0xXX 0xXX 0x13
Start Length Type Data Data End

A frame starts with 0x12, and ends with 0x13. The length is the number of bytes between start and end bytes. The type is a byte containing which data will be sent (volume is 0x01, outside temperature is 0x02, etc...).

If any byte inside the frame is equal to 0x12, 0x13, or 0x7e (including length and type bytes), it's preceded by 0x7e and XOR'd by 0x20 (e.g 0x13 becomes 0x7E 0x33).

Wiring

I wired the CAN shield to pins 2 and 7 (part C), behind the car's RD4 radio unit. RD4 wiring diagram RD4 wiring photo

arduino-peugeot-can's People

Contributors

alexandreblin avatar

Watchers

Mickael Desgranges avatar James Cloos avatar

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.