Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| raspberry_pi_with_talon_srx [2019/01/06 19:37] – created bob | raspberry_pi_with_talon_srx [2019/01/14 22:49] (current) – bob | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ===== Configure RPi as a CAN Bus controller ===== | ===== Configure RPi as a CAN Bus controller ===== | ||
| - | apt-get install libsocketcan2 | + | |
| - | apt-get install libsocketcan-doc | + | apt-get install libsocketcan-doc |
| + | |||
| + | ===== Waveshare RS-485 / CAN Hat ===== | ||
| + | [[https:// | ||
| + | |||
| + | * Make sure latest [[http:// | ||
| + | * Use raspi-config to make sure I2C and SPI are enabled | ||
| + | * Add BCM2835 modules to config | ||
| + | |||
| + | sudo vi / | ||
| + | i2c-bcm2708 | ||
| + | i2c-dev | ||
| + | |||
| + | * For python support install these libraries | ||
| + | |||
| + | sudo apt-get install python-pip | ||
| + | sudo pip install python-can | ||
| + | |||
| + | * Make sure boot config file is setup | ||
| + | |||
| + | sudo vi / | ||
| + | dtparam=spi=on | ||
| + | dtoverlay=mcp2515-can0, | ||
| + | |||
| + | * Reboot and make sure CAN and SPI devices show up | ||
| + | |||
| + | sudo reboot | ||
| + | dmesg | grep -i ' | ||
| + | | ||
| + | ===== Install CTRE Software ===== | ||
| + | | ||
| + | sudo apt-get install libsdl2-dev | ||
| + | sudo apt-get install cmake | ||
| + | |||
| + | Example libraries, headers, and example code are at: | ||
| + | | ||
| + | https:// | ||
| + | |||
| + | wget https:// | ||
| + | unzip -l master.zip | ||
| + | cd Phoenix-Linux-SocketCAN-Example-master | ||
| + | sudo cp -R include/* / | ||
| + | sudo cp lib/ | ||
| + | | ||
| + | chmod 755 build.sh | ||
| + | chmod 755 clean.sh | ||
| + | ./build.sh | ||