Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
raspberry_pi_with_talon_srx [2019/01/06 20:57] bobraspberry_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
 +  
 +===== Waveshare RS-485 / CAN Hat =====
 +
 +[[https://www.waveshare.com/wiki/RS485_CAN_HAT|Waveshare RS-485 / CAN Hat]]
 +
 +  * Make sure latest [[http://www.airspayce.com/mikem/bcm2835/index.html|BCM2835 GPIO]] and [[http://wiringpi.com/|WiringPi]] libraries are installed.
 +  * Use raspi-config to make sure I2C and SPI are enabled
 +  * Add BCM2835 modules to config
 +
 +  sudo vi /etc/modules
 +    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 /boot/config.txt 
 +    dtparam=spi=on 
 +    dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25,spimaxfrequency=1000000 
 +
 +  * Reboot and make sure CAN and SPI devices show up
 +
 +  sudo reboot 
 +  dmesg | grep -i '\(can\|spi\)' 
      
 ===== Install CTRE Software ===== ===== Install CTRE Software =====
      
-  wget http://www.ctr-electronics.com//downloads/lib/CTRE_Phoenix_FRC_Linux_5.12.0.zip +  sudo apt-get install libsdl2-dev 
-  unzip CTRE_Phoenix_FRC_Linux_5.12.0.zip +  sudo apt-get install cmake 
-  unzip -d /usr/local/include/ core-5.12.0-headers.zip + 
-  unzip -/usr/local/include/ api-cpp-5.12.0-headers.zip +Example libraries, headers, and example code are at: 
-  unzip -d /usr/local/includewpiapi-cpp-5.12.0-headers.zip+   
 +https://github.com/CrossTheRoadElec/Phoenix-Linux-SocketCAN-Example 
 + 
 +  wget https://github.com/CrossTheRoadElec/Phoenix-Linux-SocketCAN-Example/archive/master.zip 
 +  unzip -l master.zip  
 +  cd Phoenix-Linux-SocketCAN-Example-master 
 +  sudo cp -R include//usr/local/include 
 +  sudo cp lib/raspberry//usr/local/lib/
      
 +  chmod 755 build.sh
 +  chmod 755 clean.sh
 +  ./build.sh
 +