Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
raspberry_pi_with_talon_srx [2019/01/06 20:56] – bob | raspberry_pi_with_talon_srx [2019/01/14 22:49] (current) – bob | ||
---|---|---|---|
Line 5: | Line 5: | ||
apt-get install libsocketcan2 | apt-get install libsocketcan2 | ||
apt-get install libsocketcan-doc | apt-get install libsocketcan-doc | ||
- | wget http:// | ||
- | unzip CTRE_Phoenix_FRC_Linux_5.12.0.zip | ||
- | unzip -d / | ||
- | unzip -d / | ||
- | unzip -d / | ||
| | ||
+ | ===== 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 | ||
+ |