GithubHelp home page GithubHelp logo

ucb-hybrid-robotics / recoil-usb-can-adapter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from uncertainty-cc/recoil-usb-can-adapter

0.0 0.0 0.0 19.65 MB

C 97.27% Assembly 0.19% Makefile 2.54%

recoil-usb-can-adapter's Introduction

Recoil USB-CAN Adapter

This adapter follows the python-can serial bus API packet format to transmit CAN frames over UART.

Recoil Motor Controller Communication Format

The CAN ID is separated into two fields, device_id and func_id.

func ID device ID
5 bits 6 bits
CAN_ID[10:6] CAN_ID[5:0]
32 functions 64 devices

Hardware Settings

CAN Baudrate setting:

Prescaler: 18

Time Quantum: 125.0 ns

Time Seg1: 7

Time Seg2: 2

Time for one Bit: 1250 ns

Baud Rate: 800000 bit/s

Usage

COM_PORT = "COMx"  # COM port of the dongle

bus = can.Bus(interface="serial", channel=COM_PORT, baudrate=1000000)

TODO

todo

Setting up Pi CAN Hat

sudo apt update
sudo apt install python3-pip
pip3 install python-can
sudo nano /boot/config.txt
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=12000000,interrupt=25,spimaxfrequency=1000000
reboot
dmesg | grep -i '\(can\|spi\)'

recoil-usb-can-adapter's People

Contributors

t-k-233 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.