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/11 21:27] bobraspberry_pi_with_talon_srx [2019/01/14 22:49] (current) bob
Line 6: Line 6:
   apt-get install libsocketcan-doc   apt-get install libsocketcan-doc
      
-===== Install CTRE Software ===== 
-   
-  wget http://www.ctr-electronics.com//downloads/lib/CTRE_Phoenix_FRC_Linux_5.12.0.zip 
-  unzip CTRE_Phoenix_FRC_Linux_5.12.0.zip 
-  unzip -d /usr/local/include/ core-5.12.0-headers.zip 
-  unzip -d /usr/local/include/ api-cpp-5.12.0-headers.zip 
-  unzip -d /usr/local/include/ wpiapi-cpp-5.12.0-headers.zip 
-   
-  sudo apt-get install cmake 
-  sudo apt-get install libsdl2-dev 
- 
 ===== Waveshare RS-485 / CAN Hat ===== ===== Waveshare RS-485 / CAN Hat =====
  
Line 39: Line 28:
     dtparam=spi=on      dtparam=spi=on 
     dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25,spimaxfrequency=1000000      dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25,spimaxfrequency=1000000 
-  +
   * Reboot and make sure CAN and SPI devices show up   * Reboot and make sure CAN and SPI devices show up
  
Line 45: Line 34:
   dmesg | grep -i '\(can\|spi\)'    dmesg | grep -i '\(can\|spi\)' 
      
 +===== Install CTRE Software =====
      
 +  sudo apt-get install libsdl2-dev
 +  sudo apt-get install cmake
 +
 +Example libraries, headers, and example code are at:
 +  
 +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
 +